I am merging two mp4 files using hstack. I am using amix to merge the audio. Everything works perfectly.
Now I want that the hstacked videos should play sequentially, that is one after the other. Here is what I have done
ffmpeg -i left.mp4 -i right.mp4 -filter_complex [0:v]setpts=PTS-STARTPTS[l]; [1:v]setpts=PTS-STARTPTS+14/TB[r]; [l][r]hstack=inputs=2[stacked]; [0:a][1:a]amix=inputs=2[a] -map [stacked] -map [a] -c:a aac -preset superfast result.mp4
In the above example, I tried to delay the play back of the video on the right by 14 seconds (which happens to be the length of the left video). In essence I want the left video to play first and after it finishes the left video should play.
What I am getting instead from the command is, the left video remains still for 14 seconds with only displaying the first frame (the audio plays) and after 14 seconds the right video plays.
I am at my wits end trying to figure it out. What am I doing wrong ?