[FFmpeg-user] Concatenating video cuts - audio gets out of sync...

Bo Berglund bo.berglund at gmail.com
Wed Dec 15 15:14:40 EET 2021


On Wed, 15 Dec 2021 13:45:13 +0100, Michael Koch <astroelectronic at t-online.de>
wrote:

>You could remove -c copy, but that makes the process much slower.
>
>Are you sure that all input videos have the same properties? Same size, 
>video codec, framerate, audio codec, number of audio tracks, audio 
>sample rate?

They are downloaded using the same ffmpeg download command which sets the video
size to 480p, like this (variables are set appropriately in the script):

ffmpeg -hide_banner -referer \"${VIDEOURL}\" -i \"${VIDEOSTR}\" -vf
scale=w=-4:h=480 -c:v libx264 -preset fast -crf 26 -c:a copy -t ${CAPTURETIME}
${TARGETFILE}

Then I use a tool I have created to extract the clips from these downloads and
paste them together. This has always worked.

Sometimes I need to join two clips from the same source but downloaded on
different computers using the same download script.

This is when I see this problem (but only sometimes)...

I have been able to paste clips from these downloads earlier but since it failed
today I thought that there might be a better ffmpeg command to do it..

Maybe the download script should have some specific command to handle the audio
part?
The VIDEOSTR variable refers to an m3u8 stream URL.

-- 
Bo Berglund
Developer in Sweden



More information about the ffmpeg-user mailing list