Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th March 2016, 16:10   #1  |  Link
pleinlesyeux
Registered User
 
Join Date: Feb 2009
Posts: 19
AvisynthNoob : remapping YUV to RGB

Hello

I have a video (dnxhd 422) that has been recorded using a BMD shuttle with the hdmi input.
A computer wes the source (hdmi RGB)
Sadly, the recorder only took hdmi YUV. So I have a green picture.

Is there way to remap the YUV to RGB using a NLE or avisynth or whatnot ?

Thank you so much for helping me !
pleinlesyeux is offline   Reply With Quote
Old 21st March 2016, 01:50   #2  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
You are probably screwed—it sounds like nothing was recorded at all. Upload a sample of what your file looks like so we can see if it can be salvaged.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 23rd March 2016, 11:38   #3  |  Link
pleinlesyeux
Registered User
 
Join Date: Feb 2009
Posts: 19
Hello

Oh there are definitely things recorded. I can see the pictures, but with a heavy green tint.

Here is a sample :
https://www.wetransfer.com/downloads...3103519/1d17c9

Thank you so much !
pleinlesyeux is offline   Reply With Quote
Old 23rd March 2016, 14:04   #4  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,302
Quote:
Originally Posted by pleinlesyeux View Post
Oh there are definitely things recorded. I can see the pictures, but with a heavy green tint.
I took a look at your sample and it seems the chroma channels do not have any useful information. The only thing that you can do is is use Greyscale() to get rid of the green tint.
Reel.Deel is offline   Reply With Quote
Old 23rd March 2016, 14:18   #5  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
Here are some tests you can make for yourself, which may come in handy:

XXSource("Capture Ecran Info2.mov.mp4")
UtoY

...returns a black screen. So does VtoY.

ColorYUV(analyze=true)
...confirms both U and V channels are flat color @ 16

the vectorscope
Histogram("color")
...shows a single spot of color at the top left (ie, yellowish-green)
raffriff42 is offline   Reply With Quote
Old 24th March 2016, 22:18   #6  |  Link
pleinlesyeux
Registered User
 
Join Date: Feb 2009
Posts: 19
OK. I understand that it's probably doomed(9) to retrieve the data.

But so that I can understand, is it not normal that UtoY would return a black picture, since Y is grayscale only ?

Wouldn' I need is a YtoR, UtoG and VtoB instead, to recolor the 3 B&W pictures ?

I managed to get the greyscale with after effects. There is a way to swapped channel but in the same colorspace, so I had pinkish pictures as a choice...

Thanks anyway for taking the time...
pleinlesyeux is offline   Reply With Quote
Old 24th March 2016, 23:54   #7  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,289
UtoY is for displaying the color channel "U" directly, as if it was luma data. It is only used a way of testing to see if there is any image data in the color plane; if UtoY gives a flat image the U channel is flat and contains no image data. If you actually wanted to use the U and V data, along with Y, to generate an RGB image you would use ConvertToRGB.

Y is not the R data, it takes a mixture of Y, U, and V to convert to R, G, and B. Converting Y into R, U into G, and V into B would give you a Black and Red version of your image instead of a Black and White one. Without valid U and V data there really is no color data recorded, the green tint is an artifact of near zero U and V values.
Code:
R = Y + 1.4075 * (V - 128)
G = Y - 0.3455 * (U - 128) - (0.7169 * (V - 128))
B = Y + 1.7790 * (U - 128)
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 25th March 2016, 22:13   #8  |  Link
pleinlesyeux
Registered User
 
Join Date: Feb 2009
Posts: 19
Hi Asmodian
thank you very much for your reply

Quote:
Originally Posted by Asmodian View Post
Y is not the R data,
Usually it is not. But in this very case, I recorded a RGB hdmi image to a YUV only capable recorder. So chances are that to recover the right colors, Y is carrying the Red data.
And U the Green and V the blue ?

If I had used a simple hdmi to sdi converter (which would have change rgb colorspace to yuv), I would have been fine.
I still cannot wrap my head around why the matricing cannot be undone...
pleinlesyeux is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:35.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.