VideoHelp Forum

Try DVDFab and copy Ultra HD Blu-rays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 80
Thread
  1. I'm new to this, so please bear with me. I'm trying to open a dv file in Virtualdub which I captured from VHS using Pinnacle Studio 12. The video in virtualdub has all kinds of crazy color, though - everybody is blue and purple. I'm assuming that it is due a wrong setting for color depth. Under video>color depth>Decompression format in virtualdub, Autoselect is ticked. Here's where I am confused. If I drop the file in mediainfo it tells me the colorimetry is 4:1:1. But I don't see that as an option in virtualdub. How can I find out if the video file is RGB or something else (YUY2)? If I select 4:2:2 YCbCr (YUY2) it looks okay, but it also looks okay if I select some other choices, so I don't want to select the wrong one. I'm assuming I don't want to leave it on Autoselect do I, since the colors are all weird.

    Also, I want to run it on full processing mode. Keeping in mind that the file I imported is a DV capture from VHS, I would like to export it with the same dv quality. What should I select under compression? It lists Canopus DV, and also Uncompressed RGB/YCbCr, as well as many others. I would like to keep the file from losing quality as best as I can.
    Quote Quote  
  2. I think I've seen that with ffdshow's DV decoder on occasion. Disable ffdshow's DV decoder. Or force VirtualDub to use its internal DV decoder.
    Quote Quote  
  3. Okay, I selected "Prefer internal video decoders over installed third-party codecs", and that seemed to do the trick. Thanks, much appreciated!

    What should I select under compression? I would like to export under the same DV codec as originally captured by Pinnacle, but I don't know what codec Pinnacle uses for DV. Does anybody know? Gspot says "dvsd" codec and "DVC/DV Video" under Video, and Mediainfo says "Digital Video (Sony)". I've read some DV codecs have a chroma upsampling bug.
    Last edited by sasuweh; 29th Sep 2010 at 18:12.
    Quote Quote  
  4. I would use Cedocida with VirtualDub. I don't know what Pinnacle uses but if you captured from a DV camcorder it's the camcorder that did the DV compression.
    Quote Quote  
  5. Well, I actually captured the DV from a VHS using analog cables and the Dazzle capture device. I just found a simple Avisynth script that displays the file info over the video, and it seems that the colorspace is listed as YV12. I'm new to this so I don't know if that's good or bad. I installed Cedocida like you recommended. When I select it under compression and click configure in VirtualDub, under "YV12 chroma sampling" I have 3 choices. Since my files are apparently YV12, this seems important. I can choose from:

    DV
    MPEG 2 non-interlaced
    MPEG 2 interlaced

    These same options are under both Encoder and Decoder settings.

    My VHS>DV captures are DV interlaced. So would I select "DV" then? And will there be any loss in quality by using this codec? My goal is to make a DVD after I run it through VirtualDub.

    Also, under Encoder - "RGB to YUV conversion", I have 2 choices:

    [0..255]-->[16..235]
    [0..255]-->[0..255]

    and under Decoder - "YUV to RBG conversion", I also have 2 choices:

    [16..235]-->[0..255]
    [0..255]-->[0..255]


    What should I use?

    From what I understand, VirtualDub will automatically use RGB mode when using "Full processing mode", which is what I will be doing. I found another thread in this forum also talking about Cedocida, but I'm really confused over how VirtualDub converts to RGB. It seems from what I've read that it's a bad idea to work with VHS DV transfers in VirtualDub because of how it converts to RGB. Should I just avoid it altogether then?
    Last edited by sasuweh; 29th Sep 2010 at 21:03.
    Quote Quote  
  6. EDIT - Decided to start a new thread for a different question.
    Last edited by sasuweh; 30th Sep 2010 at 04:38.
    Quote Quote  
  7. I believe that CCE not handling YV12 natively is very old information that once applied to now very old versions of CCE because it'll open YV12 sources these days with no problems.

    It's true that it'll convert them internally to YUY2 if it's not in YUY2 already. Me, I prefer that AviSynth do the conversion before feeding it into CCE. For interlaced DV sources you might add:

    ConvertToYUY2(Interlaced=True)

    to the bottom of your scripts. For progressive videos, leave out the 'Interlaced=True'.
    Last edited by manono; 30th Sep 2010 at 06:03.
    Quote Quote  
  8. That's the problem with trying to research this stuff - sometimes you find old information and don't know it. This sort of leads into the other question that I asked about colorspace in the other thread. I am very confused over whether or not my DV AVI is YV12 or something else entirely, but from what you've said, it shouldn't make a difference if I use that script for CCE, right? This is my first time using a script, too. Have I got this right?

    AviSource("C:\file.avi")
    ConvertToYUY2(interlaced=true)

    So I just save that as an avs file (with the AVI location of course) and open it with CCE and then select my settings?

    I appreciate the help.
    Quote Quote  
  9. The script is OK. Since CCE doesn't handle the audio, and if you have audio in it, you might do it this way:

    AviSource("C:\file.avi",False)#means to disable the audio, if any.
    ConvertToYUY2(interlaced=true)

    I always handle my audio separately and bring it back in when authoring.
    Quote Quote  
  10. I've noticed that CCE outputs the audio separate as a wav file before encoding, which I can then use in BeHappy to do the ac3 conversion. Is there any harm in letting CCE do that?
    Quote Quote  
  11. No, none at all, but what was the source audio, the one in the DV AVI? Isn't it WAV audio also?
    Quote Quote  
  12. Yes, VirtualDub does its filtering in RGB. It converts YUV video to RGB with a rec.601 conversion matrix which includes a contrast stretch from Y=16-235 to RGB=0-255. That means you will lose blacker-than-black (Y<16) and whiter-then-white (Y>235) and precision in between. Your YUV source isn't supposed to have Y outside the 16-235 range but captured video often does. If necessary, you can work around this with Cedocida by setting it to decode to RGB (disable the YUV options) without the contrast stretch. In the decoder section set YUV to RGB conversion [0-255] -> [0->255]. Then for output you have two options: adjust your video so it ranges from RGB=0-255 and use the usual rec.601 YUV to RGB conversion matrix in Cedocida (RGB to YUV conversion [0-255] -> [16-235]), or adjust your video to range from RGB 16-235 then use the pc.601 matrix in Cedocida (RGB to YUV conversion [0-255] -> [0-255]). Most other compression codecs (Xvid and Panasonic DV Codec, for example) don't give you these options and will always use the usual rec.601 matrix. So you have to adjust RGB to range from 0-255 when using those codecs.

    Regarding the chroma subsampling, VirtualDub does has a problem with interlaced YV12 input. It handles it as progressive instead of interlaced when it converts from YV12 to RGB for filtering. That causes colors to blur between the two fields. PAL DV usually uses YV12 internally, so you potentially have problems. Again, you can work around them by forcing Cedocida to convert to RGB while decoding.

    I don't have any native PAL DV video. Could you provide a small, sharp, colorful sample with significant motion (enough to see combing, but not so much that it's very blurry)? I'm pretty sure you want to set the YV12 chroma sampling to DV in Cedocida.
    Last edited by jagabo; 30th Sep 2010 at 08:36.
    Quote Quote  
  13. If using VirtualDub, would I be better off then to then to force Cedocida to convert to RGB while decoding like mentioned above or make an AviSynth script to do the conversion (ConvertToRGB) and load the script into VirtualDub?

    Manono, the original audio in the DV AVI is PCM 1536 kbps stereo.
    Last edited by sasuweh; 30th Sep 2010 at 13:44.
    Quote Quote  
  14. why are you using virtualdub ? are you using some processing or filters in vdub?

    if you do all your filtering in avisynth, you can feed it directly into CCE with avs script, without the colorspace conversions, and no intermediate files or quality loss from exporting out of vdub (as a 2nd generation lossy DV-AVI intermediate)
    Quote Quote  
  15. Well, I'm not sure that I want to use VirtualDub. It does sound like there are a lot of conversions involving RGB that I'd rather avoid. The only reason I'm considering running through VirtualDub is I noticed in VirtualDub it takes my VHS transfers, which usually have rather dull, light-gray blacks, and darkens the blacks up nicely in full processing mode. Is there a simple Avisynth script I can add when I run it through CCE that will accomplish the same thing? That is really the only need I have for VirtualDub. I know there might be a script for AviSynth I can use, but I have no idea what that would be. If I could just darken those blacks, I'd be happy and just feed the script directly into CCE and avoid VirtualDub altogether.
    Quote Quote  
  16. Originally Posted by sasuweh View Post
    Well, I'm not sure that I want to use VirtualDub. It does sound like there are a lot of conversions involving RGB that I'd rather avoid. The only reason I'm considering running through VirtualDub is I noticed in VirtualDub it takes my VHS transfers, which usually have rather dull, light-gray blacks, and darkens the blacks up nicely in full processing mode. Is there a simple Avisynth script I can add when I run it through CCE that will accomplish the same thing? That is really the only need I have for VirtualDub. I know there might be a script for AviSynth I can use, but I have no idea what that would be. If I could just darken those blacks, I'd be happy and just feed the script directly into CCE and avoid VirtualDub altogether.
    It sounds like you want to do a levels conversion , it would be easy to do in avisynth, and it would avoid RGB conversion, and extra quality loss from exporting DV-AVI. You would feed the script right into CCE

    You can use histogram() or videoscope() in avisynth to visualize legal levels, and use levels or smoothlevels to adjust the black level. You can use avsp to visualize (push f5)

    If you need a hand, post a small sample and someone will help you out configuring proper levels
    Quote Quote  
  17. Originally Posted by sasuweh View Post
    If using VirtualDub, would I be better off then to then to force Cedocida to convert to RGB while decoding like mentioned above or make an AviSynth script to do the conversion (ConvertToRGB) and load the script into VirtualDub?
    You only need to use the workaround if your source video contains luma values below 16 or above 235. If you want to convert to RGB in AviSynth instead of Cedocida, AviSynth's equivalent of Cedocida's [0-255] -> [0-255] conversion is ConvertToRGB(interlaced=true, matrix="PC.601"), and the inverse ConvertToYV12(interlaced=true, matrix="PC.601").

    The loss of precision converting from YUV to RGB and back isn't that big an issue (it does slow things down a bit). But, as has been pointed out, you could perform your filtering in AviSynth to avoid conversion to RGB altogether. GUI tools like AvsP can make it a little easier to set up.
    Quote Quote  
  18. Originally Posted by jagabo View Post
    I don't have any native PAL DV video. Could you provide a small, sharp, colorful sample with significant motion (enough to see combing, but not so much that it's very blurry)? I'm pretty sure you want to set the YV12 chroma sampling to DV in Cedocida.
    How did you know it's PAL DV ?

    He says it was 4:1:1 according to mediainfo, that would suggest NTSC DV. PAL DV would be 4:2:0

    If you're still interested I have som PAL DV samples for testing
    Quote Quote  
  19. Okay, so I just tried this out to see - If I use this AviSynth script:

    ConvertToRGB(interlaced=true)

    and load it into VirtualDub, just to see how the video looks, the blacks are darker, more like what I'd like to see. If I use the full script as posted above:

    ConvertToRGB(interlaced=true, matrix="PC.601")

    and load that into VirtualDub, then the blacks are lighter, it look like the original file.

    So, if I want to avoid VirtualDub and use ConvertToYUY2(interlaced=true) for CCE, what would I put in to achieve the same effect as ConvertToRGB(interlaced=true, matrix="PC.601") above?


    And yes, the DV AVI files I'm working with are NTSC.

    Quote Quote  
  20. I wouldn't just blindly use a PC matrix . You might be making illegal video (<16, >235) which will clip whites and crush blacks on a DVD player. I would look at videoscope() or histogram() to make sure you are making legal video, and use levels or smoothlevels to adjust it accurately . Histogram() is easier to use, you just have to adjust it so the video levels are between the brown bars (small excursions are ok, but basically anything in the brown areas are illegal)

    What you see on a PC monitor is usually different that what you see on a TV . They use different levels and are calibrated differently

    I'm not familiar with capturing though pinnacle; is it adding any processing or are you doing any editing /filters in that? Do you get the same results capturing through windv?
    Quote Quote  
  21. It is not adding any processing that I know of. No filters. Just a straight capture.
    Quote Quote  
  22. Originally Posted by poisondeathray View Post
    How did you know it's PAL DV ?
    I had assumed PAL DV because the OP was talking about YV12 earlier.

    Originally Posted by sasuweh View Post
    Okay, so I just tried this out to see - If I use this AviSynth script:

    ConvertToRGB(interlaced=true)

    and load it into VirtualDub, just to see how the video looks, the blacks are darker, more like what I'd like to see. If I use the full script as posted above:

    ConvertToRGB(interlaced=true, matrix="PC.601")

    and load that into VirtualDub, then the blacks are lighter, it look like the original file.

    So, if I want to avoid VirtualDub and use ConvertToYUY2(interlaced=true) for CCE, what would I put in to achieve the same effect as ConvertToRGB(interlaced=true, matrix="PC.601") above?
    As poisondeathray pointed out, it's best to use tools like VideoScope() and Histogram() to judge levels. Calibrating your monitor to show correct levels is a good idea too. But keep in mind that there are multiple ways of getting video on the screen in Windows. They may use different YUV/RGB conversion matrices and different proc amp settings. You have to know which the software is using.
    Quote Quote  
  23. I'm still not sure if my DV AVIs are YV12 or YUY2. It seems to be safe I should use the ConvertToYUY2(interlaced=true) for CCE. By the way, I have found a filter for AviSynth called PeachSmoother which seems to do a pretty nice job from a preview I tried playing in media player classic. Can this be used in CCE using the following script?

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\PeachSmoother.dll")
    AviSource("C:\file.avi")
    ConvertToYUY2(interlaced=true)
    PeachSmoother()

    I've heard some filters may not work in CCE because multiple passes may produce varying results, which could cause a crc error in CCE. Sounds like another problem I'd rather not deal with, but it would be nice if I could try out this script and see the results from CCE.

    Not sure if this tells you anything, but if I load the above script into CCE, and check the file properties, it lists the filename as the script file, and lists the FourCC and Pixel Format as YUY2. Does that mean the original AVI is YUY2 or is that because I have ConvertToYUY2(interlaced=true) in the script and it's doing it's job?
    Last edited by sasuweh; 30th Sep 2010 at 16:25.
    Quote Quote  
  24. NTSC DV is 4:1:1 chroma subsampled. What colorspace it comes out of the decoder depends on what the decoder and editor negotiate (the best colorspace that both of them support). NTSC DV usually comes out YUY2 or RGB. You can use Info() to determine the video properties anywhere in an AviSynth script (the information is "printed" onto the video). One thing I like about Cedocida is you have the ability to force the output colorspace.

    I think PeachSmoother always produces the same outout, given the same input.
    Quote Quote  
  25. Okay, I've tried a number of tests, and I'm still getting nowhere fast. One thing I've noticed, if I open the DV AVI files directly in CCE, and check file properties, under Source info, it lists:

    FourCC: dvsd
    Pixel format: RGB24

    as I posted above, if I open the file using the AviSynth script, Source info says:

    FourCC: YUY2
    Pixel format: YUY2

    So does this mean the original DV AVI files are RGB24?
    Quote Quote  
  26. Originally Posted by sasuweh View Post
    Okay, I've tried a number of tests, and I'm still getting nowhere fast. One thing I've noticed, if I open the DV AVI files directly in CCE, and check file properties, under Source info, it lists:

    FourCC: dvsd
    Pixel format: RGB24

    as I posted above, if I open the file using the AviSynth script, Source info says:

    FourCC: YUY2
    Pixel format: YUY2

    So does this mean the original DV AVI files are RGB24?
    No it doesn't. As jagabo mentioned earlier, NTSC DV-AVI is always YUV 4:1:1 , but the decoder can be set to output YV12, YUY2 or RGB

    These observations mean whatever vfw decoder you have installed for DV-AVI is set to decode RGB

    The reason why the avs script shows YUY2 , is because you have ConvertToYUY2()

    If you are using avisynth, you should set your decoder to output YUY2, otherwise you will incur YUY2=>RGB=>YUY2=>YV12 conversion . If you set it to output YUY2, you won't incur that extra RGB conversion. Since this is NTSC DV, you shouldn't even need ConvertToYUY2(interlaced=true), because it should already by YUY2 if the decoder is set properly
    Quote Quote  
  27. So then I should be able to just open the file as is in CCE? Okay, but how do I know what decoder is being used and how to set the output?
    Quote Quote  
  28. If you open a DV AVI directly in VirtualDub you can use File -> File Information to see what VFW decoder is the default (unless you've set VirtualDub to use its internal DV decoder). AviSource() in AviSynth should use that same decoder.

    Attached is a levels test pattern I made a while back as DV AVI (in a ZIP file). It contains luma levels from 0 to 255. When viewed on TV all the levels below 16 should be equally black. All the levels above 235 should be equally white:

    Click image for larger version

Name:	levels.png
Views:	2731
Size:	11.2 KB
ID:	3659

    In the above image the VideoScope graph shows the luma channel before conversion to RGB. The test pattern shows what VirtualDub does when converting YUV to RGB. You can use a pattern like this to adjust your monitor and check your workflow.

    The same DV AVI file opened with AviSource() and converted to RGB with ConvertToRGB(interlaced=true, matrix="PC.601"):

    Click image for larger version

Name:	pc601.png
Views:	1784
Size:	9.6 KB
ID:	3660

    The video is not supposed to look like this on TV. But if your AVI file has details in the super-blacks and super-whites, and you want to bring out those details, you have to do it while the video is in YUV, or after converting to RGB with the PC.601 matrix.

    In my experience, many DV camcorders record with black levels too high (no black below Y=32 or so) and with many brights above Y=235.

    <edit> I noticed that the zero patch in the DV AVI file was 5, not zero. So I made a new AVI and uploaded it </edit>
    Image Attached Files
    Last edited by jagabo; 22nd Apr 2012 at 12:54.
    Quote Quote  
  29. Originally Posted by sasuweh View Post
    So then I should be able to just open the file as is in CCE? Okay, but how do I know what decoder is being used and how to set the output?
    Theoretically you could, but it sounded earlier like you have to make some levels adjustments (black level).

    Rarely does anyone shoot 100% perfectly without needing to make any adjustments or filtering

    If you use cedocida , you can configure the output. Sometimes other DV decoders don't allow configuration e.g. ffdshow's DV decoder will only output YV12. As jagabo metioned, you can use vdub's file information on the native DV-AVI file to see the current DV VFW decoder
    Quote Quote  
  30. Okay, in VirtualDub, under file information, it says Decompressor is ffdshow. I always get overwhelmed in ffdshow. So I have the ffdshow video decoder configuration box open, but now I don't know where to look. Under codecs, I see DV listed under format, and the decoder is set to disabled. The drop down list gives me 2 choices: disabled and libavcodec. Should I be looking somewhere else?
    Quote Quote  



Similar Threads