gpt4 book ai didi

FFMPEG - 最新版本不起作用,早期版本可以

转载 作者:行者123 更新时间:2023-12-04 23:12:35 25 4
gpt4 key购买 nike

我一直在使用 FFMPEG 在视频上叠加彩色矩形。我更新了 FFMPEG,但它不再有效。没有发出错误,它只是不能完成工作 - 生成的视频与输入视频相同。这是脚本:

FFMpeg -y -i Input.mp4 -filter_complex \
"nullsrc=size=1920x1080, \
drawbox=x=200:y=100:w=300:h=150:t=20:c=yellow, fade=in:st=10:d=1:alpha=1, fade=out:st=20:d=2:alpha=1 [tmp1]; \
nullsrc=size=1920x1080, \
drawbox=x=240:y=140:w=300:h=150:t=20:c=red, fade=in:st=15:d=1:alpha=1, fade=out:st=25:d=2:alpha=1 [tmp2]; \
[tmp1][tmp2] overlay=0:0:shortest=1[tmp3]; \
[0:v][tmp3] overlay=0:0:shortest=1" \
Output.mp4
输出视频应该是输入视频,黄色矩形从 T=10 添加到 T=20,红色矩形从 T=15 添加到 T=25,淡入淡出。
正在运行的版本 (3.4) 是 ImageMagick 安装附带的版本。我更新到的版本是 4.2.3。我在我周围的各种其他版本上尝试过它,它只适用于 3.4。
这似乎不太可能是回归,所以我没有提交错误报告。我认为我更有可能没有正确地做某事,而 3.4 对我的命令的解释更为宽松。
无论如何,我更喜欢使用当前版本,所以我邀请评论可能是什么原因。
3.4 运行的控制台转储
ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --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-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:01:48.67, start: 0.000000, bitrate: 1693 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1562 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 (h264) -> overlay:main (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001f0d4a0e6a0] using SAR=1/1
[libx264 @ 000001f0d4a0e6a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001f0d4a0e6a0] profile High, level 4.0
[libx264 @ 000001f0d4a0e6a0] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - 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 'Output-34.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc57.107.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.107.100 aac
frame= 3260 fps= 25 q=-1.0 Lsize= 21461kB time=00:01:48.56 bitrate=1619.3kbits/s speed=0.828x
video:19713kB audio:1634kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.534457%
[libx264 @ 000001f0d4a0e6a0] frame I:14 Avg QP:17.68 size:208205
[libx264 @ 000001f0d4a0e6a0] frame P:844 Avg QP:21.55 size: 16867
[libx264 @ 000001f0d4a0e6a0] frame B:2402 Avg QP:28.40 size: 1263
[libx264 @ 000001f0d4a0e6a0] consecutive B-frames: 0.7% 2.9% 0.4% 96.0%
[libx264 @ 000001f0d4a0e6a0] mb I I16..4: 14.0% 39.6% 46.4%
[libx264 @ 000001f0d4a0e6a0] mb P I16..4: 0.4% 0.7% 0.2% P16..4: 20.2% 9.1% 4.6% 0.0% 0.0% skip:64.8%
[libx264 @ 000001f0d4a0e6a0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 12.4% 0.4% 0.1% direct: 0.1% skip:87.1% L0:42.9% L1:55.2% BI: 1.9%
[libx264 @ 000001f0d4a0e6a0] 8x8 transform intra:45.2% inter:68.3%
[libx264 @ 000001f0d4a0e6a0] coded y,uvDC,uvAC intra: 64.4% 81.6% 45.1% inter: 2.9% 4.2% 0.1%
[libx264 @ 000001f0d4a0e6a0] i16 v,h,dc,p: 32% 26% 6% 37%
[libx264 @ 000001f0d4a0e6a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 20% 15% 5% 6% 7% 7% 7% 8%
[libx264 @ 000001f0d4a0e6a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 28% 8% 4% 6% 6% 6% 5% 5%
[libx264 @ 000001f0d4a0e6a0] i8c dc,h,v,p: 37% 25% 28% 10%
[libx264 @ 000001f0d4a0e6a0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001f0d4a0e6a0] ref P L0: 70.4% 15.3% 10.8% 3.5%
[libx264 @ 000001f0d4a0e6a0] ref B L0: 93.1% 6.0% 0.9%
[libx264 @ 000001f0d4a0e6a0] ref B L1: 97.8% 2.2%
[libx264 @ 000001f0d4a0e6a0] kb/s:1486.03
[aac @ 000001f0d4a10a20] Qavg: 1586.609
和 4.2.3
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200523
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-libopencore-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-cuvid --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
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:01:48.67, start: 0.000000, bitrate: 1693 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1562 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 (h264) -> overlay:main (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001e7b4531d40] using SAR=1/1
[libx264 @ 000001e7b4531d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001e7b4531d40] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 000001e7b4531d40] 264 - core 160 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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 'Output-423.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc58.54.100 aac
frame= 3260 fps= 28 q=-1.0 Lsize= 21425kB time=00:01:48.56 bitrate=1616.7kbits/s speed=0.917x
video:19686kB audio:1625kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.535352%
[libx264 @ 000001e7b4531d40] frame I:14 Avg QP:17.68 size:208355
[libx264 @ 000001e7b4531d40] frame P:844 Avg QP:21.54 size: 16838
[libx264 @ 000001e7b4531d40] frame B:2402 Avg QP:28.43 size: 1261
[libx264 @ 000001e7b4531d40] consecutive B-frames: 0.7% 2.9% 0.4% 96.0%
[libx264 @ 000001e7b4531d40] mb I I16..4: 13.9% 39.7% 46.4%
[libx264 @ 000001e7b4531d40] mb P I16..4: 0.4% 0.7% 0.2% P16..4: 20.2% 9.1% 4.6% 0.0% 0.0% skip:64.8%
[libx264 @ 000001e7b4531d40] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 12.4% 0.4% 0.1% direct: 0.1% skip:87.1% L0:42.9% L1:55.2% BI: 1.9%
[libx264 @ 000001e7b4531d40] 8x8 transform intra:45.3% inter:68.3%
[libx264 @ 000001e7b4531d40] coded y,uvDC,uvAC intra: 65.2% 82.4% 45.8% inter: 2.9% 4.2% 0.1%
[libx264 @ 000001e7b4531d40] i16 v,h,dc,p: 32% 24% 6% 38%
[libx264 @ 000001e7b4531d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 19% 14% 5% 6% 7% 7% 7% 8%
[libx264 @ 000001e7b4531d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 28% 8% 4% 6% 6% 6% 5% 5%
[libx264 @ 000001e7b4531d40] i8c dc,h,v,p: 37% 24% 28% 11%
[libx264 @ 000001e7b4531d40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001e7b4531d40] ref P L0: 70.4% 15.3% 10.8% 3.5%
[libx264 @ 000001e7b4531d40] ref B L0: 93.1% 6.0% 0.9%
[libx264 @ 000001e7b4531d40] ref B L1: 97.8% 2.2%
[libx264 @ 000001e7b4531d40] kb/s:1483.98
[aac @ 000001e7b47fa800] Qavg: 1462.566

最佳答案

drawbox 过滤器中存在一个错误,即源 alpha 像素将替换为 drawbox 颜色的 alpha(通常是不透明的),而不是保留或混合它。你的命令依赖于剩下的情况,但我在 3.4 系列之后改变了它,所以你现在必须告诉 drawbox 替换框像素的 alpha。
所以,

drawbox=x=200:y=100:w=300:h=150:t=20:c=yellow:replace=1
drawbox=x=240:y=140:w=300:h=150:t=20:c=red:replace=1

关于FFMPEG - 最新版本不起作用,早期版本可以,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62495108/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com