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

Bo Berglund bo.berglund at gmail.com
Fri Dec 17 12:17:36 EET 2021


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

>> 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.

I am downloading the *same* content using the command above but from 3 different
locations.

Sometimes there are disturbances in the feed from the main location and then I
want to clip up until the disturbance and paste in the continuation from another
of the sites.

This mostly works fine; always for video but sometimes not for audio.

Then the audio gets totally wrecked, like about 30 seconds or so off sync
following the clip paste point....

Can I modify the above command to ensure that audio gets a specific format like
the video argument does?
( -vf scale=w=-4:h=480 -c:v libx264 -preset fast -crf 26 )

During the actual download there is time to do these things since it is
happening in real time...


-- 
Bo Berglund
Developer in Sweden



More information about the ffmpeg-user mailing list