After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753032 - mpegtsmux: AVFoundation can not play videos muxed with mpegts if h.264 profile is high-4:4:4
mpegtsmux: AVFoundation can not play videos muxed with mpegts if h.264 profil...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-29 18:07 UTC by Kyrylo V. Polezhaiev
Modified: 2016-02-26 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kyrylo V. Polezhaiev 2015-07-29 18:07:46 UTC
In case I feed x264enc with planar 4:4:4 YUV, videos aren't playable with Apple apps like QuickTime, Safari, etc.
Maybe we should add more restrictions to it's sink pad? Or we shouldn't? I am not sure.

gst-launch-1.0 videotestsrc num-buffers=300 ! video/x-raw,format=Y444 ! x264enc ! mpegtsmux ! filesink location=output.ts
Comment 1 Tim-Philipp Müller 2015-07-29 20:08:42 UTC
And this a bug in GStreamer why?
Comment 2 Kyrylo V. Polezhaiev 2015-07-29 21:12:52 UTC
I am not sure, maybe NOTABUG. Maybe thats Apple limitation or issue. Maybe we limit allowed format. Is that allowed to use that format in transport stream?
Workaround for encodebin is to specify H.264 profile other than high-4:4:4 in caps of encoding profile, e.g.:

    caps = gst_caps_from_string("video/x-h264,profile=(string)high");
    gst_encoding_video_profile_new(caps, "x264enc_preset", NULL, 0);

This prevents x264enc from negotiating Y444 with it's predecessor.
Comment 3 Tim-Philipp Müller 2015-07-30 10:48:16 UTC
You have filed this bug against mpegtsmux, not x264enc. Why is that? Does it work if you use mp4mux instead of mpegtsmux?

As for x264enc, it seems to behave correctly as far as I can tell:

1) Y444 in, outputs high-4:4:4

   gst-launch-1.0 videotestsrc ! video/x-raw,format=Y444 ! x264enc ! fakesink -v


2) Y444 in, with output requested to be main/high profile -> error

   gst-launch-1.0 videotestsrc ! video/x-raw,format=Y444 ! x264enc ! video/x-h264,profile=high ! fakesink -v


3) Y444 in + videoconvert, with output requested to be main/high profile -> converts to I420 and outputs main/high profile

   gst-launch-1.0 videotestsrc ! video/x-raw,format=Y444 ! videoconvert ! x264enc ! video/x-h264,profile=high ! fakesink -v
Comment 4 Tim-Philipp Müller 2015-07-30 11:40:19 UTC
I think the answer is simply that this is not a bug in GStreamer.

The high-4:4:4 profile is not something that most consumer devices will support.

You should in your application request a specific H.264 profile that matches your target application and target devices instead of letting x264enc pick one based on the input.

Please re-open if I misunderstood something.
Comment 5 Kyrylo V. Polezhaiev 2015-07-30 11:41:15 UTC
> You have filed this bug against mpegtsmux, not x264enc. Why is that? Does it work if you use mp4mux instead of mpegtsmux?

You are right, I have same result with mp4mux. It is playable by VLC or gst-play but unplayable via AVFoundation.

> 2) Y444 in, with output requested to be main/high profile -> error
> 3) Y444 in + videoconvert, with output requested to be main/high profile -> converts to I420 and outputs main/high profile

Yes, and that means that video/x-h264,profile=high capsfilter after x264enc prevents x264enc from connecting to it's predecessor with Y444 format during negotiation. Thats workaround I use to make my streams be visible in Safari.

I think, maybe there is some additional requirements are filed by Apple (like AU delimiters we faced few weeks ago).
Comment 6 Tim-Philipp Müller 2015-07-30 11:48:57 UTC
Do you have any other file that contains H.264 high-4:4:4 profile video and plays fine in Safari? If yes, we can investigate.
Comment 7 Kyrylo V. Polezhaiev 2015-07-30 11:51:45 UTC
Yes, Apple H.264 doc says:

>> Three High profiles (also known as Fidelity Range Extension or FRExt). Consists of three separate High profiles (High, High 10, and High 4:2:2), intended for high-end professional uses.
Comment 8 Kyrylo V. Polezhaiev 2015-07-30 11:52:06 UTC
>> Do you have any other file that contains H.264 high-4:4:4 profile video and plays fine in Safari? If yes, we can investigate.

No, I haven't.