[FFmpeg-user] concatenating files in FFMPEG causing the wrong file length

Philip Orrill philip.orrill at outlook.com
Wed Oct 7 19:00:12 EEST 2020

Thanks a lot for the details. 
I am busy with some other bits at the moment but will look at this a bit
later and give it a go.

I posted this not expecting to hear back this quick.

I do seem to have some commands that seem to fix the timing on the video
(but the audio gets muddled).

If this patch fixes it then I might not need this. I just want to sanity
check my understanding.

My fix that seems to work for video is to run this on each segment:

*-y -r {fps} -use_wallclock_as_timestamps 1 -i {video} -vf scale=1920:-1 -r
{fps} -c:a copy*

My understanding is this tells the segment how many fps should be on the
input and resets the timestamps. The output will then set the scale and
regenerate the file to be the expected fps.

When this is run on all the files and then concatenated it seems to be the
expected result.

I don't know if this actually changes the pts and if this will be a "full
fix" or if this is more putting a plaster over the issue.

If I can get your suggestion running and it works then that would be a much
cleaner result.

Sent from: http://www.ffmpeg-archive.org/

More information about the ffmpeg-user mailing list