Page 1 of 1

Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 17, 2016 3:50 pm
by François Zaïdi
Hello

I had to record a PC that has RGB output to the shuttle2 that expects YUV input.
Now the image is green, which is to be expected.

Is there a way to recover the right colors in post, using an NLE or resolve ?

Thank you

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 17, 2016 5:13 pm
by Adam Simmons
No there isn't, you need to convert it to YUV before bringing it in

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 17, 2016 5:58 pm
by JPOwens
François Zaïdi wrote:there a way to recover the right colors in post, using an NLE or resolve ?


If it has been matrixed, maybe not. But if the components are still intact, maybe there is a way of re-assigning them with a channel switcher. Y =>R, U=G, V=B, like Jello 1-2-3. You might even be able to do it in resolve with a splitter/combiner node and swap the patching.

jPo

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Fri Mar 18, 2016 10:02 am
by Andrew Kolakowski
Is your idea going to work?

If you have modern card in your machine than you can change output to YUV and capture should be fine.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Fri Mar 18, 2016 3:34 pm
by François Zaïdi
Andrew Kolakowski wrote:If you have modern card in your machine than you can change output to YUV and capture should be fine.

The issue is that the content has already been recorded in the wrong colorspace.

The question is : Can it be reversed ?

@JPOwens :
I will try the resolve idea. I searched for Jello 123, but to no avail. Can you point me in the right direction ?
Thank you ?

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Fri Mar 18, 2016 7:45 pm
by Andrew Kolakowski
This won't work. RGB doesn't map to YUV just like that. It's a proper math and conversion, so swapping/mapping YUV channels is not a solution at all. In your case it's not easy to fix, maybe even impossible. This is a task for people at doom9 forum and avisynth.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Sat Mar 19, 2016 11:46 pm
by JPOwens
François Zaïdi wrote: I searched for Jello 123, but to no avail. Can you point me in the right direction ?


Sorry, that isn't a literal reference, I was referring to a gelatin dessert that used to be popular, but its spokesperson has fallen into disrepute, among other things. I was really just trying to be picturesque -- maybe like a cafe latte with the coffee on the bottom, a layer of steamed milk and then foam. Hard to separate them after the drink has been made, and as Andrew correctly points out, some math has been done on them - my reference to the "matrix" processing.

Many VFX applications have channel splitters and "swap channels" behaviour or nodes. Your challenge is to try to get the system to "get some eggs out of an omelette." In the ideal situation, it would work like ProRes 4:4:4, which at least conceptually carries either Red or Luminance in Channel 1, Green or B-Y in Channel 2, and Blue or R-Y in the third channel.(if the order was Y', U, V). At the very least, though if you were capturing in a 4:2:2 format, the original material probably has been bandwidth limited (low-pass filter in chrominance), re-ranged and gamma-indexed. All bad for RGB recovery or re-coding.

jPo

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Sun Mar 20, 2016 3:00 pm
by François Zaïdi
It was recorded in dnxhd 422.

It is my understanding that
Y=0,3R+0,6B+01V
R-Y is 1R-Y
B-Y is B-Y

So I thought that the process could be reversible. Obviously, the downsampling would hurt a bit, but since it is just a pc grab...

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Sun Mar 20, 2016 6:02 pm
by Andrew Kolakowski
I think this is way more complicated.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Mon Mar 21, 2016 10:29 pm
by Andrew Kolakowski
You've got an answer from very knowledgeable guy on doom9. If these guys won't be able to help you no one will.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Tue Mar 22, 2016 1:23 am
by Peter Cave
OP: If you can post or link to a small reference clip in original format I'll try to decode for you.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Tue Mar 22, 2016 2:14 am
by Paul Dore
I had some dealings with YUV and posted some of my findings here:

http://liftgammagain.com/forum/index.ph ... sues.5807/

There may be something of use there.



Sent from my iPhone using Tapatalk

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Mar 23, 2016 3:23 am
by waltervolpatto
someone with nuke should be able to generate a RGB to YUV and a YUV to RGB matrice and convert that to a lut for Resolve that will simplify the issue. ..

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Mar 23, 2016 1:31 pm
by Andrew Kolakowski
It has nothing to do with this. It's not about RGB<->YUV conversion at all.
RGB signal was recorded as YUV, so things are totally messed up and probably unrecoverable. This recording may not have any usable information at all.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Mar 23, 2016 2:12 pm
by waltervolpatto
Andrew Kolakowski wrote:It has nothing to do with this. It's not about RGB<->YUV conversion at all.
RGB signal was recorded as YUV, so things are totally messed up and probably unrecoverable. This recording may not have any usable information at all.


I STAND CORRECTLY.

nuke can convert a colour space from YUV to RGB with the same matrice and you can use a lut for it.

i could not make a lut at home because my nuke is a demo.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Mar 23, 2016 4:22 pm
by Andrew Kolakowski
Yes it can, but does it require normal video on input or some green garbage?

Doom9 people gave an answer- this recording has no chroma information (UV channels are empty) and can be only recovered as black and white video.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Mar 23, 2016 11:25 pm
by waltervolpatto
Andrew Kolakowski wrote:Yes it can, but does it require normal video on input or some green garbage?

Doom9 people gave an answer- this recording has no chroma information (UV channels are empty) and can be only recovered as black and white video.


Yes, if UV are empty then you are out of luck.

can you pm me 1 frame?

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 12:05 am
by Paul Dore
You can build complex 3D LUTs in Fusion just as you can in Nuke, but without the watermark. The Custom Tool in Fusion does the same task as the Expression Node in Nuke. Fusion only offers ALUT3, ITX, and 3DL as LUT options, but the ITX version is identical to that which Resolve exports, you just need to change the extension from '.itx' to '.cube' and Resolve will recognise it.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 12:35 am
by waltervolpatto
yes paul, but at work i have nuke... not fusion. .. : ) not my choice.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 1:10 pm
by Andrew Kolakowski
waltervolpatto wrote:
Andrew Kolakowski wrote:Yes it can, but does it require normal video on input or some green garbage?

Doom9 people gave an answer- this recording has no chroma information (UV channels are empty) and can be only recovered as black and white video.


Yes, if UV are empty then you are out of luck.

can you pm me 1 frame?


https://www.wetransfer.com/downloads/c8 ... 519/1d17c9

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 3:15 pm
by waltervolpatto
I looked at it, that does not seem YUV. if you record a YUV signal on a RGB capture, the [R] will carry the luminance, the [GB] will carry the croma.

In your file, the green channel has the most info (that does nto make much sense.)

the U/V channels, are neutral (gray) when they are at 50% of the value, even assuming that the channel are swapped, they are way too low to be correctly.

let's assume that they are YUV. i swapped the G->R and added (offset) in order to make the U/V around 50%.

Then I did the YUV to sRGB transform and the image does not look anything good at all....

here is the result.

yuv.jpg
yuv.jpg (689.38 KiB) Viewed 2720 times

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 4:24 pm
by waltervolpatto
btw, can you just gain the red and blue channel? is something i saw this morning in nuke and it bugs me.

i will try again when home, but try just to see. ..

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 4:26 pm
by Andrew Kolakowski
This assumption about YUV to RGB mapping was made by the author, but it's not true at all (as you and other found out).

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 4:36 pm
by waltervolpatto
yes, and see the image can be telling.

i wonder what went wrong, and as for my last post it sends that the R/B channels got "squished". that should not happen in a digital environment.

sometimes you get silly results if you get the second link of a 4444 dual link playback, but it still week look like 0%50%50% energy if you have no key and just a bit of color.

that image looks like two of the channels where analogue and the connection was bad. ...

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Thu Mar 24, 2016 11:59 pm
by Peter Cave
After isolating the 3 channels in the supplied clip, all channels are carrying the same information but the UV channels have very low levels. Fixing it produces monochrome image.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Fri Mar 25, 2016 12:13 am
by waltervolpatto
Peter Cave wrote:After isolating the 3 channels in the supplied clip, all channels are carrying the same information but the UV channels have very low levels. Fixing it produces monochrome image.


yeah... does not look YUV at all. ..

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Fri Mar 25, 2016 3:05 am
by Paul Dore
Sometimes a YUV signal is processed in the order of UYV, as is the case internally with some Eizo monitors. If that signal was then read as RGB, it would naturally lead to an image with a heavy green cast. This may or may not have something to do with the problem at hand, but worth considering nonetheless. My post from a few days ago has a link which partially addresses the issue.

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Fri Mar 25, 2016 5:00 am
by waltervolpatto
Paul Dore wrote:Sometimes a YUV signal is processed in the order of UYV, as is the case internally with some Eizo monitors. If that signal was then read as RGB, it would naturally lead to an image with a heavy green cast. This may or may not have something to do with the problem at hand, but worth considering nonetheless. My post from a few days ago has a link which partially addresses the issue.


i thought about that and in my nuke test i swapped the green and the red channel, still does not look like Yuv...

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Jan 16, 2019 12:04 pm
by EvitaHolland
I am sorry i mean i have a 2VUY file and Adobe premiere does not accept it. what to do? i treid to convert it but it does not work.
thanks a lot
evita

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Jan 16, 2019 6:28 pm
by waltervolpatto
EvitaHolland wrote:I am sorry i mean i have a 2VUY file and Adobe premiere does not accept it. what to do? i treid to convert it but it does not work.
thanks a lot
evita


Can yiou send a frame?

Re: Converting YUV to RGB from shuttle in POST

PostPosted: Wed Jan 16, 2019 6:28 pm
by waltervolpatto
sorry, put in a Dropbox, and put a link