All though it works, the similar pipeline for gstreamer-0.10 would encode main profile level 3.1 H.264 stream based on I420 input. Now with 1.1.4 the pipeline will by default for this setup encode the profile high-4:4:4, which is quite different. This is quite unexpected, but technically it may not be considered an error, but rather an annoyance. However it is a complexity that for sure will generate some problems for many because high-4:4:4 will not be supported on many players. High-4:4:4 is a rather advanced and complex little used (in the past) format. Furthermore, it is a bit unclear which high-4:4:4 profile this actually is, but more on that later.
Anyway if we tell the pipeline that we want a main profile, we can do it like this:
However that result in the following error messages
x264 [error]: main profile doesn't support 4:4:4
Redistribute latency... /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, codec_data=(buffer)01f4001fffe1001a67f4001f91964014016ec044000003000400000300ca3c60c92001000668ebcc448440, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high-4:4:4, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error. Additional debug info: gstbasesrc.c(2857): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason not-negotiated (-4)
Funny. In the previous example it used 4:4:4 successfully. But I assume it insist on 4:4:4 and want to combine this with main profile. Main-4:4:4 is not a profile. Ok, I suspect that the encoder fails to tell videoconvert properly what it can use for input, so lets help it a bit by asking for a I420 input. It OUGHT not be necessary, but lets help it anyway.
Now that actually works, and we get a nice H.264 main profile stream generated from input converted to I420 but I believe the x264enc should have reached that conclusion by it self. If GStreamer gets too many plugins, that can't figure out to request the right input, I fear it will over time grow too complex to use for most.
Furthermore, it appear that x264enc uses the word high profile at little bit to carelessly. High Profile and 4:4:4 is many things and for the future we need to be very precise in using these terms. To me at least, it was very unclear which high-4:4:4 profile it claimed it was using successfully and which high-4:4:4 it said it did not support. As such I think letting 'profile=high-4:4:4' cover both Hi444PP and Hi444IP and possibly more (if that is what it is doing) is asking for troubles.
For your convenience, I here reprint an extract from wikipedia:
High Profile (HiP)
The primary profile for broadcast and disc storage applications,
particularly for high-definition television applications (for example,
this is the profile adopted by the Blu-ray Disc storage format and the DVB HDTV broadcast service).
Progressive High Profile (PHiP)
Similar to the High profile, but without support of field coding features.
Constrained High Profile
Similar to the Progressive High profile, but without support of B (bi-predictive) slices.
High 10 Profile (Hi10P)
Going beyond typical mainstream consumer product capabilities, this
profile builds on top of the High Profile, adding support for up to 10
bits per sample of decoded picture precision.
High 4:2:2 Profile (Hi422P)
Primarily targeting professional applications that use interlaced
video, this profile builds on top of the High 10 Profile, adding support
for the 4:2:2 chroma subsampling format while using up to 10 bits per sample of decoded picture precision.
High 4:4:4 Predictive Profile (Hi444PP)
This profile builds on top of the High 4:2:2 Profile, supporting up
to 4:4:4 chroma sampling, up to 14 bits per sample, and additionally
supporting efficient lossless region coding and the coding of each
picture as three separate color planes.
For camcorders, editing, and professional applications, the standard contains four additional Intra-frame-only
profiles, which are defined as simple subsets of other corresponding
profiles. These are mostly for professional (e.g., camera and editing
High 10 Intra Profile
The High 10 Profile constrained to all-Intra use.
High 4:2:2 Intra Profile
The High 4:2:2 Profile constrained to all-Intra use.
High 4:4:4 Intra Profile
The High 4:4:4 Profile constrained to all-Intra use.
Just a side-note, the *_mask, bpp and depth don't exist anymore in 1.0,
this info is all contained in the format.
> All though it works, the similar pipeline for gstreamer-0.10 would
> encode main profile level 3.1 H.264 stream based on I420 input. Now
> with 1.1.4 the pipeline will by default for this setup encode the
> profile high-4:4:4, which is quite different. This is quite
> unexpected, but technically it may not be considered an error, but
> rather an annoyance. However it is a complexity that for sure will
> generate some problems for many because high-4:4:4 will not be
> supported on many players. High-4:4:4 is a rather advanced and complex
> little used (in the past) format. Furthermore, it is a bit unclear
> which high-4:4:4 profile this actually is, but more on that later.
Doing high-4:4:4 is voluntary, it tries to do the best profile it can
(see bug #708036 for discussion).