Colour space in MP4 video

Comments

Musicvid wrote on 10/30/2017, 8:24 AM

Nah, a 601-709 misflag will never get noticed, unless run through multiple generations. Besides, the red primaries are identical.

Did you know that all the early 5D Canons flagged 1080p as 601? Canon's take was that it didn't matter.

I truly don't know what the no-flag fallback is for these decoders. And I know colorspace info does not need to appear as a metadata tag.

It would sure be reassuring though, if Magix/Sony/MC would tag colorspace info for MediaInfo, et al.

I think the whole yuy2/yv12 thing bears a further look. We used to have tons of problems with this in the 1990s.

uk-andrew-c wrote on 10/30/2017, 9:51 AM

Nick, I get the same as you with your chart, so it seems to be a transform that's not correct, if it's changing with differing levels of RGB.

I hadn't realised there was a Sony MP4 encoder, which is correct, if a little sloooww ;-)

NormanPCN wrote on 10/30/2017, 10:54 AM

ffmpeg rendering with frameserving from Vegas doesn't solve the issue (seen from Vegas preview with x264 encoding).

  • Red becomes 250,1,1
  • Blue becomes 0,0,248
  • Green becomes 5,252,6

It seems that converting RGB to YV12 causing this error.

ffmpeg always(defaults) does a RGB to YUV conversion with a 601 colorspace. It is a quirk/annoyance of ffmpeg that goes back to it's early days before HD/709 existed. That is why I did the RGB to YUV conversion in Avisynth before passing to ffmpeg. My full scripts are somewhere on this forum.

ConvertToYV12(matrix="rec709")

Also, I always pass full range to the frameserve.

Also from other posts in this thread the matrix and transform metadata that MediaInfo will show is really optional VUI info. I don't think any decoder looks at this info. I know I have put bogus info in there and I've seen no change on playback/import.

Musicvid wrote on 10/30/2017, 12:56 PM

Norm, not really VUI, that's an actual flag (yuvj420p) that talks to the decoder, if it is one that is actually aware of such things. We have Apple to thank for that.

I agree that the metadata TAGS signify nothing to the decoder; however, it is unsettling to see all these little color space errors without the encoders in Vegas telling us what they are actually doing....

GJeffrey wrote on 10/30/2017, 1:07 PM

ffmpeg rendering with frameserving from Vegas doesn't solve the issue (seen from Vegas preview with x264 encoding).

  • Red becomes 250,1,1
  • Blue becomes 0,0,248
  • Green becomes 5,252,6

It seems that converting RGB to YV12 causing this error.

ffmpeg always(defaults) does a RGB to YUV conversion with a 601 colorspace. It is a quirk/annoyance of ffmpeg that goes back to it's early days before HD/709 existed. That is why I did the RGB to YUV conversion in Avisynth before passing to ffmpeg. My full scripts are somewhere on this forum.

ConvertToYV12(matrix="rec709")

I also use an avisynth script but with the following line as the op wants to keep full range.

ConvertToYV12(matrix="PC.709")

Musicvid wrote on 10/30/2017, 1:18 PM

That is often used to convert fullrange to 709 levels; I have no idea of its usefulness in converting 601 to 709 (as if it mattered).

NickHope wrote on 10/31/2017, 5:46 AM

Here's another RGB test chart:

And here's one with cyan, magenta, yellow and orange:

So, the MAGIX AVC/AAC encoder in MainConcept encode mode greatly reduces pure red and blue, cyan receives lots of unwanted red, and yellow receives lots of unwanted blue. Here are the figures. The worst ones are in bold:

Red, RGB 255,0,0 becomes 226,8,0
Green, RGB 0,255,0 becomes 10,252,1
Blue, RGB 0,0,255 becomes 0,3,221
Cyan, RGB 0,255,255 becomes 29,247,255
Yellow, RGB 255,255,0 becomes 255,252,34
Magenta, RGB 255,0,255 becomes 245,3, 254

However when all 3 channels are in a mix, the issue doesn't occur. For example:

White, RGB 255,255,255 becomes 254,254,254
"Pink", RGB 255,128,128 remains 255,128,128

Below is what happens when the rendered file is uploaded to YouTube. You can sample the colors with Just Color Picker or similar. (Apologies for the irrelevant intro. The first time I did this, I got a YouTube community guidelines strike for uploading duplicate content!)

MAGIX AVC MainConcept mode:

Sony AVC/MVC CPU-only:

I submitted a support request, [Ticket#2017103117003394]

NickHope wrote on 10/31/2017, 10:19 PM

I got a quick response from Support that included this:

​"This is a known issue which will be resolved in a future application update."

uk-andrew-c wrote on 11/1/2017, 6:19 AM

The same one I had, not what you might call good customer service, e.g It was broken when you bought it, but we will charge you for an upgrade to fix it ;-(

vkmast wrote on 11/1/2017, 6:50 AM

It was broken when you bought it, but we will charge you for an upgrade to fix it ;-(

Hopefully, in a free update and not in an upgrade you need to pay for.

uk-andrew-c wrote on 11/1/2017, 7:06 AM

Absolutely, no-one can stop us hoping ;-)

diverG wrote on 11/1/2017, 7:09 AM

And fixed in VP14.  Also paid for!

Sys 1 Gig Z-890-UD, i9 285K @ 3.7 Ghz 64gb ram, 250gb SSD system, Plus 2x2Tb m2,  GTX 4060 ti, BMIP4k video out. Vegas 19 & V22(250), Edius 8.3WG and DVResolve19 Studio. Win 11 Pro. Latest graphic drivers.

Sys 2 Laptop 'Clevo' i7 6700K @ 3.0ghz, 16gb ram, 250gb SSd + 2Tb hdd,   nvidia 940 M graphics. VP19, Plus Edius 8WG Win 10 Pro (22H2) Resolve18

 

uk-andrew-c wrote on 11/1/2017, 7:43 AM

I have pointed this out to Magix, will let you know what they reply.

They don't seem very good on customer service. I reported this problem to them, but they denied any knowledge of an issue.

They would have saved Me, Nick, MusicVid and others, a great deal of time, if they had just admitted they knew about this.

Hope they monitor these forums.

Musicvid wrote on 11/1/2017, 8:59 AM

They would have saved Me, Nick, MusicVid and others, a great deal of time, if they had just admitted they knew about this.

Keeps us off the streets and out of detox, Andrew.

diverG wrote on 12/2/2017, 3:39 PM

Has this been fixed in 261?  Checked list but may have missed it.  Still hoping.

Sys 1 Gig Z-890-UD, i9 285K @ 3.7 Ghz 64gb ram, 250gb SSD system, Plus 2x2Tb m2,  GTX 4060 ti, BMIP4k video out. Vegas 19 & V22(250), Edius 8.3WG and DVResolve19 Studio. Win 11 Pro. Latest graphic drivers.

Sys 2 Laptop 'Clevo' i7 6700K @ 3.0ghz, 16gb ram, 250gb SSd + 2Tb hdd,   nvidia 940 M graphics. VP19, Plus Edius 8WG Win 10 Pro (22H2) Resolve18

 

NickHope wrote on 12/2/2017, 10:32 PM

Has this been fixed in 261?  Checked list but may have missed it.  Still hoping.

@diverG No. Same result as before.