[FFmpeg-devel] [PATCH 4/4] avformat/mxfenc: add some missing content package rates

Tomas Härdin tjoppen at acc.umu.se
Mon Mar 2 19:30:46 EET 2020


fre 2020-02-28 klockan 10:30 +0100 skrev Marton Balint:
> 
> On Fri, 28 Feb 2020, Carl Eugen Hoyos wrote:
> 
> > Am Fr., 28. Feb. 2020 um 01:38 Uhr schrieb Marton Balint <cus at passwd.hu>:
> > > Fixes ticket #8523.
> > > 
> > > Signed-off-by: Marton Balint <cus at passwd.hu>
> > > ---
> > >  libavformat/mxf.c | 13 +++++++++++++
> > >  1 file changed, 13 insertions(+)
> > > 
> > > diff --git a/libavformat/mxf.c b/libavformat/mxf.c
> > > index 14056647c5..987410258a 100644
> > > --- a/libavformat/mxf.c
> > > +++ b/libavformat/mxf.c
> > > @@ -135,10 +135,23 @@ static const MXFContentPackageRate mxf_content_package_rates[] = {
> > >      {  2, { 1,    24    } },
> > >      {  3, { 1001, 24000 } },
> > >      {  4, { 1,    25    } },
> > > +    {  6, { 1,    30    } },
> > >      {  7, { 1001, 30000 } },
> > > +    {  8, { 1   , 48    } },
> > > +    {  9, { 1001, 48000 } },
> > >      { 10, { 1,    50    } },
> > >      { 12, { 1,    60    } },
> > >      { 13, { 1001, 60000 } },
> > > +    { 14, { 1,    72    } },
> > > +    { 15, { 1001, 72000 } },
> > > +    { 16, { 1,    75    } },
> > > +    { 18, { 1,    90    } },
> > > +    { 19, { 1001, 90000 } },
> > > +    { 20, { 1,    96    } },
> > > +    { 21, { 1001, 96000 } },
> > > +    { 22, { 1,    100   } },
> > > +    { 24, { 1,    120   } },
> > > +    { 25, { 1001, 120000} },
> > 
> > Are these still the only supported frame rates?
> 
> These are the *package* rates that SMPTE 326M defines (technically it 
> defines the /1.001 version of 25, 50, 75 and 100 fps, but those are not 
> used).

For the record, this is section 7.2 Content package rate in SMPTE 326M-
2000. What is not initially obvious is that mxf_content_package_rates-
>rate is bits b5..b0. A comment about this would be nice, I don't like
magical tables in the MXF codebase not being justified by references :)

You could technically have 25/1.001, 50/1.001, 75/1.001 and 100/1.001
too. But it's probably wise not to do that.

> > How do archivists store low-fps film in mxf?
> 
> I don't know. One can write an undefined package rate into the file, or 
> the frame rate can may be different from package rate. You can put almost 
> anything into MXF, the only problem is that it will not be widely 
> supported or readable.

Like Marton says, MXF allows anything. In practice everyone uses a
small set of profiles of MXF. No one attempts to support all of MXF,
that way lies madness.

/Tomas



More information about the ffmpeg-devel mailing list