[FFmpeg-user] concat filter

Leo Butler leo.butler81 at googlemail.com
Mon Jul 4 18:04:24 EEST 2022


I am transcoding recordings using the concat filter. A problem that
occurs from time-to-time is that the broadcaster switches the width
and/or height in the middle of a broadcast. That ends up causing an
error with the concat filter.

The only way that I can think of to handle this issue is to:

1. use ffprobe to check each packet's width and height;
2. if one changes, then put a scale filter on each video stream before
passing it to the concat filter.

I already run ffprobe before transcoding, so step 1 is only a minor
inconvenience. Similarly, step 2 is only a minor inconvenience. But,
these glitches happen rarely (I think maybe 4-5 times in the last 2-3
years, with around 1000 files a years), so testing is going to be pretty

Question: Is there a better way to sidestep the problem of changing
width or height? e.g. does ffmpeg already have a way to handle width or
height changes?


More information about the ffmpeg-user mailing list