[FFmpeg-devel] [PATCH] ffmpeg: Don't offer H.264 compatibility warning for NV12 input

wm4 nfxjfg at googlemail.com
Thu Jun 15 12:34:22 EEST 2017


On Thu, 15 Jun 2017 09:42:48 +0530
Gyan <gyandoshi at gmail.com> wrote:

> On Thu, Jun 15, 2017 at 4:59 AM, wm4 <nfxjfg at googlemail.com> wrote:
> 
> >  
> > >              av_log(NULL, AV_LOG_WARNING,
> > >                     "No pixel format specified, %s for H.264 encoding  
> > chosen.\n"  
> > >                     "Use -pix_fmt yuv420p for compatibility with  
> > outdated media players.\n",
> >
> > This warning shouldn't exist in the first place. It's dumb and
> > incorrect.
> >  
> 
> It could (and should) be better worded but it's needed. There's a
> semi-regular influx of questions at the SE sites where users complain about
> their ffmpeg output having audio but 'no video' or having a video stream
> which only plays in certain players. I can only imagine that the presence
> of the warning cuts down on the frequency of those queries, but also
> there's likely a countervailing effect by the use of the term 'outdated'
> which implies that if one has a recent version of a player, this warning
> can be ignored.  When, in fact, browser-based players don't decode anything
> other than yuv420p , whichever version, and same's the case for many
> players on WIndows, including atleast WMP on Win7.

It's wrong and dumb because the pixfmt is not enough to tell whether
the encoder will produce a file with w widely compatible profile.

There is also a large number of other cases, where ffmpeg CLI would
produce files that are not widely compatible (because it uses e.g. an
obscure container/codec combination), and it wouldn't warn.

I think what you really want is either
- defaulting h264 encoding to Main or High profile only
- proper presets, that make sure the output is compatible to a certain
  class of consumers (and make them usable, unless the current
  horseshit)



More information about the ffmpeg-devel mailing list