[PATCH] ffmpeg: raise level for message printed in case of auto-select pixel format
Increase visibility, in order to decrease massive troubleshooting for users generating non playable H.264 content. --- ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 01cfaea..cc709ab 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -2336,7 +2336,7 @@ static int transcode_init(void) if (!strncmp(ost->enc->name, "libx264", 7) && codec->pix_fmt == AV_PIX_FMT_NONE && ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P) - av_log(NULL, AV_LOG_INFO, + 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", av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format)); -- 1.8.1.2
Stefano Sabatini <stefasab <at> gmail.com> writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea. Carl Eugen
On 7/27/2013 12:53 PM, Carl Eugen Hoyos wrote:
I don't think this is a good idea.
Why? The message itself is a warning. - Derek
Derek Buitenhuis <derek.buitenhuis <at> gmail.com> writes:
On 7/27/2013 12:53 PM, Carl Eugen Hoyos wrote:
I don't think this is a good idea.
Why? The message itself is a warning.
It is clearly not a warning. Carl Eugen
On date Saturday 2013-07-27 16:53:38 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea.
Why? And why do you reply with a comment which implies another question? (That kind of replies become annoying pretty fast). -- FFmpeg = Fierce and Fiendish Mean Philosophical Erroneous Game
On 7/27/13, Stefano Sabatini <stefasab@gmail.com> wrote:
On date Saturday 2013-07-27 16:53:38 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea.
Why?
And why do you reply with a comment which implies another question? (That kind of replies become annoying pretty fast).
Maybe he wanted to use http://caca.zoy.org/wiki/toilet
On date Saturday 2013-07-27 21:25:23 +0000, Paul B Mahol encoded:
On 7/27/13, Stefano Sabatini <stefasab@gmail.com> wrote:
On date Saturday 2013-07-27 16:53:38 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea.
Why?
And why do you reply with a comment which implies another question? (That kind of replies become annoying pretty fast).
Maybe he wanted to use http://caca.zoy.org/wiki/toilet
Who volunteers to write a plugin to redirect ff* log messages to toilet? -- FFmpeg = Fast & Furious Mere Pure Embarassing Guide
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Saturday 2013-07-27 16:53:38 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea.
Why?
Because I don't think it is a good idea to raise the level of an informational message to "warning"? Or wasn't that what you mean?
And why do you reply with a comment which implies another question?
Sorry, I don't understand this sentence. Carl Eugen
On date Sunday 2013-07-28 01:18:46 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Saturday 2013-07-27 16:53:38 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea.
Why?
Because I don't think it is a good idea to raise the level of an informational message to "warning"?
"Informational message" and "warning" are not clearly defined (a warning is always an informational message), thus the use distinction must be practical. "Warning" implies that the message contains some information which affects the final outcome, a compatibility issue in this case, while "informational" in my interpretation provides information related to the program itself, and thus not immediately relevant to the user. Of course the distinction is blurry, but rather than discussing the semantical connotations and dinstinctions between the two terms to death, I suggest to raise the level for purely practical reasons, it will avoid *massive* troubleshooting since it will be noticed by more users, and thus will potentially save X man hours of debugging, for a very small change.
Or wasn't that what you mean?
And why do you reply with a comment which implies another question?
Sorry, I don't understand this sentence.
Stating a claim not backed up by an explanation ("this is not a good idea") is forcing me to ask for clarifications, this doesn't help to make the thread as short as possible and tends to be frustrating for the contributor. -- FFmpeg = Fundamental and Fabulous Merciful Perennial Ephemeral Genius
On Sun, Jul 28, 2013 at 02:16:08PM +0200, Stefano Sabatini wrote:
On date Sunday 2013-07-28 01:18:46 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Saturday 2013-07-27 16:53:38 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini writes:
- av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING, "No pixel format specified, %s for H.264 encoding chosen.\n"
I don't think this is a good idea.
Why?
Because I don't think it is a good idea to raise the level of an informational message to "warning"?
"Informational message" and "warning" are not clearly defined (a
http://www.merriam-webster.com/dictionary/warning Definition of WARNING 1 : the act of warning : the state of being warned <he had warning of his illness> 2 : something that warns or serves to warn; especially : a notice or bulletin that alerts the public to an imminent hazard (as a tornado, thunderstorm, or flood) Definition of INFORMATION 1 : the communication or reception of knowledge or intelligence 2 a (1) : knowledge obtained from investigation, study, or instruction (2) : intelligence, news (3) : facts, data b : the attribute inherent in and communicated by one of two or more alternative sequences or arrangements of something (as nucleotides in DNA or binary digits in a computer program) that produce specific effects c (1) : a signal or character (as in a communication system or computer) representing data (2) : something (as a message, experimental data, or a picture) which justifies change in a construct (as a plan or theory) that represents physical or mental experience or another construct d : a quantitative measure of the content of information; specifically : a numerical quantity that measures the uncertainty in the outcome of an experiment to be performed 3 : the act of informing against a person 4 : a formal accusation of a crime made by a prosecuting officer as distinguished from an indictment presented by a grand jury — in·for·ma·tion·al adjective — in·for·ma·tion·al·ly adverb See information defined for English-language learners » See information defined for kids » in·for·ma·tion log.h: /** * Something somehow does not look correct. This may or may not * lead to problems. An example would be the use of '-vstrict -2'. */ #define AV_LOG_WARNING 24 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange
On 7/28/2013 8:16 AM, Stefano Sabatini wrote:
I suggest to raise the level for purely practical reasons, it will avoid *massive* troubleshooting since it will be noticed by more users, and thus will potentially save X man hours of debugging, for a very small change.
+1 - Derek
On date Sunday 2013-07-28 12:05:18 -0400, Derek Buitenhuis encoded:
On 7/28/2013 8:16 AM, Stefano Sabatini wrote:
I suggest to raise the level for purely practical reasons, it will avoid *massive* troubleshooting since it will be noticed by more users, and thus will potentially save X man hours of debugging, for a very small change.
+1
Will push the change in a day. -- FFmpeg = Fanciful & Fiendish Mournful Plastic Eccentric Gadget
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense. Sorry, but I really don't understand why this is a good idea. Carl Eugen
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
Sorry, but I really don't understand why this is a good idea. -- FFmpeg = Fast Formidable Mastodontic Powerful Ephemeral Geisha
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good. Thank you, Carl Eugen
On date Monday 2013-07-29 09:50:32 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good.
I think I explained what is good for (and it's also explained in the commit log) and several reports from users explain why it is useful. On the other hand you really didn't explain why in your opinion the patch is not good, the only vaguely adducted reason is that you don't want to change the log level because you consider it "purely informative", which I do not a strong reason since based on a rather subjective terminology issue, and it's not clear what's the advantage of keeping it that way. So while I think I explained my position, it is now your duty to explain your, considering the advantages of the patch (less pain for the users). Since I feel this bikes^H^H^H^H^Hthread is already getting long enough and wasted enough time and bandwidth, I suggest to move this discussion to IRC. -- FFmpeg = Fantastic and Furious Mind-dumbing Portentous Erudite Guru
On Mon, Jul 29, 2013 at 11:50 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good.
Luckily, everyone is entitled to their own opinion. I think the patch is useful, since it warns the user about an assumption the code makes, which in quite a lot of cases may not be what the user really wants. To ensure the user sees this warning, it should also be marked as a warning, or it might be missed, resulting in questions and/or complaints later. So IMHO, just go ahead and push. - Hendrik
On Mon, 29 Jul 2013 12:04:09 +0200, Hendrik Leppkes wrote:
On Mon, Jul 29, 2013 at 11:50 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good.
Luckily, everyone is entitled to their own opinion.
I think the patch is useful, since it warns the user about an assumption the code makes, which in quite a lot of cases may not be what the user really wants. To ensure the user sees this warning, it should also be marked as a warning, or it might be missed, resulting in questions and/or complaints later.
So IMHO, just go ahead and push.
- Hendrik
Agreed. After helping dozens of users with this issue, and observing others spending their time to do the same, making the message more likely to be seen is something that I support. From a user support point of view it makes sense and from a general user's point of view it makes more sense. Making things better for users beats out neckbearding in my opinion. Please push.
On Mon, Jul 29, 2013 at 10:18:07AM -0800, Lou Logan wrote:
On Mon, 29 Jul 2013 12:04:09 +0200, Hendrik Leppkes wrote:
On Mon, Jul 29, 2013 at 11:50 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good.
Luckily, everyone is entitled to their own opinion.
I think the patch is useful, since it warns the user about an assumption the code makes, which in quite a lot of cases may not be what the user really wants. To ensure the user sees this warning, it should also be marked as a warning, or it might be missed, resulting in questions and/or complaints later.
So IMHO, just go ahead and push.
- Hendrik
Agreed. After helping dozens of users with this issue, and observing others spending their time to do the same, making the message more likely to be seen is something that I support.
I know I am being pedantic, but what is "this issue"? Certainly not the fact that a format was auto-selected. So in principle it seems likely an even better solution would be to only print this message when there is reason to believe it might cause issues - which I think might address Carl's objection (in particular I guess that it clutters the output with something that is actually not a warning or in any way indicative of any issue). Not that I say I believe it worth implementation effort.
On Mon, 29 Jul 2013 21:04:00 +0200, Reimar Döffinger wrote:
On Mon, Jul 29, 2013 at 10:18:07AM -0800, Lou Logan wrote:
Agreed. After helping dozens of users with this issue, and observing others spending their time to do the same, making the message more likely to be seen is something that I support.
I know I am being pedantic, but what is "this issue"? Certainly not the fact that a format was auto-selected.
Correct. Format auto-selection is not the "issue".
On date Monday 2013-07-29 21:04:00 +0200, Reimar Döffinger encoded:
On Mon, Jul 29, 2013 at 10:18:07AM -0800, Lou Logan wrote:
On Mon, 29 Jul 2013 12:04:09 +0200, Hendrik Leppkes wrote:
On Mon, Jul 29, 2013 at 11:50 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded:
Stefano Sabatini <stefasab <at> gmail.com> writes:
> Will push the change in a day.
You still haven't explained why raising the level of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good.
Luckily, everyone is entitled to their own opinion.
I think the patch is useful, since it warns the user about an assumption the code makes, which in quite a lot of cases may not be what the user really wants. To ensure the user sees this warning, it should also be marked as a warning, or it might be missed, resulting in questions and/or complaints later.
So IMHO, just go ahead and push.
- Hendrik
Agreed. After helping dozens of users with this issue, and observing others spending their time to do the same, making the message more likely to be seen is something that I support.
I know I am being pedantic, but what is "this issue"? Certainly not the fact that a format was auto-selected. So in principle it seems likely an even better solution would be to only print this message when there is reason to believe it might cause issues - which I think might address Carl's objection (in particular I guess that it clutters the output with something that is actually not a warning or in any way indicative of any issue). Not that I say I believe it worth implementation effort.
Exact, the point is that there is nothing intrinsically wrong with yuv444 in H.264, and ffmpeg can create many outputs which can only be played by ffmpeg. The only difference is that there are lot of people who do that specific conversion (RGB -> H-264) and realize the output seems "broken" and players usually don't care giving sensible feedback why they can't play the file. So I agree that it would be more correct to keep the current INFO level, on the practical side raising the log level might avoid user reports, since it will increase the chance that people will notice the message. I have no strong opinion on this and will leave the choice to the ffmpeg tool maintainer. -- FFmpeg = Faithless and Frenzy Minimalistic Portable Elected Gargoyle
On Tue, Jul 30, 2013 at 04:38:16PM +0200, Stefano Sabatini wrote:
On date Monday 2013-07-29 21:04:00 +0200, Reimar Döffinger encoded:
On Mon, Jul 29, 2013 at 10:18:07AM -0800, Lou Logan wrote:
On Mon, 29 Jul 2013 12:04:09 +0200, Hendrik Leppkes wrote:
On Mon, Jul 29, 2013 at 11:50 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Stefano Sabatini <stefasab <at> gmail.com> writes:
On date Monday 2013-07-29 09:36:06 +0000, Carl Eugen Hoyos encoded: > Stefano Sabatini <stefasab <at> gmail.com> writes: > > > Will push the change in a day. >
> You still haven't explained why raising the level > of a purely informational message makes any sense.
I did it extensively and repeatedly in the past thread.
While I can't really follow you with this message, please do not commit, this patch does no good.
Luckily, everyone is entitled to their own opinion.
I think the patch is useful, since it warns the user about an assumption the code makes, which in quite a lot of cases may not be what the user really wants. To ensure the user sees this warning, it should also be marked as a warning, or it might be missed, resulting in questions and/or complaints later.
So IMHO, just go ahead and push.
- Hendrik
Agreed. After helping dozens of users with this issue, and observing others spending their time to do the same, making the message more likely to be seen is something that I support.
I know I am being pedantic, but what is "this issue"? Certainly not the fact that a format was auto-selected. So in principle it seems likely an even better solution would be to only print this message when there is reason to believe it might cause issues - which I think might address Carl's objection (in particular I guess that it clutters the output with something that is actually not a warning or in any way indicative of any issue). Not that I say I believe it worth implementation effort.
Exact, the point is that there is nothing intrinsically wrong with yuv444 in H.264, and ffmpeg can create many outputs which can only be played by ffmpeg.
The only difference is that there are lot of people who do that specific conversion (RGB -> H-264) and realize the output seems "broken" and players usually don't care giving sensible feedback why they can't play the file.
So I agree that it would be more correct to keep the current INFO level, on the practical side raising the log level might avoid user reports, since it will increase the chance that people will notice the message.
I have no strong opinion on this and will leave the choice to the ffmpeg tool maintainer.
not choosing != 420 automatically for x264 is maybe better than warning the user that it was changed. 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 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle
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
On Tue, Jul 30, 2013 at 10:05:55PM +0200, Nicolas George wrote:
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 think that 90% of the users dont know if they want 420 or 444 h264. IMO software (and hardware) should just work, not _require_ complicated manual tweaking for the common use cases. Educating users is a great idea as long as its just one case and one product. But honestly i dont think i would want every product i use from a toothbrush to a potato peeler to _force_ me to have to read the manual and google some problem to get it working. and IMHO ffmpeg isnt different for other people ffmpeg -i inputfile outputfile should just work if it fails with a warning that many users accessing it through a GUI wont see and thuse who do see it and dont miss it maybe wont fully understand it without educating themselfs on it to make a decission. then IMHO this is not optimal Its a bit as if when calling someone over the phone the phone would stay silent and display a message that it choose a protocol that might not be supported but would then be higher quality if it is supported and require manual intervention to get a working phone connection. The correct thing to do is to pick the more compatible choice by default if it cant be autodetected and leave users with the option to override it, change the default as they prefer [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data
Le duodi 12 thermidor, an CCXXI, Michael Niedermayer a écrit :
i think that 90% of the users dont know if they want 420 or 444 h264.
They do not know if they want 420 or 444, I grant you that of course, but I believe they know whether they want the highest possible quality or compatibility with crappy players. They just need to learn that they can not have both.
IMO software (and hardware) should just work, not _require_ complicated manual tweaking for the common use cases.
It is not possible in all cases. You can use scissors without manual tweaking, because cutting paper is a simple task. You can not expect to fly a plane without manual tweaking. Pixel format selection is a pebble on the beach of all things that have to be taken care of to get proper results in video transcoding: resolution (and aspect ratio! how many videos with wrong aspect ratio on the loose?), deinterleaving (how many videos with ugly comb effect?), codec, bitrate/quality selection, container format, etc.
if it fails with a warning that many users accessing it through a GUI wont see and thuse who do see it and dont miss it maybe wont fully understand it without educating themselfs on it to make a decission.
That is the GUI's author's problem.
Its a bit as if when calling someone over the phone the phone would stay silent and display a message that it choose a protocol that might not be supported but would then be higher quality if it is supported and require manual intervention to get a working phone connection.
Your comparison is not valid, because the phone can negotiate the protocol on the fly. ffmpeg can not know that you intend to use the file with your stepmother's crappy player, and even less whether said player supports 444. A more honest comparison would be if you go to a shop to buy a new phone. Would you rather have the salesman say honestly "this one has a much better sound quality, but there are problems when calling a few foreign countries", rather than assume what countries you intend to call, or not call?
The correct thing to do is to pick the more compatible choice by default if it cant be autodetected and leave users with the option to override it, change the default as they prefer
Well, we have a lot of users' complaints because of incompatible pixel format, but when yuv420p was the default, we had a lot of users' complaints because of "blurry edges" (we are talking about encoding from RGB, that means a lot of screen captures) caused by the luma subsampling. It is a shame, but we just can not have it both ways. Getting the users state their intent is the best solution. Regards, -- Nicolas George
On Tue, Jul 30, 2013 at 11:48:37PM +0200, Nicolas George wrote:
Le duodi 12 thermidor, an CCXXI, Michael Niedermayer a écrit :
i think that 90% of the users dont know if they want 420 or 444 h264.
They do not know if they want 420 or 444, I grant you that of course, but I believe they know whether they want the highest possible quality or compatibility with crappy players. They just need to learn that they can not have both.
IMO software (and hardware) should just work, not _require_ complicated manual tweaking for the common use cases.
It is not possible in all cases. You can use scissors without manual tweaking, because cutting paper is a simple task. You can not expect to fly a plane without manual tweaking.
Pixel format selection is a pebble on the beach of all things that have to be taken care of to get proper results in video transcoding: resolution (and aspect ratio! how many videos with wrong aspect ratio on the loose?), deinterleaving (how many videos with ugly comb effect?), codec, bitrate/quality selection, container format, etc.
if it fails with a warning that many users accessing it through a GUI wont see and thuse who do see it and dont miss it maybe wont fully understand it without educating themselfs on it to make a decission.
That is the GUI's author's problem.
Its a bit as if when calling someone over the phone the phone would stay silent and display a message that it choose a protocol that might not be supported but would then be higher quality if it is supported and require manual intervention to get a working phone connection.
Your comparison is not valid, because the phone can negotiate the protocol on the fly. ffmpeg can not know that you intend to use the file with your stepmother's crappy player, and even less whether said player supports 444.
The idea was that "assume the phone could not negotiate it and had to choose" Its a question about what the default should be [...]
It is a shame, but we just can not have it both ways. Getting the users state their intent is the best solution.
there a fileformat, theres the -target and theres the codec profile and level. These should provide sufficient informatio about what the target player kind would be and its ffmpegs job to figure out from that what pixel format can be used. Its not the users job to know if a ipod can do 444 or a dvd allows 422 mpeg2. he just specifies what he is encoding for and if our selection of formats/targets/profiles codecs isnt enough then it could be extended. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf
Le tridi 13 thermidor, an CCXXI, Michael Niedermayer a écrit :
there a fileformat, theres the -target and theres the codec profile and level. These should provide sufficient informatio about what the target player kind would be and its ffmpegs job to figure out from that what pixel format can be used. Its not the users job to know if a ipod can do 444 or a dvd allows 422 mpeg2. he just specifies what he is encoding for and if our selection of formats/targets/profiles codecs isnt enough then it could be extended.
I am totally in favour of "-target foo" selecting a pixel format compatible with foo (in fact, not doing so could be considered a misfeature). But that still leaves the question of what happens when the user neglects to provide a -target option or similar. To that question, my answer is: urge the user to provide a -target option. And not: assume that the user wants a video compatible with an ipod (they probably do not own) and will be fine with blurry edges. Regards, -- Nicolas George
On Wed, Jul 31, 2013 at 01:07:22AM +0200, Nicolas George wrote:
Le tridi 13 thermidor, an CCXXI, Michael Niedermayer a écrit :
there a fileformat, theres the -target and theres the codec profile and level. These should provide sufficient informatio about what the target player kind would be and its ffmpegs job to figure out from that what pixel format can be used. Its not the users job to know if a ipod can do 444 or a dvd allows 422 mpeg2. he just specifies what he is encoding for and if our selection of formats/targets/profiles codecs isnt enough then it could be extended.
I am totally in favour of "-target foo" selecting a pixel format compatible with foo (in fact, not doing so could be considered a misfeature).
But that still leaves the question of what happens when the user neglects to provide a -target option or similar.
To that question, my answer is: urge the user to provide a -target option.
i agree but still theres the case where no such option is provided and currently -target doesnt limit the pix_fmt (it could and easiest would be to split the x264 AVCodec in a 420 and any pixfmt one i think) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong.
Le tridi 13 thermidor, an CCXXI, Michael Niedermayer a écrit :
i agree but still theres the case where no such option is provided and currently -target doesnt limit the pix_fmt (it could and easiest would be to split the x264 AVCodec in a 420 and any pixfmt one i think)
That would be an easy solution, but it would amount to a significant API and ABI break, IMHO. A better solution, and not much harder, may be to add a pix_fmts field to AVProfile, and use it instead of AVCodec.pix_fmts if it is defined to decide the pixel format. Then -target can set -profile too quite easily. That would also fix trac ticket #2827 that was coincidently opened today. I have not yet had time to see how hard it would be. Regards, -- Nicolas George
On 7/31/13, Nicolas George <nicolas.george@normalesup.org> wrote:
Le tridi 13 thermidor, an CCXXI, Michael Niedermayer a ecrit :
i agree but still theres the case where no such option is provided and currently -target doesnt limit the pix_fmt (it could and easiest would be to split the x264 AVCodec in a 420 and any pixfmt one i think)
Something silly is already done: libx264 and libx264rgb encoder.
That would be an easy solution, but it would amount to a significant API and ABI break, IMHO.
A better solution, and not much harder, may be to add a pix_fmts field to AVProfile, and use it instead of AVCodec.pix_fmts if it is defined to decide the pixel format. Then -target can set -profile too quite easily. That would also fix trac ticket #2827 that was coincidently opened today. I have not yet had time to see how hard it would be.
Regards,
-- Nicolas George
On date Tuesday 2013-07-30 23:06:05 +0200, Michael Niedermayer encoded: [...]
i think that 90% of the users dont know if they want 420 or 444 h264. IMO software (and hardware) should just work, not _require_ complicated manual tweaking for the common use cases.
Educating users is a great idea as long as its just one case and one product. But honestly i dont think i would want every product i use from a toothbrush to a potato peeler to _force_ me to have to read the manual and google some problem to get it working.
This claim is IMHO delusional. Even using a club requires a lot of implicit knowledge (about physical and kinetic "intuitive" laws, for example about how your hand and your arm can handle the club, hit and still keep your balance, and where to hit your enemy to maximize damage and avoid that he will chase you thereafter). This knowledge is mostly hardcoded into our brain paths or implicitly acquired during childhood. In general, the more specialized the tool, the less you can rely on your "intuitive" knowledge, and you need more and more specialized knowledge to deal with that. So there are different levels of specialistic knowledge involved for example with "operating" a stone, a club, a boat, an atomic bomb, a spaceship. Operating ffmpeg requires a varying level of sofistication depending on the performed task. When interoperability is involved, you need to know what are the target device requirements, and there is no way ffmpeg can magically understand what they are but it is duty of the user to specify them.
and IMHO ffmpeg isnt different for other people ffmpeg -i inputfile outputfile should just work
You just need an IA who asks questions to the users about what they want, and who is able to interpret their answers (as alternative, a knowledgeable human operator). -- FFmpeg = Fantastic & Fundamentalist Moronic Ponderous Enchanting Goblin
On Wed, Jul 31, 2013 at 02:46:22PM +0200, Stefano Sabatini wrote: [...]
Operating ffmpeg requires a varying level of sofistication depending on the performed task.
yes
When interoperability is involved, you need to know what are the target device requirements, and there is no way ffmpeg can magically understand what they are but it is duty of the user to specify them.
and IMHO ffmpeg isnt different for other people ffmpeg -i inputfile outputfile should just work
You just need an IA who asks questions to the users about what they want, and who is able to interpret their answers (as alternative, a knowledgeable human operator).
At the risk of repeating myself but the question is about the default in the absence of additional information. Or stated differently the user told you to encode to h264 and that pretty much implies that he wants h264 that works for an UNSPECIFIED target or ANY target. like compiling C without extra switches generates a program that works on ANY reasonable variant of the host platform whats so hard on that so that we drift of in a discussion about a-bombs and spaceships (not mass produced items intended to be used by the general public currently) We do want ffmpeg to be useable by the general public for genral tasks the average joe might want to do. like "hey i want to convert my ogg to mp3, target device huh i want to share with friends no idea what they or their friends will use it on ...." [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML.
Le quartidi 14 thermidor, an CCXXI, Michael Niedermayer a écrit :
Or stated differently the user told you to encode to h264 and that pretty much implies that he wants h264 that works for an UNSPECIFIED target or ANY target. like compiling C without extra switches generates a program that works on ANY reasonable variant of the host platform
This argument is interesting, but I believe it does not apply: the practical difference between code produced by a C compiler with generic optimizations or with arch-dependant optimizations is negligible for most users. The difference between RGB -> 444 and RGB -> 420 is often noticeable. I remind you once again: when RGB -> 420 was the default, we had a lot of complaints about blurry edges. Also, what I most strongly object is making an EXCEPTION for x264, because exceptions are annoying BOTH for users and for developers. If you want to make "baseline" profile the default for x264 (and make sure it enforces the pixel format), that is fine by me, because it fits a general design. I still think that a warning "you will have either compatibility problems or blurry edges, please choose one" is better, because it educates users about something that can absolutely not be guessed by the program.
like "hey i want to convert my ogg to mp3, target device huh i want to share with friends no idea what they or their friends will use it on
Why do you assume that instead of "I want to share with friends, they all have recent phones but very little space on the memory card"? I assure you that teenagers know exactly what phone all their friends have. If you assume that compatibility is what users want, then of course compatibility is what the default should be. But that is not an argument, that is begging the question. Regards, -- Nicolas George
On Thu, Aug 01, 2013 at 12:30:52PM +0200, Nicolas George wrote:
Le quartidi 14 thermidor, an CCXXI, Michael Niedermayer a écrit :
Or stated differently the user told you to encode to h264 and that pretty much implies that he wants h264 that works for an UNSPECIFIED target or ANY target. like compiling C without extra switches generates a program that works on ANY reasonable variant of the host platform
This argument is interesting, but I believe it does not apply: the practical difference between code produced by a C compiler with generic optimizations or with arch-dependant optimizations is negligible for most users. The difference between RGB -> 444 and RGB -> 420 is often noticeable.
I remind you once again: when RGB -> 420 was the default, we had a lot of complaints about blurry edges.
Also, what I most strongly object is making an EXCEPTION for x264, because exceptions are annoying BOTH for users and for developers.
If you want to make "baseline" profile the default for x264 (and make sure it enforces the pixel format), that is fine by me, because it fits a general design.
iam not sure which profile is safe for common players but yes the default should be one that works on all relevant players. There should not be any need for it to match exactly a existing official profile but could also be one that maximizes quality &features while still playing on all relevant targets.
I still think that a warning "you will have either compatibility problems or blurry edges, please choose one" is better, because it educates users about something that can absolutely not be guessed by the program.
Theres no problem with printing such a warning, ive no objections to that, my concern is that i dont belive most people will conciously see it.
like "hey i want to convert my ogg to mp3, target device huh i want to share with friends no idea what they or their friends will use it on
Why do you assume that instead of "I want to share with friends, they all have recent phones but very little space on the memory card"? I assure you that teenagers know exactly what phone all their friends have.
the 10 million friends they share with on the net ? and their friends have friends themselfs, besides knowing the type of phone each of their friends has and knowing what h264 profile each supports arent the same. The user either would have to know that or type in all the 50 phone types their friends have as targets. Neither seems realistic to me.
If you assume that compatibility is what users want, then of course compatibility is what the default should be. But that is not an argument, that is begging the question.
Regards,
-- Nicolas George
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
-- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
Le quartidi 14 thermidor, an CCXXI, Michael Niedermayer a écrit :
the 10 million friends they share with on the net ?
Again, you are making baseless assumption on the intent of the users, and completely ignoring users who complained about blurry edges. Regards, -- Nicolas George
On Thu, Aug 01, 2013 at 02:38:35PM +0200, Nicolas George wrote:
Le quartidi 14 thermidor, an CCXXI, Michael Niedermayer a écrit :
the 10 million friends they share with on the net ?
Again, you are making baseless assumption on the intent of the users, and completely ignoring users who complained about blurry edges.
Who complained where about blurry edges ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth.
Le quartidi 14 thermidor, an CCXXI, Michael Niedermayer a écrit :
Who complained where about blurry edges ?
No one recently, obviously, because it does not happen by default now. But I remember at least this thread: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/34531 # I am grabbing screen with x11grab and no matter how I encode the video # there are always problems with some 'bleeding' artifacts in the video. The bleeding was tracked down to chroma subsampling, of course, and fixed by 444. Regards, -- Nicolas George
On date Thursday 2013-08-01 14:14:43 +0200, Michael Niedermayer encoded:
On Thu, Aug 01, 2013 at 12:30:52PM +0200, Nicolas George wrote: [...]
Why do you assume that instead of "I want to share with friends, they all have recent phones but very little space on the memory card"? I assure you that teenagers know exactly what phone all their friends have.
the 10 million friends they share with on the net ? and their friends have friends themselfs, besides knowing the type of phone each of their friends has and knowing what h264 profile each supports arent the same. The user either would have to know that or type in all the 50 phone types their friends have as targets. Neither seems realistic to me.
And then God created YouTube. (sorry coulnd't resist)
On date Thursday 2013-08-01 03:30:40 +0200, Michael Niedermayer encoded:
On Wed, Jul 31, 2013 at 02:46:22PM +0200, Stefano Sabatini wrote: [...]
You just need an IA who asks questions to the users about what they want, and who is able to interpret their answers (as alternative, a knowledgeable human operator).
At the risk of repeating myself but the question is about the default in the absence of additional information. Or stated differently the user told you to encode to h264 and that pretty much implies that he wants h264 that works for an UNSPECIFIED target or ANY target. like compiling C without extra switches generates a program that works on ANY reasonable variant of the host platform
whats so hard on that so that we drift of in a discussion about a-bombs and spaceships (not mass produced items intended to be used by the general public currently)
We do want ffmpeg to be useable by the general public for genral tasks the average joe might want to do. like "hey i want to convert my ogg to mp3, target device huh i want to share with friends no idea what they or their friends will use it on ...."
Just to make my point and at the risk of stating the obvious, then I promise I won't post more on this thread. Converting media files is not something the average joe/jane is willing to do, especially if s/he has to use a commandline (and probably do a git checkout, compile, and install). That is most computer users don't need the level of sofistication required by ffmpeg. If they know the difference between different container formats or codecs they're probably advanced geeks already or computer professionals, and they know also what's the difference between yuv420 and yuv444, in this case reading a message about pixel-format compatibility issues will help. Improving usability and getting sane defaults is a valuable endeavour (but very hard to achieve in practice because of conflicting instances), but I don't think this alone can avoid the need to have specific domain-related knowledge and some level of expertise when using ffmpeg. -- FFmpeg = Funny & Foolish Mean Proud ExchanGer
Nicolas George <nicolas.george <at> normalesup.org> writes:
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.
I believe the heuristics work very well (since Michael fixed a few bugs some time ago). Carl Eugen
Taking a step back, remember that this is just about warning users that what they're doing might not work. Simple as that. There is no inherent issue in ffmpeg, and the defaults that are chosen are absolutely fine with me if the goal is to preserve quality as much as possible. But, from my experience, users do not always know what H.264 level or profile they want (or know what these are, even). They have no clue about chroma subsampling either. They just encode video as part of their toolchain, without being experts on the subject. Just to give you an example, here's a list of questions I encountered, where users had problems with the default conversion to 4:4:4: - http://stackoverflow.com/questions/15265505 - http://stackoverflow.com/questions/17950394 - http://superuser.com/questions/512509 - http://superuser.com/questions/533695/ - http://superuser.com/questions/621033 - http://superuser.com/questions/619697 - http://superuser.com/questions/562867 I'm sure there are lots of other examples on the mailing lists, forums and Q&A sites all over the Internet. Raising the level of the message would just provide for better end user experience. Werner
Werner Robitza <werner.robitza <at> gmail.com> writes:
Raising the level of the message would just provide for better end user experience.
That may be true or not, but it is not what the links you gave show (on the contrary imo). The only post that was caused by a version that includes the informational message neither contained command line nor console output originally, so personally I doubt that this user would profit from a higher message level. Carl Eugen
On Wed, Jul 31, 2013 at 11:59 AM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
The only post that was caused by a version that includes the informational message neither contained command line nor console output originally
I think we all know that the majority of users, when asking for help, does not include the full, uncut console output, even though they might have read it. I just don't see the real issue with raising the level here and haven't seen any contra arguments.
On Jul 28, 2013 9:35 PM, "Derek Buitenhuis" <derek.buitenhuis@gmail.com> wrote:
On 7/28/2013 8:16 AM, Stefano Sabatini wrote:
I suggest to raise the level for purely practical reasons, it will avoid *massive* troubleshooting since it will be noticed by more users, and thus will potentially save X man hours of debugging, for a very small change.
+1
- Derek
_______________________________________________
ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
+1 I was the one who wasted lot of time debugging, after giving wrong format of raw file, and expecting an correct output of encoder
On 7/29/13, Anshul maheshwari <er.anshul.maheshwari@gmail.com> wrote:
On Jul 28, 2013 9:35 PM, "Derek Buitenhuis" <derek.buitenhuis@gmail.com> wrote:
On 7/28/2013 8:16 AM, Stefano Sabatini wrote:
I suggest to raise the level for purely practical reasons, it will avoid *massive* troubleshooting since it will be noticed by more users, and thus will potentially save X man hours of debugging, for a very small change.
+1
- Derek
_______________________________________________
ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
+1
I was the one who wasted lot of time debugging, after giving wrong format of raw file, and expecting an correct output of encoder
-inf
Stefano Sabatini <stefasab <at> gmail.com> writes:
if (!strncmp(ost->enc->name, "libx264", 7) && codec->pix_fmt == AV_PIX_FMT_NONE && ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P) - av_log(NULL, AV_LOG_INFO, + av_log(NULL, AV_LOG_WARNING,
Committed an pushed. Carl Eugen
participants (11)
-
Anshul maheshwari -
Carl Eugen Hoyos -
Derek Buitenhuis -
Hendrik Leppkes -
Lou Logan -
Michael Niedermayer -
Nicolas George -
Paul B Mahol -
Reimar Döffinger -
Stefano Sabatini -
Werner Robitza