#21  
08-28-2019, 01:42 PM
dima dima is offline
Free Member
 
Join Date: Jul 2019
Posts: 131
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sanlyn View Post
You can't always go by MediaInfo, especially with processed lossless AVI which does not have interlace flags in its data.
Only that, as I wrote, the original captured file(raw) in HuffYUV(AVI; YUY2)(and for example: raw DV AVI - Type 2; YUV 4:2:0 - even with data which field is first) is shown in MediaInfo as interlaced material.
Files "converted" again even in the same codec(through VD for example) probably do not have this information in MediaInfo anymore (maybe I checked it "all situations"; I can't remember for sure). At least the ones I remember didn't have it.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
08-28-2019, 02:54 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,307 Times in 982 Posts
It's been mentioned before, but I'll present it again:

DV = BFF.
Everything else is almost always TFF.

MediaInfo doesn't always show interlace information. Also, most un-encoded lossless Avi files do not not have interlace information embedded in its internal data. Learn to analyze video yourself if you are uncertain. Neuron2_How To Analyze Video Frame Structure.zip
Reply With Quote
  #23  
08-29-2019, 07:00 AM
dima dima is offline
Free Member
 
Join Date: Jul 2019
Posts: 131
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sanlyn View Post
It's been mentioned before, but I'll present it again:

DV = BFF.
Everything else is almost always TFF.
I know that. I didn't ask about it. But thanks for repeating this information for record.
Quote:
Originally Posted by sanlyn View Post
MediaInfo doesn't always show interlace information. Also, most un-encoded lossless Avi files do not not have interlace information embedded in its internal data. Learn to analyze video yourself if you are uncertain. Neuron2_How To Analyze Video Frame Structure.zip
Ok, thank you for information.
Reply With Quote
  #24  
11-16-2019, 08:12 AM
ofesad ofesad is offline
Free Member
 
Join Date: Apr 2018
Location: Cordoba, Argentina
Posts: 80
Thanked 5 Times in 5 Posts
Sorry to revive old post but I was looking for this questions and wanted to ask some doubts I got or I might have forgotten along the time.

First, the source:
VHS captures should be done using YUV, correct? or should I set the Pixel format to YV12 too? (either for PAL or NTSC)

Minidv transfers are YV12, correct?

Avisynth:
Some scripts prefer YV12, others YUV, so conversion is done as necessary. That's clear.

My doubt comes here.
I see sanlyn posted he converts to RGB in the last step of the script to then work with the file in VDub.

Question: In the case I dont need to apply Vdub filters, should I convert it to RGB still? or should I convert it to YUV or YV12 in the last avisynth's step and then do the final export?

Final export: regarding the final export. I export using lagarith.

Question: In Compression -> Configure I need to change the MODE to RGB, or whatever the color space I am using at the end of the Avisynth script, correct?


In my particular case I already exported a file in YUV 4:2:2.
I need to convert it to YV12, to do the final conversion to MP4, right?

Question: Should I make a avisynth script like sanlyn mentioned, to open the file in the correct color space?:
Quote:
Originally Posted by sanlyn View Post
Code:
AviSource:("drive:\path\YUY2_video.avi")
ConvertToRGB32(interlaced=false, matrix="Rec601")
And change the Compression settings to
Configure->RGB and Pixel Format to YV12. ?


Sorry for the mess and the moronic questions

Ofesad.
Reply With Quote
  #25  
11-17-2019, 12:15 PM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,307 Times in 982 Posts
I think you might be confused about some aspects of YUV and RGB. You might want to browse two links to get a better idea of how YUV and RGB work:

YUV: https://en.wikipedia.org/wiki/YUV
RGB: https://en.wikipedia.org/wiki/RGB_color_space

Meanwhile, to avoid the heavy mathematics and to simplify matters for readers with further concerns:

YUV is a video data storage and broadcast system that stores video data in three channels: Y, U, and V. The "Y" channel stores luminance (brightness) information. The "U" ("blue") channel stores blue/green chroma information. The "V" ("red") channel stores red/yellow chroma information. Each data channel can be processed separately, meaning that luminance can be manipulated without affecting color, and vice versa.

YV12 is a specific type of YUV colorspace. There is more than one type of YV12 storage scheme (4:2:0 and 4:1:1), depending on how U and V chroma databits are stored. For every 4 units of luminance data, YV12 contains 1 unit of U data and 1 unit of V data. YV12 is the type of YUV colorspace used for DVD (MPEG). BluRay and AVCHD, both of which can be encoded using MPEG, h264, or VC-1, are encoded as YV12. Web streaming formats use various codecs and are usually encoded as YV12.

NTSC video tape uses a YPbPr analog color system whose nearest digital equivalent is YUY2. YUY2 is another specific type of YUV colorspace. YUY2 has twice the color resolution of YV12. For every 4 units of luminance data, YUY2 stores 2 units of U data and 2 units of V data. PAL video tape is basically a YV12 system but for restoration work it is captured at YUY2 for initially higher chroma resolution in the capture.

Consumer DV (as in MiniDV, etc.) is a lossy format that uses YV12. It is already a digital format for which "capture" is not recommended. Instead, DV is copied 1:1 via Firewire to DV-AVI. There is no colorpace change and no recompression of the source. Lossy DV-Avi itself is a noisy, inferior choice for restoration work, so it is not recommended for VHS capture.

RGB is a system that stores video data in three channels: Red, Green, and Blue. Rather than storing brightness data separately, brightness values are stored together with each color. Each of the three RGB channels can be adjusted separately, but adjusting color also adjusts a color's luminance at the same time, and vice versa.

RGB has 2 times the color resolution of YUY2 and 4 times the color resolution of YV12. For every 4 units of RGB brightness data in each color channel there are 4 units of chroma data. That is, each of the three RGB channels contains 8 data units (4 brightness units and 4 chroma units) for a total of 24 data bits for all three channels. In addition, some RGB formats can attach an additional 8-bit alpha (transparency) channel to form a 32-bit color system. Mainstream consumer video such as DVD and Bluray contain no alpha channel.

Quote:
Originally Posted by ofesad View Post
VHS captures should be done using YUV, correct? or should I set the Pixel format to YV12 too? (either for PAL or NTSC)
What do you mean by "YV12 too"? YV12 is a YUV colorspace. So is YUY2. VHS is better captured as YUY2, whether PAL or NTSC, which offers a higher initial chroma resolution for further processing.

Quote:
Originally Posted by ofesad View Post
I see sanlyn posted he converts to RGB in the last step of the script to then work with the file in VDub.
Not quite. You haven't seen all of my scripts. I convert to RGB if I intend to apply RGB filters to Avsisynth's outpout. If I don't plan further work in RGB I don't make the conversion in the script.

Quote:
Originally Posted by ofesad View Post
In the case I dont need to apply Vdub filters, should I convert it to RGB still?
No. Why would you?

Quote:
Originally Posted by ofesad View Post
or should I convert it to YUV or YV12 in the last avisynth's step and then do the final export?
YV12 is YUV.

Quote:
Originally Posted by ofesad View Post
Question: In Compression -> Configure I need to change the MODE to RGB, or whatever the color space I am using at the end of the Avisynth script, correct?
I guess you refer to outputting a file from VirtualDub. You set the colorspace and compression for whatever colorspace you want to use for the output file. If the next step in your processing after Virtualdub is RGB, save the output as RGB. If the next step is encoding to MPEG or h264, set the output for YV12. If the next step in your output will be another script that uses YUY2, set the output for YUY2.

If you are not applying filters in VirtualDub, you do not need a conversion to RGB and you should not be using "full processing mode". Full processing mode involves an automatic conversion to RGB whether or not Virtualdub filters are used and regardless of how you set the output configuration -- so, in this particular case, the input would be converted to RGB and then go thru an additional conversion to whatever you configure as your output colorspace. To avoid that unnecessary RGB conversion, set your desired output colorspace and compression, then set the video mode to "fast recompress". When you fail to set a custom output configuration, VirtualDub's default output format is uncompressed RGB24.

Quote:
Originally Posted by ofesad View Post
I already exported a file in YUV 4:2:2.
I need to convert it to YV12, to do the final conversion to MP4, right?
Your encoder will convert to YV12.

Quote:
Originally Posted by ofesad View Post
Question: Should I make a avisynth script like sanlyn mentioned, to open the file in the correct color space?:

And change the Compression settings to
Configure->RGB and Pixel Format to YV12. ?
If you don't trust the way your encoder does the YV12 downsampling from 4:2:2, you can change it with an Avisynth script, then save it out of VirtualDub as a new file by setting VDub's output for YV12 and Lagarith and using "fast recompress" mode. If your encoder software can accept input directly from Avisyhth, make the colorspace conversion in Avisynth without creating another new Avi file. More than likely your encoder will probably be OK unless you're using junk software such as Cyberlink.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Preserving color space, YV12 vs. RGB vs. 4:1:1 DV? davidi Edit Video, Audio 12 09-10-2017 11:24 PM
VirtualDub filters to improve color? sirbyron Restore, Filter, Improve Quality 35 03-02-2015 12:53 AM
Color space problem when capturing M-JPEG YUY2 hysteriah Capture, Record, Transfer 22 02-20-2015 04:17 PM
VirtualDubMPEG - applying different filters to different sections, color correction unclescoob Restore, Filter, Improve Quality 10 09-28-2011 10:05 AM
DV color space harmful to analog color quality? Verify? DeXeSs Capture, Record, Transfer 6 06-27-2010 01:48 AM

Thread Tools



 
All times are GMT -5. The time now is 06:45 AM