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

Michael Koch astroelectronic at t-online.de
Wed Dec 15 15:23:23 EET 2021


Am 15.12.2021 um 14:14 schrieb Bo Berglund:
> 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}

That means the audio codec, number of audio tracks and audio sample rate 
could be different.
You should check those videos that don't fit together with ffprobe.

Michael



More information about the ffmpeg-user mailing list