ffmpeg附加不同尺寸的视频

问题描述 投票:0回答:1

我正在使用以下内容裁剪视频并为视频添加字幕:

ffmpeg -i inputfile.mov -lavfi "crop=720:720:280:360,subtitles=subs.srt:force_style='OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,MarginV=20,Fontsize=18'" -crf 1 -c:a copy output.mov

我还有一个名为credits.mp4的视频,其尺寸与output.mov相同(裁剪后)。我可以在上述过程中执行此操作,还是在此后使用concat之类的方法?

在Mac上的Terminal中使用bash

bash macos ffmpeg terminal concat
1个回答
0
投票

使用concat filter

ffmpeg -i inputfile.mov -i credits.mp4 -lavfi "[0]crop=720:720:280:360,subtitles=subs.srt:force_style='OutlineColour=&H100000000,BorderStyle=3,Outline=1,Shadow=0,MarginV=20,Fontsize=18',setpts=PTS-STARTPTS[v0];[1]setpts=PTS-STARTPTS[v1];[v0][0:a][v1][1:a]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" output.mp4

因为没有提供有关您输入的信息,所以我作了一些假设:

© www.soinside.com 2019 - 2024. All rights reserved.