[FFmpeg-devel] [PATCH] Remove extensions from MPEG-PS muxers.

Michael Niedermayer michaelni at gmx.at
Sun Nov 17 22:27:49 CET 2013


On Sun, Nov 17, 2013 at 05:18:19PM +0100, Reimar Döffinger wrote:
> On Sun, Nov 17, 2013 at 05:10:14PM +0100, Michael Niedermayer wrote:
> > On Sun, Nov 17, 2013 at 04:30:34PM +0100, Reimar Döffinger wrote:
> > > On Sun, Nov 17, 2013 at 04:18:27PM +0100, Michael Niedermayer wrote:
> > > > On Sun, Nov 17, 2013 at 01:25:32PM +0100, Reimar Döffinger wrote:
> > > > > diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
> > > > > index 0a9d69b..3c6cef2 100644
> > > > > --- a/libavformat/mpegenc.c
> > > > > +++ b/libavformat/mpegenc.c
> > > > > @@ -1173,7 +1173,6 @@ AVOutputFormat ff_mpeg1system_muxer = {
> > > > >      .name              = "mpeg",
> > > > >      .long_name         = NULL_IF_CONFIG_SMALL("MPEG-1 Systems / MPEG program stream"),
> > > > >      .mime_type         = "video/mpeg",
> > > > > -    .extensions        = "mpg,mpeg",
> > > > >      .priv_data_size    = sizeof(MpegMuxContext),
> > > > >      .audio_codec       = AV_CODEC_ID_MP2,
> > > > >      .video_codec       = AV_CODEC_ID_MPEG1VIDEO,
> > > > > @@ -1204,7 +1203,6 @@ AVOutputFormat ff_mpeg2vob_muxer = {
> > > > >      .name              = "vob",
> > > > >      .long_name         = NULL_IF_CONFIG_SMALL("MPEG-2 PS (VOB)"),
> > > > >      .mime_type         = "video/mpeg",
> > > > > -    .extensions        = "vob",
> > > > >      .priv_data_size    = sizeof(MpegMuxContext),
> > > > >      .audio_codec       = AV_CODEC_ID_MP2,
> > > > >      .video_codec       = AV_CODEC_ID_MPEG2VIDEO,
> > > > 
> > > > breaks fate and any script that encodes mpeg ps, dvds, .vob, .mpg
> > > 
> > > As far as I can tell rather "fixes any script that encodes dvds".
> > > Going by the description I concluded this muxer isn't suitable for
> > > creating vobs for DVDs, which is why I propose removing the extension,
> > > considering it _preferable_ to break those scripts to having them
> > > continue produce bad files, even though it might have worked...
> > > I was thinking about moving the extensions, but that would then
> > 
> > > for _some_ people probably break scripts silently and without
> > > warning.
> > 
> > any bugfix could break a script that depended on the bug.
> > Do we have any evidence that such a script exists ?
> > our docs mention .vob primarely in relation to dvds
> > 
> > 
> > > What else could/should be done?
> > 
> > i honestly dont know but
> > 
> > ffmpeg myfile this.vob
> > and
> > make fate
> > should not fail
> > 
> > and IMHO "ffmpeg myfile this.vob" failing because we once had a
> > unintended and undocumented issue with vob that someone might have had
> > a script based upon seems especially in the long term bad
> 
> I don't disagree, but didn't feel confident making that call.
> Do you have any opinion on the .mpg/.mpeg case?
> To be honest I was wondering why we map it to MPEG-PS, do you know?
> It seems to me that nowadays MPEG-TS is probably more flexible and more
> common, but I'm very far from an expert on that...

some statistics from random files from my disk

.mpg:
     16 0 video, CIF PAL,
     10 0 video, , Constrained
      2 2 video, CIF PAL,
      2 3,
      1 3, 29.
      1 ASCII text
      7 ASCII text, with CRLF line terminators
     48 data
      1 empty
     17 ISO Media, MPEG v4 system, version 2
      1 MPEG ADTS, AAC, v4 LC, ,
      1 MPEG ADTS, layer III, v1,  , ,
      9 MPEG ADTS, layer III, v1, , ,
      3 MPEG ADTS, layer III, v2,   , ,
      3 MPEG ADTS, layer III, v2,  , ,
      3 MPEG ADTS, layer III, v2, , ,
      4 MPEG ADTS, layer III,  v2.5,   , ,
     12 MPEG ADTS, layer III,  v2.5,  , ,
     45 MPEG ADTS, layer II, v1, , ,
      2 MPEG ADTS, layer II, v2,   , ,
     10 MPEG ADTS, layer II, v2,  , ,
      6 MPEG ADTS, layer II, v2, , ,
      2 MPEG ADTS, layer II, v2,  , , 2x
      2 MPEG ADTS, layer I, v2, , ,
      1 MPEG sequence, , Constrained
    121 MPEG sequence, v1, system multiplex
    149 MPEG sequence, v2, program multiplex
     23 MPEG transport stream data
      7 PDP-11 UNIX/RT ldp
     17 RIFF (little-endian) data, wrapped MPEG-1 (CDXA)


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131117/c76c0c65/attachment.asc>


More information about the ffmpeg-devel mailing list