我有这段代码,在视频的两个不同部分中添加了两个具有相同效果/持续时间的重叠文本。
-i "input.mp4" -filter_complex "color=black:100x100,format=yuva444p[c];[c][0]scale2ref[ct][mv0]; [ct]setsar=1,split=2[t1][t2]; [t1]drawtext=fontfile=Arial.ttf:text='Pippo':fontcolor=white:fontsize=32:box=1: boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2 - 20,fade=t=in:st=6:d=2:alpha=1,fade=t=out:st=19:d=2:alpha=1[txta1];[t2]drawtext=fontfile=Arial.ttf:text='Topolino':fontcolor=white:fontsize=32:box=1: boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2 + 20,fade=t=in:st=6:d=2:alpha=1,fade=t=out:st=19:d=2:alpha=1[txta2];[mv0][txta1]overlay=0:0:shortest=1[mv1];[mv1][txta2]overlay=0:0:shortest=1" "output.mp4"
为什么第二个文本“ Topolino
”从淡入到淡出效果完美。
第一个文本(“ Pippo
”)出现并立即消失。
它们具有相同的效果,所以我在做什么错了?
谢谢
编辑:添加了输出
错误:ffmpeg版本N-90893-gcae6f806a6版权所有(c)2000-2018 FFmpeg开发人员
错误:使用gcc 7.3.0(GCC)构建
错误:配置:--enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --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
错误:libavutil 56. 17.100 / 56. 17.100
错误:libavcodec 58. 19.100 / 58. 19.100
错误:libavformat 58. 13.100 / 58. 13.100
错误:libavdevice 58. 4.100 / 58. 4.100
错误:libavfilter 7. 21.100 / 7. 21.100
错误:libswscale 5. 2.100 / 5. 2.100
错误:libswresample 3. 2.100 / 3. 2.100
错误:libpostproc 55. 2.100 / 55. 2.100
错误:从'D:\ AREA \ video.mp4'输入#0,mov,mp4,m4a,3gp,3g2,mj2:
错误:元数据:
错误:major_brand:isom
错误:minor_version:512
错误:compatible_brands:isomiso2avc1mp41
错误:编码器:Lavf58.13.100
错误:持续时间:00:02:12.50,开始:0.000000,比特率:3149 kb / s
错误:流#0:0(und):视频:h264(高)(avc1 / 0x31637661), yuv420p(tv,bt709),1024x600 [SAR 1:1 DAR 128:75],3014 kb / s,24 fps, 24吨,19200吨,50吨(默认)
错误:元数据:
错误:handler_name:VideoHandler
错误:时间码:00:00:00:00
错误:流#0:1(und):音频:aac(LC)(mp4a / 0x6134706D), 44100 Hz,立体声,fltp,129 kb / s(默认)
错误:元数据:
错误:handler_name:SoundHandler
错误:流#0:2(eng):数据:无(tmcd / 0x64636D74)
错误:元数据:
错误:handler_name:TimeCodeHandler
错误:时间码:00:00:00:00
错误:Fontconfig错误:无法加载默认配置文件
错误:[Parsed_drawtext_5 @ 000002a7c251ea00]使用 “ C:/WINDOWS/fonts/mingliub.ttc”
错误:Fontconfig错误:无法加载默认配置文件
错误:[Parsed_drawtext_8 @ 000002a7c2c52a00]使用 “ C:/WINDOWS/fonts/mingliub.ttc”
错误:流映射:
错误:流#0:0(h264)-> scale2ref:ref(图0)
错误:覆盖(图0)->流#0:0(libx264)
错误:流#0:1->#0:1(AAC(本地)-> AAC(本地))
错误:按[q]停止,按[?]寻求帮助
错误:Fontconfig错误:无法加载默认配置文件
错误:[Parsed_drawtext_5 @ 000002a7c3e6aec0]使用 “ C:/WINDOWS/fonts/mingliub.ttc”
错误:Fontconfig错误:无法加载默认配置文件
错误:[Parsed_drawtext_8 @ 000002a7c3e6ac80]使用 “ C:/WINDOWS/fonts/mingliub.ttc”
错误:使用SAR = 1/1的[libx264 @ 000002a7c2a9d800]
错误:使用CPU功能的[libx264 @ 000002a7c2a9d800]:MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
错误:[libx264 @ 000002a7c2a9d800]配置文件高级,级别3.1
错误:[libx264 @ 000002a7c2a9d800] 264-核心155 r2901 7d0ff22- H.264 / MPEG-4 AVC编解码器-Copyleft 2003-2018- http://www.videolan.org/x264.html-选项:cabac = 1 ref = 3 deblock = 1:0:0分析= 0x3:0x113 me =十六进制subme = 7 psy = 1 psy_rd = 1.00:0.00 mixed_ref = 1 me_range = 16 chroma_me = 1格子= 1 8x8dct = 1 cqm = 0 死区= 21,11 fast_pskip = 1 chroma_qp_offset = -2线程= 12 lookahead_threads = 2 sliced_threads = 0 nr = 0抽取= 1隔行扫描= 0 bluray_compat = 0 constrained_intra = 0 bframes = 3 b_pyramid = 2 b_adapt = 1 b_bias = 0直接= 1重量b = 1 open_gop = 0重量p = 2 keyint = 250 keyint_min = 24 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
错误:输出#0,mp4到'D:\ AREA \ output_text.mp4':
错误:元数据:
错误:major_brand:isom
错误:minor_version:512
错误:compatible_brands:isomiso2avc1mp41
错误:编码器:Lavf58.13.100
错误:流#0:0:视频:h264(libx264)(avc1 / 0x31637661), yuv420p,1024x600 [SAR 1:1 DAR 128:75],q = -1--1、24 fps,12288 tbn,24 tbc(默认)
错误:元数据:
错误:编码器:Lavc58.19.100 libx264
错误:辅助数据:
错误:cpb:最大/最小/平均比特率:0/0/0缓冲区大小:0 vbv_delay: -1
错误:流#0:1(und):音频:aac(LC)(mp4a / 0x6134706D), 44100 Hz,立体声,fltp,128 kb / s(默认)
错误:元数据:
错误:handler_name:SoundHandler
错误:编码器:Lavc58.19.100 aac
错误:帧= 61 fps = 0.0 q = 28.0大小= 0kB时间= 00:00:02.83 比特率= 0.1kbits / s速度= 5.65x
错误:帧= 137 fps = 136 q = 28.0大小= 0kB时间= 00:00:05.99 比特率= 0.1kbits / s速度= 5.94x
[...]
错误:帧= 3180 fps = 88 q = -1.0 Lsize = 16533kB时间= 00:02:12.51 比特率= 1022.0kbits / s速度= 3.65x
错误:视频:14352kB音频:2080kB字幕:0kB其他流:0kB 全局标头:0kB混合开销:0.611671%
错误:[libx264 @ 000002a7c2a9d800]帧I:14平均QP:17.18大小: 42960
错误:[libx264 @ 000002a7c2a9d800]帧P:1170平均QP:20.09大小: 9916
错误:[libx264 @ 000002a7c2a9d800]帧B:1996年平均QP:21.54尺寸: 1249
错误:[libx264 @ 000002a7c2a9d800]连续B帧:3.3%38.3% 2.5%56.0%
错误:[libx264 @ 000002a7c2a9d800] MB I I..4:27.0%61.1%11.8%
错误:[libx264 @ 000002a7c2a9d800] MB P I16..4:4.3%5.8%0.3% P16..4:34.6%9.8%7.3%0.0%0.0%跳:38.0%
错误:[libx264 @ 000002a7c2a9d800] MB B I16..4:0.3%0.5%0.0% B16..8:19.5%0.9%0.1%直接:2.0%跳过:76.6%L0:39.8%L1:55.2% BI:5.0%
错误:[libx264 @ 000002a7c2a9d800] 8x8转换帧内:57.0% 内部:84.0%
错误:[libx264 @ 000002a7c2a9d800]编码为y,uvDC,uvAC内部:33.3% 65.4%24.9%内部:10.4%17.5%2.4%
错误:[libx264 @ 000002a7c2a9d800] i16 v,h,dc,p:59%17%12%13%
错误:[libx264 @ 000002a7c2a9d800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:35% 15%33%2%3%3%3%3%2%
错误:[libx264 @ 000002a7c2a9d800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:36% 18%13%4%6%7%6%6%4%
错误:[libx264 @ 000002a7c2a9d800] i8c dc,h,v,p:52%17%24%7%
错误:[libx264 @ 000002a7c2a9d800]加权P帧:Y:29.0% 紫外线:17.2%
错误:[libx264 @ 000002a7c2a9d800]引用P L0:65.1%15.7%14.5%4.3% 0.5%
错误:[libx264 @ 000002a7c2a9d800]参考B L0:89.7%8.2%2.1%
错误:[libx264 @ 000002a7c2a9d800]参考B L1:98.1%1.9%
错误:[libx264 @ 000002a7c2a9d800] kb / s:887.30
错误:[aac @ 000002a7c24a6e00]问题:179.786
错误: