This all started over here: https://forum.videohelp.com/threads/338999-Calibrating-luminance-levels-color-for-capture-from-VHS
in hopes of getting my best possible capture from my VHS. It came to my attention that we had gotten off track and moved on to restoration so for archiving purposes we can work here in the proper forum.
Here is the clip in question:
http://www.mediafire.com/?wt90x90vht4l1m6
Script formed so far:
AviSource("StillCher2.avi")
AssumeTFF()
ConvertToYV12
Crop(24,40,-4,-24)
ColorYUV(gain_y=40, off_y=-20, cont_u=-90, cont_v=-40)
McTemporalDenoise(settings="low", interlaced=true)
AddBorders(16, 32, 12, 32)
Please keep in mind that this is the first time I have ever used scripts in any way. I'm a wiz when it comes to audio restoration but have decided to take a break to properly archive my VHS tapes once and for all. I'm getting more familiar with VirtualDub and am trying to do the same with Avisynth since it offers many quality functions not available or up to par in VirtualDub.
+ Reply to Thread
Results 1 to 30 of 166
-
-
Will be out a couple of days, I've 2 computer repair jobs at hand. But will look over this latest StillCher4.
BTW, I think we forgot about your "Commercial" video. Was posted in the previous thread https://forum.videohelp.com/threads/338999-Calibrating-luminance-levels-color-for-captu...=1#post2109901, and is still at http://www.mediafire.com/?lq06kj4sk6zvich.
Can't do much about it in this current thread; it has enough problems to fill a thread of its own. I did a bit of cleanup, but it's, well, kind of a mess. Whoever did the dupes on this tape didn't do any favors. I came up with some color and level filters that would improve things (I think you can forget about lots of detail, it just isn't in the clip). But it can be improved:
"Commercial", frame 482. Original=left, fix attempt = right:
[Attachment 8904 - Click to enlarge]
Tough to get the blacks any darker, they're already blocking up in the original. Had to be kinda careful. Midtones and brights need tweaks. The VDub filters were NeatVideo, ColorMill, curves, levels, and BorderControl (image earlier centered in AviSYnth). The filters get OK results in this shot, but won't work for the other shots in this commercial. Every shot looks different. Example, the same filter settings won't work in Frame 223:
[Attachment 8905 - Click to enlarge]
Those dudes look as if they weren't wearing Coppertone. You'd have to break this clip into smaller ones, to handle each scene. Below, caps of bad frames 602 and 603, which has a lot of smearing, ghosting, and various noises. There are 4 bad frames in a row here, followed by 2 more shortly after.
[Attachment 8906 - Click to enlarge]
I applied what you'd call a very lazy fix in AviSynth. Thyen added some VDub filters. Good thing there's no motion around the dozen or so bad frames, or there's no way you could do it the way I did here:
[Attachment 8907 - Click to enlarge]
3.4 MB MPEG of this original shot, unmodified: http://dc217.4shared.com/download/S7YmLPCn/Black_start.mpg
3.5 MPEG of really lazy fix: http://dc303.4shared.com/download/QASlbuC0/black_LazyFix.mpg
To really clean this short clip, you'd have to get into some heavy AviSynth, especially with those "wiggling" letters. Too much to cover here. Sorry for the brief diversion, I'll stick with StillCher4. That's problems enough on its own. What to do about that magenta stain in the white frames, and the other noise from tape damage. ? ? Later.Last edited by sanlyn; 21st Mar 2014 at 06:41.
-
For example if you wanted to take of 4pixels on the right black border and add it to the left black border
crop(0,0,-4,0)
addborders(4,0,0,0)
http://avisynth.org/mediawiki/Crop
http://avisynth.org/mediawiki/AddBorders
Read the section on crop restrictions. There are rules you have to follow for different colorspaces, and interlaced vs. progressive
The commercial is actually progressive content (23.976 fps) and hard telecined. It should be inverse telecined (IVTC) to recover the original progressive frames . This differs from the other sections which appear to be true interlaced video (59.94 fields per second or 29.97 frames per second)
I don't suppose this Cher special was ever released on DVD ? That would save a lot of time -
AssumeTFF().ConvertToRGB32(matrix="Rec601",interla ced=true).Crop(0,0,-4,-5).AddBorders(4,0,0,5)
Note that in RGB you can use odd numbers in Crop(). Can't do that in YUV. Watch out for that code, tho, the forum's posting software put an extra blank space in "interlaced". When you copy code from this forum, check for that sort of thing. Very annoying!Last edited by sanlyn; 21st Mar 2014 at 06:41.
-
Okay, I gotta fix 2 PC's and pay for some of these video toys. But I did a quick looksee at StillCher4. Wouild still like to know how this clip looked before color/levels was changed, so I can't recommend anything now. Didn't see anything that can't be fixed in VirtualDub or AviSynth, but the stain and some noise will more than a little MCTD.
Top- to bottom, Frames 106, 225, and 277:
[Attachment 8917 - Click to enlarge]
[Attachment 8918 - Click to enlarge]
[Attachment 8919 - Click to enlarge]
You can tell ColorTools to black out out-of-range pixels. There are cute black patches in all three frames (look at Cher's knee in Frame 225). That magenta stain shows in the top left corner of the shots with "Indian" Cher (they're also too green). Much of the horse is at RGB 0 (frame 277). Read pixels with CSamp, you'll see what I mean.
There are patches of noise in the white frames, and lots of noise on the sofa. Put the video in AviSynth and cycle thru frames 224, 225, 226, back and forth, a frame at a time, and look at the sofa. You'll see what I mean.
Obviously you can't use the same color settings for both these shots. Cher looks yellow-squash in the sofa scene, and she's turning purple on the horse. Too bad the feathers are washed out a bit, but not much you can do. Some problem with the shadows on Indian Cher's arms and face; don't know exactly what. Will have to look at this later. Oughtta be something could be done about the magenta stain: it's due to tape aging and improper storage (heat, likely). But, then, it could just be the tape was made that way. It happens.Last edited by sanlyn; 21st Mar 2014 at 06:42.
-
I'm joining in late and didn't read over the other thread, but it looks to me he is forcing RGB in the huffyuv capture
Both AVISource and FFVideosource return RGB. Mediainfo identifies it as the RGB variant of huffyuv
This will cause the highlight clipping you are seeing, they will not be salvagable
The RGB Rec601 conversion will cause
Y' 16-235 => RGB 0,255
If he stayed in YUV, then it's possible to at least slightly improve it because you have more headroom Y' 235-255. Or do a better job of adjusting the capture settings in the 1st place , I didn't read the details on how he has that set up -
poisondeathray, I didn't notice colorspace when I converted the source download from ffdshow-huff to plain huffyuv2.2. Afterward, I tried both Rec601 and PC601, and got exactly the same thing in VirtualDub. I don't know that cherbette's ColorYUV would have worked originally if the clip was RGB -- Hm, I just scrolled up to post #1. There's convertToYV12 before applying filters. I've always capped YUY2 with huff, RGB when uncompressed.
Last edited by sanlyn; 21st Mar 2014 at 06:42.
-
I'll start another thread I suppose for the commercial? So we don't confuse the heck out of everyone who may come across this later for help lol. The special and the commercial are from two separate tapes...neither of which have ever been on DVD as is with much Cher-related material. The Sonny and Cher Comedy Hour for instance hasn't been released on DVD completely due to licensing costs and potential lack of interest/sales? Anyways I have been a collector for many years now (initially starting with the re-runs of the S&C Comedy Hr on TVLand) and some things I have are very rare (I've never seen them elsewhere) and some not as rare. The quality varies depending on whether I taped it or I got it a couple generations later.
-
If I'm understanding this correctly, i should split the clips and color correct them individually? I kind of thought that might be the case because the interview clips have such a yellow hue to them...I always figured some of it was some kind of lighting for miss Cher's face. haha
-
Last edited by sanlyn; 21st Mar 2014 at 06:42.
-
There's something very different going on between your computer and mine. I see no out of range values in those frames (106, 225, 277). In fact, I don't think Color Tools can detect out of range pixels in RGB video, they're impossible. black should be 0 in RGB, white 255. It isn't possible to have pixels below 0 or above 255. But I'm having problems with Color Tools right now. It keeps crashing VirtualDub.
Last edited by jagabo; 29th Sep 2011 at 16:28.
-
Should that be applied after filters?
Also, I capture with thru VirtualDub>Device: VC500 Video (Direct Show), NTSC_M, UYVY (only one listed in the drop down), 720x480 (only has two other options in the drop down and won't let me add my own) and Huffyuv v2.1.1 as my "Compression" at capture point.
Perhaps when I opened the full documentary after capture into VirtualDub and trimmed out that small demonstration portion (StillCher4.avi) a colorspace conversion happened? -
-
To be clear, we're talking now only about StillCher4.avi ?
Weird. YV12? not YUY2 ?
Vdub file=>file information when opening directly shows huffyuv v2.1.1 CCESP Patch v0.2.5 for me (So I think that is my default VFW decoder for fourcc HFYU)
ffdshow decodes NTSC DV-AVI as 4:2:0, so it might have problems with huffyuv as well ? Try disabling it
Both ffmpeg and ffmbc identify it as the RGB variant as well (actually "BRGA" to be specfic) -
Yes.
Yes, YV12. I can force it to output RGB with "pixel_type="RGB32". But by default it returns YV12. I have ffdshow set up to output YV12, YUY2, or RGB32.
If I disable ffdshow's hfyu decoder AviSource() can't open the file. Virtualdub can open it directly with it's internal hfyu decoder though. But there's no way to see exactly what colorspace is coming out of the decoder. -
Well everything on my side seems to indicate it's RGB . Even DirectShowSource returns RGB, and graphstudio shows ffdshow (directshow)
-
Last edited by Cherbette; 29th Sep 2011 at 19:01.
-
In any case, the StillCher4.AVI file doesn't appear to have any blown out brights or crushed blacks to me. I think sanlyn is using Color Tools incorrectly. And in all the places he's showing over bright pixels they are over sharpening halos from the VHS deck. It's OK for those to blow out. That's why there's room above IRE 100 (Y=235, RGB=255) in YUV video.
-
Well, wait, I want to be certain I'm working correctly and in agreement with everyone's methods.
First: No matter whose huffyuv decoder I use to open these downloads initially, AviSource.Info() sez RGB32. AviInfo says "HFYU - Unknown", but no colorspace info). MediaInfo sez "huffman". I've been assuming some form of YUV. Fortunately, ConvertToRGB32 doesn't do anything if the clip is already RGB.
Yep, I do see VCR oversharpening -- a common site with VHS, you just live with it. I didn't mean to imply those feathers were burned up, they're only RGB 225 (I actually measured them. Did anyone else do that? Surely I can't be the only video hobbyist who checks pixels to see what's going on). The black pixels, according to ColorTools, are below NTSC 0 (RGB 16) or above IRE 100 (RGB 235). I don't see or measure any clipping. I'm seeing RGB 8, 5, 0, 240, 247,255 in my calibrated monitor, and measuring those values. RGB 8, 5 and 0 don't "look alike" or clip on my screen, nor do RGB 240 and 255 look alike. So when I say out-of-spec, I mean not within 16-235. I see plenty of video around that likes to drop to RGB 8 for "punch", and I do it myself a bit. I just want to be sure I'm working with the proper concept for Rec601.
I agree with the comment on ColorTools giving "odd" values on its histogram "max" figures. I've been seeing and ignoring those for years. I think ColorTools might do some kind of scaling of those numbers based on the color/IRE values in its setup window (??). I make frequent caps from VirtualDub and check ColorTools with Adobe's histograms: layout differences aside, both 'grams look alike to me.
So...I hope I've been doin' this right.Last edited by sanlyn; 21st Mar 2014 at 06:43.
-
colortools is unreliable better stick with avisynth for levels measures
I have checked the black level it says it's at 32 and should be at 16 and 128/128 for UV, word to the wise*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
I don't understand what you mean by "checked the black level" with ColorTools. I don't use ColorTools to read pixels. I didn't know AviSynth had a pixel sampler. What plugin do you use to allow AviSynth to read a 3x3 or 5x5 pixel area?
Last edited by sanlyn; 21st Mar 2014 at 06:43.
-
Ever heard of the crop filter ? You might wanna use it sometimes it's useful
crop + resize actually*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
Same here.
1. enable ffdshow huff de-coder, leave ffdshow VFW en-coder disabled.
2. Open video, re-compress with Huffyuv2.1.1/2.5 Patch.
3. disable ffdshow huff decoder
I don't know what kind of huffyuv decoder is being used by ffdshow, but I can't open most huffyuv video properly if the ffdshow decoder is turned on.Last edited by sanlyn; 21st Mar 2014 at 06:43.
-
VirtualDub converts incoming YUV video to RGB for filtering and display. Like most other programs it uses the rec.601 matrix. So YUV 16-235 is contrast enhanced to RGB 0-255. Any Y values below 16 or above 255 are crushed during that conversion. In computer RGB blacks should be at 0, brights at 255, not 16 and 235 like in YUV video. Any pixels in the YUV source that were below IRE 0 (Y<=16) become 0 in RGB. Any pixels that were above IRE 100 in the YUV source (Y>=235) become 255 in RGB.
Conversely, most programs that convert RGB video to YUV for encoding assume computer RGB. Ie, it expects blacks at 0 and brights at 255 in the RGB source. That range is reduced to Y=16-235. Since the RGB source can't have pixels with negative values, or pixels with values over 255, there can be no pixels in the YUV result below IRE 0 (Y=16) or above IRE 100 (Y=235).
With an RGB source you have to know if the video is computer RGB or studio RGB (blacks at 16, brights at 235, with room for overshoot). Since most other software uses the rec matrices to convert YUV to RGB it's usually a safe bet that you are working in computer RGB. If you converted the YUV to RGB yourself in AviSynth you can chose to use either the REC (computer RGB) or PC (studio RGB) matrices.
Computer RGB:
ConvertToRGB()
ConvertToRGB(matrix="rec601") #usual for standard def
ConvertToRGB(matrix="rec709") #usually for high def
Studio RGB:
ConvertToRGB(matrix="pc.601") #usual for standard def
ConvertToRGB(matrix="pc.709") #usually for high def
If you work in studio RGB in VirtualDub you must inform the encoder that the video is studio RGB, not computer RGB. For example, if you save your results in studio RGB, then open that video in TMPGEnc Plus to encode as MPEG 2, you must use the studio RGB setting in TMPGEnc Plus.Last edited by jagabo; 30th Sep 2011 at 06:40.
Similar Threads
-
Best UK PAL VHS / D-VHS machines for digitising old VHS tapes
By pauldsc in forum RestorationReplies: 8Last Post: 6th Jan 2012, 09:21 -
What are the best filters for VHS captures?
By mpwr5 in forum Video ConversionReplies: 12Last Post: 2nd Oct 2010, 01:52 -
Tweaking mencoder options
By acid_burn in forum DVD RippingReplies: 3Last Post: 27th May 2008, 08:59 -
program to "diff" two or more DV captures of same VHS source?
By miamicanes in forum Capturing and VCRReplies: 0Last Post: 11th Sep 2007, 10:49 -
Video Configuration tweaking...
By NHRaider in forum Media Center PC / MediaCentersReplies: 19Last Post: 15th Jul 2007, 14:16