ffmpeg -i 1_.mp4 -i 2_.mp4 -filter_complex \
"[0:v]setpts=PTS-STARTPTS, pad=640:480 [bg]; \
[1:v]setpts=PTS-STARTPTS ,scale=320*240 [fg] ; [bg][fg]overlay=0" output.mp4
[bg][fg]=宣告變數
[bg]=[0:v]setpts=PTS-STARTPTS, pad=640:480
使用" "做開頭結尾
try to mix audio
ffmpeg -i 1_.mp4 -i 2_.mp4 -filter_complex \
"[0:v]setpts=PTS-STARTPTS, pad=640:480 [bg]; \
[1:v]setpts=PTS-STARTPTS ,scale=320*240 [fg];[bg][fg]overlay=0 ; [0:a][1:a]amix=inputs=2:duration=first:dropout_transition=3" output.mp4