FFMPEG - 视频中带有飞溅图像的绿色投射
FFMPEG - Green cast with Splash image in video
我正在使用 FFMPEG 制作由单个黑白 JPG 图像组成的视频:
ffmpeg -y -loop 1 -framerate 30 -t 5 -i SplashBW.jpg Splash.mp4
生成的视频有两个问题:
- 用 VLC 查看时,它有一个绿色色偏
- 用"Film and TV"查看时(我怀疑这是Windows 10
查看器 - MP4 文件的关联似乎已被劫持
在我的电脑上)它有一个绿色的演员和一个主要的闪烁
0.5秒左右。
用 Irfan View 查看时看起来不错。我不知道问题出在原始 JPG、FFMPEG 命令还是查看器上。自然地,我希望它在所有输出上都能正确呈现。
当我打开它们时,下面的前两个 link 在我的浏览器 (Chrome) 中看起来很好。第三个 link 是我尝试使用 Film and TV
app 播放视频时看到的屏幕录像。
screen grab of video playing on my PC
FFMPEG 日志运行:
C:\Users\Raymond\Desktop\Chorus\Videos\Virtual Choir>call ffmpeg -y -loglevel verbose -loop 1 -framerate 30 -t 5 -i SplashBW.jpg Splash.mp4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20200122
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libope
ncore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --
enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuv
id --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[AVIOContext @ 000001e6f6ccdd00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccde80] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6d59b00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccde40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccdf00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccdfc0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cce180] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cce240] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd33c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd3480] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd3640] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd3700] Statistics: 159785 bytes read, 0 seeks
Last message repeated 19 times
Input #0, image2, from 'SplashBW.jpg':
Duration: 00:00:00.03, start: 0.000000, bitrate: 38348 kb/s
Stream #0:0: Video: mjpeg (Baseline), 1 reference frame, gray(bt470bg/unknown/unknown, center), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 000001e6f6cd2ec0] w:1920 h:1080 pixfmt:gray tb:1/30 fr:30/1 sar:1/1 sws_param:flags=2
[libx264 @ 000001e6f6d57100] using SAR=1/1
[libx264 @ 000001e6f6d57100] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001e6f6d57100] profile High, level 4.0, 4:0:0, 8-bit
[libx264 @ 000001e6f6d57100] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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 chro
ma_me=0 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 weigh
tb=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 'Splash.mp4':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264), 1 reference frame (avc1 / 0x31637661), gray(center), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[AVIOContext @ 000001e6f8b98e00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5980] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeksspeed= 0x
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks1.0kbits/s speed=0.359x
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks0.3kbits/s speed=0.828x
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks0.2kbits/s speed=1.16x
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
Last message repeated 2 times
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5980] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
No more output streams to write to, finishing.
frame= 150 fps= 51 q=-1.0 Lsize= 142kB time=00:00:04.90 bitrate= 237.8kbits/s speed=1.65x
video:140kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.855892%
Input file #0 (SplashBW.jpg):
Input stream #0:0 (video): 151 packets read (24127535 bytes); 151 frames decoded;
Total: 151 packets (24127535 bytes) demuxed
Output file #0 (Splash.mp4):
Output stream #0:0 (video): 150 frames encoded; 150 packets muxed (143004 bytes);
Total: 150 packets (143004 bytes) muxed
[AVIOContext @ 000001e6f6d59240] Statistics: 2 seeks, 4 writeouts
[libx264 @ 000001e6f6d57100] frame I:1 Avg QP:18.13 size:131209
[libx264 @ 000001e6f6d57100] frame P:38 Avg QP:16.03 size: 87
[libx264 @ 000001e6f6d57100] frame B:111 Avg QP:24.33 size: 70
[libx264 @ 000001e6f6d57100] consecutive B-frames: 1.3% 0.0% 0.0% 98.7%
[libx264 @ 000001e6f6d57100] mb I I16..4: 1.8% 96.0% 2.2%
[libx264 @ 000001e6f6d57100] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:99.9%
[libx264 @ 000001e6f6d57100] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:21.7% L1:78.3% BI: 0.0%
[libx264 @ 000001e6f6d57100] 8x8 transform intra:96.0% inter:98.7%
[libx264 @ 000001e6f6d57100] coded y intra: 94.7% inter: 0.0%
[libx264 @ 000001e6f6d57100] i16 v,h,dc,p: 24% 37% 5% 34%
[libx264 @ 000001e6f6d57100] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 22% 11% 3% 3% 3% 4% 3% 5%
[libx264 @ 000001e6f6d57100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 79% 9% 2% 1% 2% 1% 4% 1% 1%
[libx264 @ 000001e6f6d57100] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 000001e6f6d57100] Weighted P-Frames: Y:0.0%
[libx264 @ 000001e6f6d57100] ref P L0: 96.6% 0.7% 1.3% 1.3%
[libx264 @ 000001e6f6d57100] ref B L0: 96.9% 2.1% 1.0%
[libx264 @ 000001e6f6d57100] ref B L1: 94.8% 5.2%
[libx264 @ 000001e6f6d57100] kb/s:227.72
[AVIOContext @ 000001e6f6ccb880] Statistics: 32768 bytes read, 0 seeks
您的输入图像只有一个分量通道 - 亮度。大多数播放器处理包含三个分量通道的 H.264 流 - 亮度或 'brightness' (Y) 和两个色度或 'color' (U & V)。当 H.264 编码器对仅亮度流进行编码时,它会使用许多播放器无法很好处理的语法来存储它。因此,我们告诉 ffmpeg 在将其发送到编码器之前添加具有中性值的色度分量(因为源中没有色价)。我们将添加最常见的 YUV 编码形式 - yuv420p。
所以,
ffmpeg -y -loop 1 -framerate 30 -t 5 -i SplashBW.jpg -pix_fmt yuv420p Splash.mp4
我正在使用 FFMPEG 制作由单个黑白 JPG 图像组成的视频:
ffmpeg -y -loop 1 -framerate 30 -t 5 -i SplashBW.jpg Splash.mp4
生成的视频有两个问题:
- 用 VLC 查看时,它有一个绿色色偏
- 用"Film and TV"查看时(我怀疑这是Windows 10 查看器 - MP4 文件的关联似乎已被劫持 在我的电脑上)它有一个绿色的演员和一个主要的闪烁 0.5秒左右。
用 Irfan View 查看时看起来不错。我不知道问题出在原始 JPG、FFMPEG 命令还是查看器上。自然地,我希望它在所有输出上都能正确呈现。
当我打开它们时,下面的前两个 link 在我的浏览器 (Chrome) 中看起来很好。第三个 link 是我尝试使用 Film and TV
app 播放视频时看到的屏幕录像。
screen grab of video playing on my PC
FFMPEG 日志运行:
C:\Users\Raymond\Desktop\Chorus\Videos\Virtual Choir>call ffmpeg -y -loglevel verbose -loop 1 -framerate 30 -t 5 -i SplashBW.jpg Splash.mp4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20200122
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libope
ncore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --
enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuv
id --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[AVIOContext @ 000001e6f6ccdd00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccde80] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6d59b00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccde40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccdf00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6ccdfc0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cce180] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cce240] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd33c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd3480] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd3640] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd3700] Statistics: 159785 bytes read, 0 seeks
Last message repeated 19 times
Input #0, image2, from 'SplashBW.jpg':
Duration: 00:00:00.03, start: 0.000000, bitrate: 38348 kb/s
Stream #0:0: Video: mjpeg (Baseline), 1 reference frame, gray(bt470bg/unknown/unknown, center), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 000001e6f6cd2ec0] w:1920 h:1080 pixfmt:gray tb:1/30 fr:30/1 sar:1/1 sws_param:flags=2
[libx264 @ 000001e6f6d57100] using SAR=1/1
[libx264 @ 000001e6f6d57100] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001e6f6d57100] profile High, level 4.0, 4:0:0, 8-bit
[libx264 @ 000001e6f6d57100] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - 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 chro
ma_me=0 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 weigh
tb=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 'Splash.mp4':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264), 1 reference frame (avc1 / 0x31637661), gray(center), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[AVIOContext @ 000001e6f8b98e00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5980] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeksspeed= 0x
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks1.0kbits/s speed=0.359x
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks0.3kbits/s speed=0.828x
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd51c0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5580] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5840] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks0.2kbits/s speed=1.16x
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
Last message repeated 2 times
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5300] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5440] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5700] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5980] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
Last message repeated 1 times
[AVIOContext @ 000001e6f6cd5040] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd4f00] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5c40] Statistics: 159785 bytes read, 0 seeks
[AVIOContext @ 000001e6f6cd5ac0] Statistics: 159785 bytes read, 0 seeks
No more output streams to write to, finishing.
frame= 150 fps= 51 q=-1.0 Lsize= 142kB time=00:00:04.90 bitrate= 237.8kbits/s speed=1.65x
video:140kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.855892%
Input file #0 (SplashBW.jpg):
Input stream #0:0 (video): 151 packets read (24127535 bytes); 151 frames decoded;
Total: 151 packets (24127535 bytes) demuxed
Output file #0 (Splash.mp4):
Output stream #0:0 (video): 150 frames encoded; 150 packets muxed (143004 bytes);
Total: 150 packets (143004 bytes) muxed
[AVIOContext @ 000001e6f6d59240] Statistics: 2 seeks, 4 writeouts
[libx264 @ 000001e6f6d57100] frame I:1 Avg QP:18.13 size:131209
[libx264 @ 000001e6f6d57100] frame P:38 Avg QP:16.03 size: 87
[libx264 @ 000001e6f6d57100] frame B:111 Avg QP:24.33 size: 70
[libx264 @ 000001e6f6d57100] consecutive B-frames: 1.3% 0.0% 0.0% 98.7%
[libx264 @ 000001e6f6d57100] mb I I16..4: 1.8% 96.0% 2.2%
[libx264 @ 000001e6f6d57100] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:99.9%
[libx264 @ 000001e6f6d57100] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0% L0:21.7% L1:78.3% BI: 0.0%
[libx264 @ 000001e6f6d57100] 8x8 transform intra:96.0% inter:98.7%
[libx264 @ 000001e6f6d57100] coded y intra: 94.7% inter: 0.0%
[libx264 @ 000001e6f6d57100] i16 v,h,dc,p: 24% 37% 5% 34%
[libx264 @ 000001e6f6d57100] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 22% 11% 3% 3% 3% 4% 3% 5%
[libx264 @ 000001e6f6d57100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 79% 9% 2% 1% 2% 1% 4% 1% 1%
[libx264 @ 000001e6f6d57100] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 000001e6f6d57100] Weighted P-Frames: Y:0.0%
[libx264 @ 000001e6f6d57100] ref P L0: 96.6% 0.7% 1.3% 1.3%
[libx264 @ 000001e6f6d57100] ref B L0: 96.9% 2.1% 1.0%
[libx264 @ 000001e6f6d57100] ref B L1: 94.8% 5.2%
[libx264 @ 000001e6f6d57100] kb/s:227.72
[AVIOContext @ 000001e6f6ccb880] Statistics: 32768 bytes read, 0 seeks
您的输入图像只有一个分量通道 - 亮度。大多数播放器处理包含三个分量通道的 H.264 流 - 亮度或 'brightness' (Y) 和两个色度或 'color' (U & V)。当 H.264 编码器对仅亮度流进行编码时,它会使用许多播放器无法很好处理的语法来存储它。因此,我们告诉 ffmpeg 在将其发送到编码器之前添加具有中性值的色度分量(因为源中没有色价)。我们将添加最常见的 YUV 编码形式 - yuv420p。
所以,
ffmpeg -y -loop 1 -framerate 30 -t 5 -i SplashBW.jpg -pix_fmt yuv420p Splash.mp4