0

I have one command which has some issues. if one video have shorted length then second video. first video will pause and second will continue to play. other issue is that this command is very slow

ffmpeg -i vid1.mp4 -i Vid2.mp4 -filter_complex "[1:0] setsar=sar=1,format=rgba [1sared]; [0:0]format=rgba [0rgbd]; [0rgbd][1sared]blend=all_mode='addition':repeatlast=1:all_opacity=1,format=yuva422p10le" -c:v libx264 -preset slow -tune film -crf 19 -c:a aac -shortest result.mp4

1 Answer 1

0

if one video have shorted length then second video. first video will pause and second will continue to play

Replace repeatlast=1 with shortest=1.

ffmpeg -h filter=blend
[...]
framesync AVOptions:
  eof_action        <int>        ..FV..... Action to take when encountering EOF from secondary input  (from 0 to 2) (default repeat)
     repeat                       ..FV..... Repeat the previous frame.
     endall                       ..FV..... End both streams.
     pass                         ..FV..... Pass through the main input.
  shortest          <boolean>    ..FV..... force termination when the shortest input terminates (default false)
  repeatlast        <boolean>    ..FV..... extend last frame of secondary streams beyond EOF (default true)

this command is very slow

Use a faster x264 preset.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .