Ios ffmpeg转换的x264视频显示颜色饱和度大幅降低

Ios ffmpeg转换的x264视频显示颜色饱和度大幅降低,ios,video,ffmpeg,Ios,Video,Ffmpeg,我是个笨蛋。我花了30分钟在谷歌上搜索stackoverflow,但没有找到答案 我的设计师为我制作了一些动画视频。它们很棒,但是很大。所以我试着通过ffmpeg传递它们。它们变小了10倍,看起来不像像素化的——太棒了但是颜色大大减少了。当我在我的macbook上或在它即将进入的应用程序(iOS——即在iPhone 5S上,你可以看到缺失的颜色)中查看时,原稿中的鲜红色/粉红色在输出中会变成灰红色。我怎样才能使颜色保持不变 给我看这个: ffmpeg version 2.8 Copyright

我是个笨蛋。我花了30分钟在谷歌上搜索stackoverflow,但没有找到答案

我的设计师为我制作了一些动画视频。它们很棒,但是很大。所以我试着通过ffmpeg传递它们。它们变小了10倍,看起来不像像素化的——太棒了但是颜色大大减少了。当我在我的macbook上或在它即将进入的应用程序(iOS——即在iPhone 5S上,你可以看到缺失的颜色)中查看时,原稿中的鲜红色/粉红色在输出中会变成灰红色。我怎样才能使颜色保持不变

给我看这个:

ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 7.0.0 (clang-700.0.72)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '01 Introanimation@25fps_2.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2015-10-28 22:08:44
  Duration: 00:00:16.00, start: 0.000000, bitrate: 1613 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x720, 1434 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2015-10-28 22:08:44
      handler_name    : Alias Data Handler
      encoder         : AVC Coding
。。。到目前为止我试过

ffmpeg -i original.mp4 -vf format=yuvj420p -color_range 2 -vcodec libx264 out.mp4
。。。还有很多其他的,但是没有运气

原件.mp4在这里:

编辑:根据请求发布(无参数)转换的输出

ffmpeg -i original.mp4 out.mp4
ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 7.0.0 (clang-700.0.72)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2015-10-28 22:08:44
  Duration: 00:00:16.00, start: 0.000000, bitrate: 1613 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x720, 1434 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2015-10-28 22:08:44
      handler_name    : Alias Data Handler
      encoder         : AVC Coding
[libx264 @ 0x7f8a5b80ea00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x7f8a5b80ea00] profile High, level 3.1
[libx264 @ 0x7f8a5b80ea00] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf56.40.101
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2015-10-28 22:08:44
      handler_name    : Alias Data Handler
      encoder         : Lavc56.60.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=  400 fps=0.0 q=-1.0 Lsize=     262kB time=00:00:15.92 bitrate= 134.9kbits/s    
video:257kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.971545%
[libx264 @ 0x7f8a5b80ea00] frame I:2     Avg QP:13.86  size:  9730
[libx264 @ 0x7f8a5b80ea00] frame P:174   Avg QP:21.01  size:  1121
[libx264 @ 0x7f8a5b80ea00] frame B:224   Avg QP:20.88  size:   215
[libx264 @ 0x7f8a5b80ea00] consecutive B-frames: 19.2% 17.0%  3.8% 60.0%
[libx264 @ 0x7f8a5b80ea00] mb I  I16..4: 62.9% 26.0% 11.1%
[libx264 @ 0x7f8a5b80ea00] mb P  I16..4:  3.7%  1.0%  0.7%  P16..4:  3.0%  1.5%  0.8%  0.0%  0.0%    skip:89.3%
[libx264 @ 0x7f8a5b80ea00] mb B  I16..4:  0.4%  0.1%  0.0%  B16..8:  3.3%  0.5%  0.0%  direct: 0.0%  skip:95.6%  L0:47.0% L1:43.5% BI: 9.5%
[libx264 @ 0x7f8a5b80ea00] 8x8 transform intra:19.3% inter:33.8%
[libx264 @ 0x7f8a5b80ea00] coded y,uvDC,uvAC intra: 7.4% 6.8% 5.5% inter: 0.5% 0.6% 0.5%
[libx264 @ 0x7f8a5b80ea00] i16 v,h,dc,p: 70% 29%  1%  0%
[libx264 @ 0x7f8a5b80ea00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15%  7% 77%  1%  0%  0%  0%  0%  0%
[libx264 @ 0x7f8a5b80ea00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 23% 29%  3%  2%  2%  2%  1%  1%
[libx264 @ 0x7f8a5b80ea00] i8c dc,h,v,p: 74% 10% 15%  0%
[libx264 @ 0x7f8a5b80ea00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f8a5b80ea00] ref P L0: 64.1%  5.3% 17.6% 12.9%
[libx264 @ 0x7f8a5b80ea00] ref B L0: 77.4% 19.7%  2.9%
[libx264 @ 0x7f8a5b80ea00] ref B L1: 95.5%  4.5%
[libx264 @ 0x7f8a5b80ea00] kb/s:131.31

如果您添加
-x264选择colormatrix=bt709
并删除
-vf format=yuvj420p-color\u range 2

您为什么要添加
-vf format=yuvj420p-color\u range 2
?。。。因为没有这个颜色看起来很糟糕,我读到这些参数可能会有所帮助。它们不支持。也许苹果设备不支持
YUVJ
,并且值被剪裁了?如果你不使用像素格式会发生什么?如果我不使用所有选项,颜色仍然会乱七八糟。我开始玩期权是因为this@LordNeckbeard好的,编辑只是为了更新一下这个答案,根据当前的
ffmpeg
文档,
x264opts
已被弃用,最终将被
x264参数
取代。
ffmpeg -i original.mp4 out.mp4
ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 7.0.0 (clang-700.0.72)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2015-10-28 22:08:44
  Duration: 00:00:16.00, start: 0.000000, bitrate: 1613 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x720, 1434 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2015-10-28 22:08:44
      handler_name    : Alias Data Handler
      encoder         : AVC Coding
[libx264 @ 0x7f8a5b80ea00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x7f8a5b80ea00] profile High, level 3.1
[libx264 @ 0x7f8a5b80ea00] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf56.40.101
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x720, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2015-10-28 22:08:44
      handler_name    : Alias Data Handler
      encoder         : Lavc56.60.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=  400 fps=0.0 q=-1.0 Lsize=     262kB time=00:00:15.92 bitrate= 134.9kbits/s    
video:257kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.971545%
[libx264 @ 0x7f8a5b80ea00] frame I:2     Avg QP:13.86  size:  9730
[libx264 @ 0x7f8a5b80ea00] frame P:174   Avg QP:21.01  size:  1121
[libx264 @ 0x7f8a5b80ea00] frame B:224   Avg QP:20.88  size:   215
[libx264 @ 0x7f8a5b80ea00] consecutive B-frames: 19.2% 17.0%  3.8% 60.0%
[libx264 @ 0x7f8a5b80ea00] mb I  I16..4: 62.9% 26.0% 11.1%
[libx264 @ 0x7f8a5b80ea00] mb P  I16..4:  3.7%  1.0%  0.7%  P16..4:  3.0%  1.5%  0.8%  0.0%  0.0%    skip:89.3%
[libx264 @ 0x7f8a5b80ea00] mb B  I16..4:  0.4%  0.1%  0.0%  B16..8:  3.3%  0.5%  0.0%  direct: 0.0%  skip:95.6%  L0:47.0% L1:43.5% BI: 9.5%
[libx264 @ 0x7f8a5b80ea00] 8x8 transform intra:19.3% inter:33.8%
[libx264 @ 0x7f8a5b80ea00] coded y,uvDC,uvAC intra: 7.4% 6.8% 5.5% inter: 0.5% 0.6% 0.5%
[libx264 @ 0x7f8a5b80ea00] i16 v,h,dc,p: 70% 29%  1%  0%
[libx264 @ 0x7f8a5b80ea00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15%  7% 77%  1%  0%  0%  0%  0%  0%
[libx264 @ 0x7f8a5b80ea00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 23% 29%  3%  2%  2%  2%  1%  1%
[libx264 @ 0x7f8a5b80ea00] i8c dc,h,v,p: 74% 10% 15%  0%
[libx264 @ 0x7f8a5b80ea00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f8a5b80ea00] ref P L0: 64.1%  5.3% 17.6% 12.9%
[libx264 @ 0x7f8a5b80ea00] ref B L0: 77.4% 19.7%  2.9%
[libx264 @ 0x7f8a5b80ea00] ref B L1: 95.5%  4.5%
[libx264 @ 0x7f8a5b80ea00] kb/s:131.31