Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2214 closed enhancement (wontfix)

h264 output video stream with yuv444p

Reported by: burek Owned by:
Priority: wish Component: avcodec
Version: unspecified Keywords: libx264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


The source is from here:

It might be a good idea to set a default pixel format for h264 output video to yuv420p in order to make the output videos more compatible with nowadays media players. I believe it's not a bug to produce even yuv444p, but when people try to play the output in several other media players and fail, they will simply conclude that ffmpeg doesn't work, without involving too much into the reason why.

So, my suggestion is to set some kind of default pixel format of h264 (libx264) output video to yuv420p if not specified otherwise on the command line by the user.

Change History (3)

comment:1 by Elon Musk, 11 years ago

Component: undeterminedavcodec

comment:2 by Carl Eugen Hoyos, 11 years ago

Keywords: libx264 added
Resolution: wontfix
Status: newclosed

At the time x264 implemented yuv444 support, it may have made sense to define a specific encoder for colour spaces != yuv420. I suggested this more than once iirc but nobody was intersted in working on a patch (the patch is trivial and can be copied from an existing commit). Changing this now would surprise many users (and break API imo) so a change is unlikely now.
If you think this is important, don't hesitate to send a patch that implements it for the next API bump, it can then be discussed on ffmpeg-devel.

comment:3 by burek, 11 years ago

As discussed on #ffmpeg-devel irc channel, I would suggest that at least a hint message is produced when the pixel format is unspecified at command line and it is not yuv420p in the source file.

A hint/warning message can be any kind of a custom message that notifies the user that his video might not be playable on some media players, due to this issue.

Since I'm required to suggest a hint message and am not quite familiar with correct terms, I'll just suggest a simple message like:

"Warning: You didn't specify '-pix_fmt yuv420p' option, so the same pixel format from your input will be used. Your video might have issues when played back on some media players since they mostly use 'yuv420p' pixel format with h264 videos."

Note: See TracTickets for help on using tickets.