Opened 8 years ago

Last modified 8 years ago

#4947 open enhancement

libx264/265 encoder "parameter unknown" is a warning rather than an error

Reported by: wader8 Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: libx264 libx265
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
A cyan-yellow warning is displayed when an invalid parameter is used for libx264/265 param options, which continues the encoding process, furthermore with the combined use of verbose messages the console output may scroll far enough for this error to be missed, it has created confusion that lead to assumption of a bug and has spent unnecessary effort and time spent in discussions.

The mistake in this case was of the use of "-" minus/dash which is a ffmpeg param, not the encoder option.

x265 case:
Unknown option -crf.

x264 case:
Error parsing option "-crf = 20".

As we can see, the x264 message is even closer, it is actually written as an error, but it still appears and behaves as a warning and the encoding process continues.

How to reproduce:

% ffmpeg -i input -x265-params -crf=20 ... output
ffmpeg version ... N/A
built on ... N/A

Change History (2)

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: ffmpegavcodec
Keywords: libx264 libx265 added; warning x264 x265 unknown error params removed
Status: newopen

I am not sure this should be changed but I sent a patch.

comment:2 by wader8, 8 years ago

Okay, but just to be sure in case this get's challanged, upon re-reading the original description, I think I have to rewrite and point out what I think I didn't explain well enough.

In practise the issue arises when a ffmpeg parameter is mistakenly used in the place where an avcodec parameter should be used, however, it also applies to any invalid characters that the avcodecs do not recognize, so techincally it has nothing to do with ffmpeg's own parameters, nor with avcodec's parameters, but I believe it does have to do with ffmpeg error level system in some fashion, as the codec most probably isn't running the whole console application. However I may be wrong on this, it has to be analyzed to determine the correct component this ticket applies to.

In x265 codec the message for an invalid parameter is simply "unknown parameter", however in the case of the x264 codec it is clearly labeled as an "error" by the original developers and the message reads "error parsing option", however neither are treated as actual errors by FFMPEG core and are treated as if they were a warning and so the process continues with default param values, which in a real situation may not be practical as the user who is originally trying to define such custom values for these params, which have to be manually written, may want to have them customized to his/her precise liking, so the continuation of the encoding/decoding process may not be in any benefit in such cases.
The user may go AFK or think that everything is okay, as the warning may not be seen if the console output is greater because the console window auto-scrolls away from these warnings which usually are at the very beginning. The user may only later realize the results are not to his liking, and would have to redo the whole process, losing time and effort.

Treating these avcodec messages as global ffmpeg errors (which stop all operations) instead of warnings would fix this issue instantly and avoid any time being lost and furthermore would avoid confusion with less experienced users, which has been noticed in various help&support channels. This fix will therefore also lessen the amount of beginner-level support inquiries and free up time from bigger issues as this is a very simple one.

In a similar case some time ago, this is how it was fixed there http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=8c4ca4aa5aa998e31337e30ff30ebf48f534acc2

Last edited 8 years ago by wader8 (previous) (diff)
Note: See TracTickets for help on using tickets.