Hello,
I test out some manual conversion techniques to understand why and when to do what.
I have some high quality DIVX files (Full DVD resolution) in YV12 colorspace.
Say I want to convert them into a Huffyuv-RGB32 avi file to filter it in VirtualDub later (maybe do some color correction and denoising). The final target should be MPEG2. I have some scenes (different files), which need some special filtering. Later I want to cut these in Sony Vegas.
I've set up an Avisynth Script so far to frameserver that file to VD and save it out with Huffyuv compression in Fast recompress mode.
This is my script:
----
AVISource("c:\test.avi",pixel_type="YV12",fourCC=" divx")
#ConvertToYV12()
ColorYUV(levels="TV->PC")
AssumeFPS(25,1,sync_audio=true)
ConvertToRGB32(matrix="PC.601")
----
If I open the original file in one instance of VirtualDub and the Avisynth script with another instance,
the video output looks identical.
1. If I comment out out the ColorYUV(...) function, the colors are washed out a bit in comparision with the original file. When and why should I use the ColorYUV() command? Should I use ColorYUV(levels="TV->PC") or ColorYUV(levels="PC->TV") if I want later convert to MPEG2?
2. The ConvertToRGB32(matrix="PC.601") do the colorspace conversion and keeps the full RGB range [0,255]. Is the matrix okay or should I use "Rec601" to do some color correction and cut later in Vegas?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
ColorYUV(levels="TV->PC") expands the luma range from 16-235 to 0-255.
ConvertToRGB32(matrix="PC.601") converts to RGB without expanding the luma range again.
Your script could just as well have read
Code:AVISource("c:\test.avi") ConvertToRGB32()
Further reducing your AVS script to:
Code:AVISource("c:\test.avi")
What you really want to do is open the AVI file with AviSynth, do all your filtering there (leaving it in YV12) then use VirtualDub in Fast Recompress mode (or your MPEG encoder) to save the results. This allows you to completely avoid the YUV->RGB->YUV conversion.
If you want to do your filtering in VirtualDub and avoide losing blacker-than-black and whiter-than-white portions use:
Code:AVISource("c:\test.avi") ConvertToRGB32(matrix="PC.601")
-
Thank you jagabo for the explanations!
Yes, I know colorspace conversions are not good and should be avoided.
But I am a not so advanced user with Avisynth and VD gives me a "See-what-you-get" UI and I can test some filter-chains and see the results just there.
I tried some Avisynth filters and I know some of them are faster and even better. There are so many out there and I don't know which to use when.
If I want later cut all the scenes (various files) together in Vegas, I read Vegas works in RGB colorspace and it would be better to do colorspace conversions with Avisynth before.
Is that right?
Can I use YV12 files with Vegas without the internal conversion to RGB?
Similar Threads
-
lagarith - premiere - lagarith (without colorspace conversion)
By codemaster in forum EditingReplies: 10Last Post: 1st May 2012, 12:26 -
AviSynth 60p Conversion
By budwzr in forum EditingReplies: 6Last Post: 8th Jan 2012, 14:44 -
Colour Conversion problems with Avisynth
By wiseant in forum Video ConversionReplies: 6Last Post: 16th Mar 2011, 11:40 -
Avisynth MT conversion
By dylz in forum Video ConversionReplies: 8Last Post: 7th Jan 2011, 11:32 -
AVSTODVD: Avisynth script edit - colorspace conversion question...
By JRM75 in forum Video ConversionReplies: 2Last Post: 26th Jul 2010, 18:43