digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Capture, Record, Transfer (https://www.digitalfaq.com/forum/video-capture/)
-   -   First VHS capture, advice on levels? (https://www.digitalfaq.com/forum/video-capture/12375-first-vhs-capture.html)

lollo2 01-03-2022 08:40 AM

IIRC you can set something about YUV/RGB in VLC, do not remember where ...

edit: beeing many elements involved in the flow from capture to display (input levels, avs levels, ffmpeg levels, pc player levels, connection (HDMI) levels, display levels) is better you carefully check each step, an unwanted color space conversion can be hidden everywhere. Not easy...

London 01-03-2022 10:32 AM

1 Attachment(s)
At default settings my VC500 is showing levels down to Y=0 in the Histogram (see attached screenshot). Does this confirm the device can capture from Y=0 ?

London 01-03-2022 11:16 AM

Quote:

Originally Posted by hodgey (Post 81493)
All the VC500's I've used capture the full 0-254 at least (conexant ones, no idea about the ancient early ones with Trident chipsets). Though,I have noticed that they sometimes start clipping at y=16 after changing TV standards (only lasts until you reboot or re-plug the card.)

Mine has gone back to showing a hard border in the Histogram at Y=16. VirtualDub 1.9.11 keeps reverting the video standard to PAL_D (I get no picture in Preview), instead of PAL_I where I need it to stay.

I have gone into EZ Grabber and made sure the video standard is set correctly.

Any idea how to get VirtualDub to remember the correct video standard?

lollo2 01-03-2022 11:31 AM

Quote:

Does this confirm the device can capture from Y=0 ?
VC500 should be in 14-245 range http://www.digitalfaq.com/forum/vide...html#post62640

To find exact values, run ColorYUV(analyze=true) on a capture and "read" the numbers

EDIT: check about setting sharpness at 0 with procamp, same argument as per levels https://forum.videohelp.com/threads/...ure-in-procamp

lollo2 01-03-2022 12:36 PM

Quote:

To find exact values, run ColorYUV(analyze=true) on a capture and "read" the numbers
if you whish to write the values to a file for further processing you can use this code:

Code:

video_org=AviSource("<your file>")

# cropping
        crop_left=X        # | remove all black borders and head switching noise
        crop_top=X       
        crop_right=X
        crop_bottom=X
video_org_crop=video_org.crop(crop_left,crop_top,-crop_right,-crop_bottom)

# convert to YV12 (required for Y statistics)
video_org_crop_yv12=video_org_crop.ConvertToYV12(interlaced=true)

# analysis
video_coloryuv=video_org_crop_yv12.\
WriteFile("<your report file>.txt", "current_frame", """ "  " """,\
"AverageLuma()", """ "  " """, "YPlaneMin()", """ "  " """, "YPlaneMax()", """ "  " """,\
"YPlaneMin(threshold=0.4)", """ "  " """, "YPlaneMax(threshold=0.4)", append=false).\
ColorYUV(analyze=true)

eval("video_coloryuv")


ThumperStrauss 01-03-2022 07:51 PM

Hey London. I just wanted to thank you for this thread. Like you, my workflow has been similar JVC SVHS -- ES15 -- VC500 -- Win10 -- VirtualDub2 with Lagarith -- AVS script with AviSynth+ and VirtualDub2. Your questions are exactly what I am struggling with, including the problems with VirtualDub1911. Just wanted to let you know I appreciate this thread. Please post your final AVS script when you finalize it.

Question for you: I feel that most of the AVS scripts I find online are for AviSynth and VirtualDub1911 (32-bit everything). The only reason I went with AviSynth+ and VirtualDub2 was this Andrew Swan video: https://www.youtube.com/watch?v=C4PyyQoz6eo. Was that why you went that route, and are you considering switching to AviSynth and VirtualDub1911 for the processing (after capture)?

London 01-04-2022 07:36 AM

Hi ThumperStrauss. Thanks for the encouragement. It is reassuring for me, being a novice, that others have very similar setups and experience the same issues as me.

I did indeed follow that tutorial video from Andrew Swan (and his earlier videos for 32Bit and 64Bit side by side installation) and together with some particular fixes (for Microsoft Visual Studio installation) mentioned on his blog page I was able to get VirtualDub, AviSynth+, AvsPMod and command line FFmpeg setup correctly. Also prior to setting-up my Win10 workflow I have been using VirtualDub 1.9.11 + Filter Pack (from this forum) installed on my Sony VAIO running XP, that computer has an AV docking station with S-Video and Composite Inputs and Outputs which I used for some test captures. Anyway that is a different workflow, my questions here are for my Win10 workflow with the VC500 USB.

I read a lot of posts in the capture forums here and could read many more. I fully appreciate that we can do better than a VC500 USB and Win10, by using an ATI Theatre 200 chip AGP card on an XP machine with all the correct drivers. Those are the best cards built for the analogue capture era. Then there are proven good VCR's such as the Panasonic NV-FS200B, some JVC's etc, DataVideo TBC..... If I was going to do it 'properly-properly' I would know what to get, but I am not there yet.

After reading a lot of posts it can be tempting to get too far ahead of yourself, getting into restoration filters such as Deshaker, spot removal, chromafix. All in time. What I have done is 'rewound' to establish a basic workflow for my Win10 setup. With the help here, particularly from lollo2 and traal, I have re-learnt some fundamentals I thought I had already moved past. For example, do not resize in Avisynth. You will see the posts above....capture at 720x576, Crop 16pixels off the width and add 16pixels to keep the frame size 720x576 but the display area is 704x576. When encoding you can set a flag for the DAR to be 4:3.

I was using VirtualDub2 because VDub 1.9.11 was not 'playing nicely' with my VC500, but now I have got VDub 1.9.11 working. If your Preview ('Overlay' never works for me) does not display anything, then sometimes switching the Video standard to MESECAM, then back again to PAL_I kicks the Preview display into action on mine. Also, before you even launch VDub, open EZ Grabber and make sure the video standard is set correctly there - that should be a one time setup, but mine had changed.

I am back at work now so have little time to post until the weekend maybe, but I do want to follow-up with some notes from my testing over the weekend. After Lollo2 suggested to use AVISource() instead of FFMpegSource2() I was trying to remember why I had moved from AVISource() as my source filter. I think it was because my MP4's encoded when the source filter was AVISource had no audio when played back using the media player in my Panasonic TV. I need to test that again. I think using FFmpegSource2() fixed that problem and maybe that is because I use command line FFmpeg to encode the file. Anyway, I will be using VLC on my HTPC connected to that TV to view my files, because the media player built into my Panasonic TV is not very user friendly when I have many, many videos and pictures in my library.

Another item I noticed whilst testing yesterday is that FFmpegSource2() was reporting frame rates at 24.907, whereas the exact same clip when changing the script to call AVISource() showed the frame rate at 25.000. Completely fathomed by that one. I thought my Timing Settings in VDub needed looking, but that does not explain the difference in frame rate for the same clip. Some have reported that FFmpegSource2() corrupts frames (see Andrew Swans blog). btw that test I did in VirtualDub 1.9.11, VirtualDub2 64 Bit Lagarith.dll and VirtualDub2 64 Bit Lagarith.vdplugin - all 3 had strange frame rates when the source filter was FFmpegSource2().

I need to check using ColorYUV(analyze=true) what range my VC500 USB can capture, based on the advice from lollo2. Once I have done that I will post a 'final script' and hope that my help others in a similar situation to me.

I

ThumperStrauss 01-05-2022 10:09 PM

Quote:

Originally Posted by London (Post 81578)
I have gone into EZ Grabber and made sure the video standard is set correctly.

Just to be clear, do you mean make sure the Video Format is set to "NTSC_M" (if one is in North America)? Or is there another setting I need to check?

London 01-06-2022 01:26 AM

Yes make sure that Video Format is set correctly in EZ Grabber. Then restart your computer.

You shouldn't have to launch EZ Grabber again, the Video Format setting should be as you set it, but if you are randomly not getting a Preview to appear in VirtualDub it is worth checking that EZ Grabber is still set correctly.


When you launch VirtualDub 1.9.11 check the Video -> Capture Filter is also showing the correct setting ("NTSC_M" for yours).

RobustReviews 01-06-2022 05:19 AM

Just to confirm that you're working with NTSC and not PAL, given by your username (I appreciate there's one in Ontario too) and you've mentioned the FS200 which is a PAL machine?

London 01-06-2022 06:57 AM

I have mine set to 'PAL_I', that is the correct setting for my region (UK).

RobustReviews 01-06-2022 08:44 AM

Quote:

Originally Posted by London (Post 81638)
I have mine set to 'PAL_I', that is the correct setting for my region (UK).

Ah cool, there's no many of us on here, whereabouts are you? London I guess?

Just needed clarifying as some of this was getting a bit mixed up with NTSC.

London 01-08-2022 12:27 PM

2 Attachment(s)
I have now carried out two test captures of the same VHS clip in VDub 1.9,11 using the VC500 USB. The first one allowing the levels to spill into the red zones in the Histogram (but not slamming against 0 or 235). The second one setting the Levels to generally keep out of the red zones in the histogram, so should be within Y=16-235.

Running ColorYUV(analyze=true) in AviSynth the results of the first capture are shown in 'ColourYUV full levels capture' and the results of the second capture are shown in 'ColourYUV legal levels capture'.

What do the Luma Y results mean for each capture?

lollo2 01-08-2022 12:46 PM

You should let the card to capture with its default setting, no procamp adjustement.
Then, you need to remove (crop) in AviSynth all black borders and the head switching noise at the bottom.
Then you run ColorYUV(analyze=true) and read in the "Luma Y" values moving through the different frames:
Minimum and Maximum are the min and max values for the luma in the current frame; moving to many frames, this will tell you what range the card can capture.
Loose Minimum and Loose Mazimum are the min and max values for the luma in the current frame ignoring the brightest and darkest 0.4%.

If you use the script I posted, playing for a little bit the video loaded in VirtualDub, it will generate a file will all this information, that you can easily open and check for hisghest and lowest Y values

London 01-08-2022 02:20 PM

Thanks for the explanation lollo2. I will do another test at default settings to be absolutely certain of the capture range capability.

Just to clarify, this was the script I used for those tests in my previous post:-

Code:

AVISource("Full Levels.avi", audio=true)
Crop(12,4,-12,-12)
ConvertToYV12(interlaced=true)
ColorYUV(analyze=true)

As you can see I cropped a bit extra to make sure there were no black borders or bottom head switching noise affecting the ColorYUV readings.

I think this concludes that my Diamond VC500 USB can capture luma from 1 to 254.

This brings me to an important point about capturing. There are 2 schools of thought (probably more), but basically:-
a) creating captures using the full range capability of the capture device (in my case Y=1-254); or
b) creating captures to broadcast safe/legal levels (Y=16-235).

When I captured with the full range - pushing the Levels in the VDub Histogram to just touch the 1 and 254 positions, the video appears to have too much contrast. Whereas adjusting the Levels to keep within the Histogram Y=16-235 the video appears more natural.
The video I am testing with was created by a professional videographer. My thinking is that this tape may have been mastered with luma values within 16-235. Therefore the source I am dealing with in this particular instance has a luma range of 16-235, so I should capture at that range? Does this sound correct, or should I still capture at full range?

lollo2 01-08-2022 03:26 PM

Quote:

When I captured with the full range - pushing the Levels in the VDub Histogram to just touch the 1 and 254 positions, the video appears to have too much contrast.
Maybe I was not clear, sorry. You should not push anything, just capture at the default of your card. Eventually shrink (never expand) to avoid clipping and crushing.

My school of thought:
  • leaving the card at its default allow you to capture what is on tape without modification (when not clipping whites or crushing blacks)
  • if you need to adjust the levels later for whatever reason you can do it with AviSynth in a more effective way than with procamp
  • in order to judge colors and levels you need trained eyes and calibrated monitors
  • use procamp only to avoid crush of blacks and clip of whites (not always possible, https://forum.videohelp.com/threads/...ng#post2580749
  • if your source is 16-235, and has been mastered as such on tape (not sure), it should be captured in that range with the default setting; if you see differently I assume on tape is not 16-235

Your, and others, mileage may vary!

London 01-08-2022 05:53 PM

Quote:

use procamp only to avoid crush of blacks and clip of whites
Thank you for the advice lollo2, it is much appreciated and has helped me understand the principles of optimum luma settings at capture stage, as well as the capability of my capture device.

Some summary notes, since I started this thread and what I have learnt:-

(note: My source is PAL VHS
My workflow is VHS -> Composite -> Panasonic ES10 -> S-Video -> Diamond VC500 USB, Windows 10).

Use VirtualDub 1.9.11 for capture, Lagarith YUY2 compression.
Capture at 720x576 (for PAL).
use default proc amp settings - only adjust Levels to prevent crushed blacks and clipped whites.
Video menu, Capture Filter (check 'Video Standard' is set correctly), clicking OK should make the 'Preview' window appear. 'Overlay' does not display the video.

It is not necessary to resize in AviSynth.
Crop 16 pixels off the sides and add black borders to keep the frame size at 720x576 with the display area at 704x576 (this is as close to Rec.601 spec, 702x576, as possible with Mod4).
Use AviSource() as the source filter. Keeps the video in YUY2 and shows the correct frame rate.
FFmpegSource2() converts colour space to YV16 and strange frame rates (sometimes).

For those following this thread that had asked, my final basic AviSynth+ script for deinterlacing and cropping out the non-visible content of the video, is:-

Code:

SetFilterMTMode("QTGMC", 2)
AVISource("VHSclip.avi", audio=true)
AssumeTFF()
QTGMC(Preset="Slower", Edithreads=4)
Crop(8,0,-8,-12)
AddBorders(8,4,8,8)
Prefetch(14)

and my command line FFmpeg for creating an MP4 is:-

Code:

ffmpeg64 -i "VHSclip.avs" -c:v libx264 -preset slower -crf 18 -aspect 4:3 -c:a aac -b:a 128k "VHSclip.mp4"

lollo2 01-08-2022 06:32 PM

All right except:

Quote:

Crop 16 pixels off the sides and add black borders to keep the frame size at 720x576 with the display area at 704x576 (this is as close to Rec.601 spec, 702x576, as possible with Mod4).
should be Crop 16 pixels off the sides to reduce frame size to 704x576 (this is as close to Rec.601 spec, 702x576, as possible with Mod4).

Quote:

Code:

SetFilterMTMode("QTGMC", 2)
AVISource("VHSclip.avi", audio=true)
AssumeTFF()
QTGMC(Preset="Slower", Edithreads=4)
Crop(8,0,-8,-12)
AddBorders(8,4,8,8)
Prefetch(14)


should be:
Code:

...
Crop(8,0,-8,-12)
AddBorders(0,4,0,8)
...

In general, in a complex AviSynth filtering you completely removes black borders and head switching noise then at the end center the active area and fill with black borders at left and right to reach 704x576:
Code:

# starting frame size: 720x576

# cropping
        crop_left=L <back pixels to be removed>       
        crop_top=T <back pixels to be removed>
        crop_right=R <back pixels to be removed>
        crop_bottom=B <noise pixels to be removed>
crop(crop_left,crop_top,-crop_right,-crop_bottom)
# filtering frame size (example): 720-(8+24)x576-(6+12)=688x558

#adding borders
addborders((crop_left+crop_right)/2-8,(crop_top+crop_bottom)/2,(crop_left+crop_right)/2-8,(crop_top+crop_bottom)/2)
# final frame size: 704x576

Edit: also check QTGMC parameters to avoid artifacts according to your source

London 01-09-2022 07:08 AM

I had been following your advice from Post #5 and had also read further about ITU-R BT.601, for example here:-
https://www.afterdawn.com/glossary/t...m/itu-r_bt_601

Isn't the Frame Size 720x576 and the Active Area 702x576 ?

PAL VHS uses 702 pixels of the available frame size, DV might use all 720 pixels, but to maintain the correct 4:3 aspect ratio of the source the frame size should remain as 720x576 ?
Hence:-

Code:

Crop(8,0,-8,0)
AddBorders(8,0,8,0)

would achieve the ITU spec compliant aspect ratio when encoded out ?

RobustReviews 01-09-2022 07:20 AM

Quote:

Originally Posted by London (Post 81753)
I had been following your advice from Post #5 and had also read further about ITU-R BT.601, for example here:-
https://www.afterdawn.com/glossary/t...m/itu-r_bt_601

Isn't the Frame Size 720x576 and the Active Area 702x576 ?

PAL VHS uses 702 pixels of the available frame size, DV might use all 720 pixels, but to maintain the correct 4:3 aspect ratio of the source the frame size should remain as 720x576 ?
Hence:-

Code:

Crop(8,0,-8,0)
AddBorders(8,0,8,0)

would achieve the ITU spec compliant aspect ratio when encoded out ?

Looks cromulent to me with a fast burst of mental arithmatic.

If you're cropping overscan or associated junk into the mix obviously you'll need to readjust, but it sounds to me like you've got more than the gist of how this works. :congrats:


All times are GMT -5. The time now is 12:10 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.