Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6311 closed enhancement (wontfix)

Unclear warning when encoding h264 from decklink without specifying pixel format.

Reported by: Marius Eikenes Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -f decklink -i 'DeckLink SDI 4K@14' -v verbose -c:v libx264 -an -preset medium -pix_fmt yuv420p -x264opts keyint=100:vbv-maxrate=5500:vbv-bufsize=5000:bitrate=5000 -threads 16 -f mpegts -tune film

ffmpeg version N-85469-gf1d80bc Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --enable-shared --enable-libx264 --disable-stripping --enable-gpl --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libfdk-aac --enable-decklink --extra-cflags=-I/root/decklink-sdk/Linux/include --extra-ldflags=-L/root/decklink-sdk/Linux/include

This warning shows up:

No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.

A warning I read, and then disregarded since I wasn't considering my players outdated.
But in my later tests both Safari on latest macOS, and Chrome on latest Android will not play this H264-stream when delivered as HLS.

Setting the pixel format to yuv420p solves this, and the stream plays fine in Safari (macOS) and Chrome (Android) after this.

Suggested solution
1) Make the warning message clearer. Suggestion:

Use -pix_fmt yuv420p for compatibility with outdated media players and some embedded media players within browsers (e.g Chrome on Android and macOS Safari as HLS)

Change History (2)

comment:1 by Carl Eugen Hoyos, 7 years ago

Resolution: wontfix
Status: newclosed

Feel free to send such a patch (made with git format-patch) to the development mailing list, I believe your report mostly confirms that the current warning makes sense. An even longer sermon won't help imo.

comment:2 by Marius Eikenes, 7 years ago

Fair enough. I submitted the enhancement because I personally read the warning, but still spent a lot of time not understanding why some players were failing. Since every player was of the modern variety.

For my use case having 422 as the default strikes me as odd, but I'm sure it makes sense in other scenarios or else i would have suggested to change to a saner default.

Note: See TracTickets for help on using tickets.