I had thought this could only work in MPC-HC and other programs that I find annoying to use with capture cards, but I opened my device in VirtualDub without realizing the scripting was still active and was pleasantly surprised. Based on [1] and [2].
Steps
Here is the script I used in the GIF animation above. The result is a 2 fps video that flips back and forth between the playback chain and the source MPEG-2 file I was attempting to calibrate to.
- Download/install ffdshow tryouts, AviSynth, VirtualDub, and GraphEdit (all 32-bit versions). I'm using ffdshow 1.3.4500 with AviSynth 2.6 and VirtualDub 1.9.11.
- Run ffdshow's Video decoder configuration, either from the option presented at the end of the install or the Windows Start Menu.
- In the Codecs pane, scroll down to Raw video at the very bottom and change it from Disabled to All supported.
- Scroll down in the left panel and put a checkmark next to AviSynth.
- Enter your script into the text pane on the right. Note one major annoyance: your script needs to include a Resize down to your capture resolution (unfortunately distorting the image and the scopes). Anything beyond the bounds of the video resolution signaled by the card to the app simply gets cropped. It's not so bad when you use a reference image similarly distorted, as I did in the image above. Instead of resizing, you could also crop out part of the source image if you wanted to keep the scopes at full resolution.
- Open VirtualDub and select your capture device as normal. The result of the script should be visible in the capture window and the red FFv icon should be present in the system tray, indicating that ffdshow is processing the video.
- To adjust your card's Proc Amp settings while keeping the live display active, open GraphEdit.
- Hit CTRL+F and scroll to the bottom. Expand WDM Streaming Capture Devices, select your card, and click Insert Filter.
- Right-click on the block you just added and choose Filter Properties. Click the Video Proc Amp tab at the top of the new window and arrange your three windows so GraphEdit's two don't cover the VirtualDub live video.
- You should now be able to interactively adjust the Proc Amp while seeing the result on the video and scopes.
- When you're done using this functionality, repeat step 3 in reverse to take ffdshow out of the path between your card and VirtualDub.
Code:VideoScope("both",true,"Y","Y","UV") BilinearResize(720,480) SelectEvery(30,0) A = last MPEG2Source("T:\VHPatterns2\VHPatterns2_0.d2v").ConvertToYUY2().Trim(520,-1) VideoScope("both",true,"Y","Y","UV") BilinearResize(720,480) B = last Interleave(A,B)
+ Reply to Thread
Results 1 to 8 of 8
-
Last edited by Brad; 9th Nov 2013 at 20:12.
-
I've used some other techniques to get realtime waveform monitors or histograms of video capture sources:
https://forum.videohelp.com/threads/355860-AviSynth-Filter-Suggestions?p=2240351&viewfu...=1#post2240351
https://forum.videohelp.com/threads/335493-Well-VHS-capturing-Mostly-cartoons-having-so...=1#post2138595 -
I picked up the GraphEdit trick from a post here, probably one of yours.
I have used VirtualDub's capture histogram display before, but I (almost?) always have to force Preview mode to get it to display anything, and usually I get either a flashing video display or none at all.
Does the DirectShowSource method really work? I just built a graph of WDM Streaming Crossbar + WDM Streaming Capture Device and I get an "unable to determine duration of the video" error. I tried adding "framecount=30" and it seems to load 30 frames into RAM, then error with "the video Graph failed to restart after seeking" if those fall out of RAM.
EDIT: Oh, I get it. I used "framecount=99999", loaded it and hit Play and I see that it requests frames in realtime. Using a steady 654MB of RAM. This does seem like the most useful method for my purposes.Last edited by Brad; 10th Nov 2013 at 00:50.
-
Not sure if it applies to all capture devices, but I haven't been able to avoid an RGB conversion within the graph using the GRF+DirectShowSource method with the VC500.
-
The result when the pixel type is forced is an error message: "GRF does not have a compatible open video pin."
Thinking about it further, it's no doubt due to this specific device being limited to UYVY. I think what I need to find is a DirectShow filter to transform UYVY into YUY2 instead of the AVI Decompressor -> Color Space Converter chain that is used by default (removing them breaks the graph).
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318185%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd390907%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd387892%28v=vs.85%29.aspx -
"Conexant UYVY Color Format Converter" did the trick. Naturally...
And I discovered something I can't explain. I finally saw superblacks with this VC500, but as soon as the One Touch Video Capture software is opened in the background, they are clipped until I unplug it and replug it. I don't even have to touch its Proc Amp window for this to happen. (This explains why Oldretiredguy's later captures have superblacks clipped; if it had been the TBC/NR feature that'd be a lucky coincidence for the VCR's "16" to happen to match the VC500's "16" without calibrating.)
The upshot is: I can either adjust only Brightness/Contrast using GraphEdit to avoid clipping (since the other controls are greyed out), or I can accept it and have access to all of the them.
Similar Threads
-
Compression of a video using ffdshow in virtualdub
By vinz508 in forum Newbie / General discussionsReplies: 29Last Post: 16th May 2012, 08:15 -
VLC wont play DV video after installation of AVStoDVD, ffdshow, VirtualDub
By granturissimus in forum Newbie / General discussionsReplies: 4Last Post: 11th May 2011, 03:44 -
MVTools & AVISynth script question with FFDShow
By Gnodab03 in forum Software PlayingReplies: 7Last Post: 8th Jan 2010, 19:05 -
VirtualDub cannot properly load H.264 Lossless video from AVI or Avisynth
By Jedi787Plus in forum Video ConversionReplies: 1Last Post: 14th Oct 2009, 21:38 -
what's the avisynth deinterlace alternative for ffdshow's ?
By cobalt in forum Newbie / General discussionsReplies: 12Last Post: 24th Sep 2009, 09:34