[FFmpeg-devel] [External Sender] Re: [PATCH] fftools/ffmpeg_enc: Prevent duplicate A53 Closed Captions at frame rate up-conversion
devin.heitmueller at ltnglobal.com
Tue Jun 13 17:11:42 EEST 2023
On Fri, Jun 9, 2023 at 12:33 PM Artem Smorodin
<artem.smorodin at telestream.net> wrote:
> The behavior that adds this patch was there before, but was removed after about 5.1.1, so I think it's safe to restore it until a better solution is implemented.
I have to admit that I'm hesitant about introducing a patch that only
works for upconversion (i.e. if you go from 59.94 to 29.97 you will
lose half the caption data), as well as when it does work it produces
caption blocks which are malformed and will cause issues with some
> Regarding a better solution:
> I don't think we should change the behavior of the "-r" option, instead I suggest moving ccfifo from libavfilter to libavutil and using it in the ffmpeg program.
In my original patch series I actually had the ccfifo stuff as part of
libavutil so it could be shared across the project. However there was
concern about having to maintain a public ABI for a brand new
interface and thus we decided to keep it private for now (and even
with private APIs there is a mechanism to share them across multiple
That said, I hadn't considered the notion of fftools needing access to
it, and I think the general trend has been to move away from fftools
using private APIs.
I suspect we could get "-r" to transparently add the FPS filter to the
end of the filtergraph, just like we do with the vf_scale when users
specify "-s" on the command line. Although this does raise the issues
that Anton raised regarding dropped/duplicated frames.
My inclination would be to tell people "Don't use '-r' if you care
about captions being properly preserved. Use '-vf fps' instead." But
I recognize that there are plenty of people who won't know the
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com e: devin.heitmueller at ltnglobal.com
More information about the ffmpeg-devel