[FFmpeg-devel] [PATCH] ffmpeg: raise level for message printed in case of auto-select pixel format

Nicolas George nicolas.george at normalesup.org
Tue Jul 30 22:05:55 CEST 2013


Le duodi 12 thermidor, an CCXXI, Michael Niedermayer a écrit :
> not choosing != 420 automatically for x264 is maybe better than
> warning the user that it was changed.

Is it really possible, conveniently?

For example, I frequently use "format=yuv444p" in a filter chain to control
precisely where the conversion happens with regard to the other filters
(yadif and hqdn3d for example). If that happens, ffmpeg does not know that I
specifically selected that pixel format, will I have to also specify
-pix_fmt yuv444p? That is ridiculously redundant. Or shall we add a flag
"user specified" to all format fields on a filter link? That is a lot of
work for a rather trivial issue.

> If its to be a log message instead of avoiding the issue that needs
> the message then i think the majority is in favor of
> it being warning level though i didnt re-count

The core issue here is that the user does not inform the software of what
they want precisely, and instead relies on default values and imperfect
heuristics. IMHO, the good way of solving that is to educate the users.

I would be happier if all heuristics were removed, and instead, as soon as
any non-trivial choice needs to be done the process would fail unless the
choice is user-specified. In this particular case, that would mean that
"ffmpeg -i $rgb -c libx264 $out" would always fail and require -vf format or
-pix_fmt to be specified. Obviously, it is not the dominant opinion here,
and I respect that.

Now, for the particular case at hand:

1. "Avoid lossy conversions as much as possible" is a better heuristic than
   "avoid compatibility issues", because it is more stable, more predictable
   and more generic.

2. Adding a warning (or, in this particular, keeping a message that is
   already there) falls in the "educate the users" category, and as such I
   am all in favour.

3. Concerning the INFO/WARNING choice, I believe the difference is only a
   matter of probability: if something is wrong with 100% probability, then
   it is an ERROR; if it is wrong with ~0% probability, then it is an INFO;
   and between that... WARNING covers an interval [x;100%[, but the exact
   value of x is open to discussion, especially since this kind of
   probability is nt well defined.

   In this particular case, since some are considering adding a special case
   to actually change the behaviour, I would say that the probability that
   "yuv444p automatically chosen for x264" is wrong is fairly high, so it
   deserves a warning.

4. I also believe that ffmpeg is too verbose by default; that explains why
   useful info messages are being ignored by users. But I have no clear idea
   about what should/could be trimmed down.

Regards,

-- 
  Nicolas George
-------------- 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/20130730/c2d52067/attachment.asc>


More information about the ffmpeg-devel mailing list