我有這兩個代碼,分別可以正常工作
ffmpeg -i in.mp4 -filter_complex "drawtext=fontfile=Lato-Light.ttf:text='TEXT':fontsize=60:fontcolor=white:alpha='if(lt(t,2),0,if(lt(t,4),(t-2)/2,if(lt(t,11),1,if(lt(t,13),(2-(t-11))/2,0))))':x=(w-text_w)/2:y=h-th-20,pad=width=ceil(iw/2)*2:height=ceil(ih/2)*2" out.mp4
ffmpeg -i in.mp4 -filter_complex "[0:v]fade=type=in:duration=2,fade=type=out:duration=2:start_time=16[v];[0:a]afade=type=in:duration=2,afade=type=out:duration=2:start_time=16[a]" -map "[v]" -map "[a]" out.mp4
你能告訴我如何將兩者結合在一個指令中嗎?我已經嘗試了一切,但找不到任何可以幫助我的教學或範例
謝謝
答案1
組合命令:
ffmpeg -i in.mp4 -filter_complex "drawtext=fontfile=Lato-Light.ttf:text='TEXT':fontsize=60:fontcolor=white:alpha='if(lt(t,2),0,if(lt(t,4),(t-2)/2,if(lt(t,11),1,if(lt(t,13),(2-(t-11))/2,0))))':x=(w-text_w)/2:y=h-th-20,pad=width=ceil(iw/2)*2:height=ceil(ih/2)*2,fade=type=in:duration=2,fade=type=out:duration=2:start_time=16;afade=type=out:duration=2:start_time=16" out.mp4