On Wed, 4 May 2022 at 08:27, Bo Berglund <bo.bergl...@gmail.com> wrote:
> I have a script that downloads a video live stream into a mp4 file while on 
> the
> fly changing the format, basically re-encoding the video.
> It uses this basic download command:
>
> CMD="ffmpeg -hide_banner ${MODE} -i \"${M3U8URL}\" -vf scale=w=-4:h=480 -c:v
> libx264 -preset fast -crf 26 -c:a copy -t $DIFF $TARGETFILE"
> [...]
> I had expected the concatenated file to be a combination of the two sections
> with no real problems but it turns out that the audio is completely out of 
> sync
> in the output. Looks like by a *LOT*.
> [...]
> Grateful for any suggestions on what I can do!

Without the console output my suggestion would be: re-encode the audio
portion as well in your first step. (-c:a aac or similar)

I've run into similar desync issues when concat-ing half reencoded
segments, so now if I'm re-encoding video I re-encode audio too.

HTH,
Rob
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to