cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
704 Views
Registered: ‎10-03-2018

Failure of GStreamer Colour Space Management

Jump to solution

Good Day Folks,

I have a problem with colour space management in GStreamer. 

The problem is that I want to encode videos in the colour space appropriate to my source (and/or target) medium.  As this is a huge domain, and there is ambiguity, I would like to be able to specify the colour space.  This should result in video which decodes correctly, and displays correctly on the target medium. 

In my test case (attached) the source medium is the test-pattern generator, and I specify the BT.709 colour space as the target. 

As you can see in the encoded video files (I used both AVC and HEVC), the colour space is BT.601. 

My problem is multi-fold, and is somewhat due to my ignorance:

  1. The specified the colour space at BT.709, but the encoded colour space is apparently BT.601. 
  2. I am confident, but not absolutely certain, that colour space was correctly specified. 
  3. I am uncertain how to fully test that colour space is correct, once I am confident of the data handling. 

Although I state that I am uncertain, testing should be straightforward, in that I can ask the test pattern generator to produce explicit colours, and then observe the output put on the wire after decoding the video files.  Are there industry standards or specific values for these tests? 

My general requirements include HD and UHD video (3G and 12G) capture, automated-recognition, encoding, and presentation.  Color precision is critical to several of the processes we are working on. 

Any guidance that you are able to give to me is appreciated. 

Kind Regards,
Peimann, S. M.
----
Toddlers are the Storm-Troopers of the Great God Entropy.
Physics: Not Just a Good Idea, It's THE LAW.
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
411 Views
Registered: ‎10-03-2018

Re: Failure of GStreamer Colour Space Management

Jump to solution

Greetings @sandeepg and @chrisar,

This problem is apparently resolved in the 2019.1 release, likely due to the GStreamer update. 

I tested with specified colour spaces as 'bt601', 'bt709', and 'bt2020' for the data coming from the test-pattern generator.  All three worked. 

Examinations were conducted using both GStreamer's 'gst-discoverer-1.0' and VideoLAN's VLC media player. 

The only oddity was that use of the GStreamer 'gst-discoverer-1.0' tool showed colorimetry as 'colorimetry=(string)2:6:0:7', rather than by name.  This showed correctly under VideoLAN VLC, however, as 'ITU-R BT.2020'. 

As a final observation, based on code review, colorimetry is not consistently supported across the various GStreamer elements.  Stand forewarned. 

Cheers!

Kind Regards,
Peimann, S. M.
----
Toddlers are the Storm-Troopers of the Great God Entropy.
Physics: Not Just a Good Idea, It's THE LAW.

View solution in original post

2 Replies
Highlighted
Moderator
Moderator
612 Views
Registered: ‎04-24-2017

Re: Failure of GStreamer Colour Space Management

Jump to solution

Hi @peimann,

I think already @chrisar mentioned about this in other post this is a VCU limitation as we support only BT.601 for both AVC and HEVC

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Explorer
Explorer
412 Views
Registered: ‎10-03-2018

Re: Failure of GStreamer Colour Space Management

Jump to solution

Greetings @sandeepg and @chrisar,

This problem is apparently resolved in the 2019.1 release, likely due to the GStreamer update. 

I tested with specified colour spaces as 'bt601', 'bt709', and 'bt2020' for the data coming from the test-pattern generator.  All three worked. 

Examinations were conducted using both GStreamer's 'gst-discoverer-1.0' and VideoLAN's VLC media player. 

The only oddity was that use of the GStreamer 'gst-discoverer-1.0' tool showed colorimetry as 'colorimetry=(string)2:6:0:7', rather than by name.  This showed correctly under VideoLAN VLC, however, as 'ITU-R BT.2020'. 

As a final observation, based on code review, colorimetry is not consistently supported across the various GStreamer elements.  Stand forewarned. 

Cheers!

Kind Regards,
Peimann, S. M.
----
Toddlers are the Storm-Troopers of the Great God Entropy.
Physics: Not Just a Good Idea, It's THE LAW.

View solution in original post