VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Hello,

    I have a weird situation going on where video inputs are getting reversed when combining 2 different mp4s of a user who was disconnected in a meeting.

    The person was disconnected because of a momentary internet outage.

    video1 is the first video of the user before the disconnect.

    video2 is the second video after the user reconnected.

    Again the issue is that I expect the new video to play video1 followed by video2 but that is not what is happening here. video2 plays followed by video1.

    video 1 has a start time offset of 465013 and a stop time offset of 646003.

    video 2 has a start time offset of 975433 and a stop time offset of 4300863.


    Code:
    ffmpeg \
    -loop 1 -framerate 30 -t 465.013 -i /assets/img/filler640480.jpg -i video1.mp4 -y \
    -loop 1 -framerate 30 -t 329.43 -i /assets/img/filler640480.jpg -i video2.mp4 -y \
    -f lavfi -t 0.1 -i anullsrc=channel_layout=mono:sample_rate=48000 \
    -filter_complex " [0:v]scale=640:480,setsar=1[v0];[1:v]scale=640:480,setsar=1[v1];[2:v]scale=640:480,setsar=1[v2];[3:v]scale=640:480,setsar=1[v3];[v0][4:a][v1][1:a][v2][4:a][v3][3:a]concat=n=4:v=1:a=1" -vsync 2 -vcodec libx264 -pix_fmt yuv420p user1-camera-grid.mp4
    I know a simple solution would be to just reverse the inputs, but this is an automated process so I am trying to understand how the inputs need to work so I can adjust my scripts. Also, the person could be disconnected more than once.
    Quote Quote  
  2. Never tried this, but looking at https://trac.ffmpeg.org/wiki/Concatenate I would have expected there to be some mapping ('-map') after the concatenation,.. so that might be something to try. (also have you tried using '-vsync drop' instead of '-vsync 2' ?)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!