[FFmpeg-devel] [PATCH] movenc: Tag files generated with strict experimental with a warning

wm4 nfxjfg at googlemail.com
Sat Dec 3 01:17:21 EET 2016


On Fri, 2 Dec 2016 17:17:23 -0300
James Almer <jamrial at gmail.com> wrote:

> On 12/2/2016 5:00 PM, Vittorio Giovara wrote:
> > This will simplify identifying files that were generated with
> > unfinished/incomplete/non-standard specifications.
> > 
> > Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
> > ---
> >  libavformat/movenc.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > index dc19838..c46bea9 100644
> > --- a/libavformat/movenc.c
> > +++ b/libavformat/movenc.c
> > @@ -5756,6 +5756,7 @@ static int mov_init(AVFormatContext *s)
> >                             FF_COMPLIANCE_EXPERIMENTAL);
> >                      return AVERROR_EXPERIMENTAL;
> >                  }
> > +                av_dict_set(&s->metadata, "WARNING", "This file was generated using an unfinished specification, please don't modify your demuxer to support it, should it not work", 0);
> >              }
> >          } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
> >              track->timescale = st->codecpar->sample_rate;
> > @@ -5802,6 +5803,7 @@ static int mov_init(AVFormatContext *s)
> >                             FF_COMPLIANCE_EXPERIMENTAL);
> >                      return AVERROR_EXPERIMENTAL;
> >                  }
> > +                av_dict_set(&s->metadata, "WARNING", "This file was generated using an unfinished specification, please don't modify your demuxer to support it, should it not work", 0);
> >              }
> >          } else if (st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) {
> >              track->timescale = st->time_base.den;  
> 
> Maybe lavf and lavc should add "experimental" to the container and
> stream's metadata alongside the library version, much like how we're
> adding the name of the encoder alongside the lavc version to the
> stream's metadata.
> 
> A warning printed by the muxer not going to help once such a file
> is in the wild.

This patch or the suggestion above sounds like a good idea. I wish it'd
actually be possible to encode a watermark with the warning into the
video stream.


More information about the ffmpeg-devel mailing list