Log in

View Full Version : Handling VHS-C home video tape captures


gametiger
17th December 2011, 13:06
Hello.


I'm currently in the process of converting my family's old VHS-C (PAL) home videos into a digital format.
I was hoping you guys could give me some tips or point out possible mistakes.

Here's basically how I'm planning to do things:

Capture the video (already started with this part)
I'm using my old Panasonic VHS VCR and a VHS-C to VHS adapter that I still have from back in the day. Both are in good condition so they should be fine for my purposes.
I'm doing the actual capturing with a Dazzle DVC 100/107, using composite video out from the VCR (S-Video actually gave me worse results), with the software that came with it (Pinnacle Studio 15 HD).
AviSynth post-processing (trim/crop/deinterlace/sharpen/denoise/etc.)
Encoding
Probably x264 in MKV (not set on the audio codec yet - any ideas?)


Please let me know if you have any objections regarding what I've just described :)


Since this is the AviSynth sub-forum, my main question will revolve around 2. AviSynth post-processing though.

Some characteristics of the output I'm getting from the capture software:
Video: high bitrate DV in AVI, PAL 4:3 (720x576), interlaced
Audio: 16 bit 48kHz Stereo PCM

Guess I'll just show you what I've come up with so far:

# Adding the source (DV codec is Cedocida)
AviSource("capture.avi")

# Cropping and trimming
# (should I do this before or after deinterlacing?)
Crop(12, 2, -16, -10)
Trim(335, 15928)

# Deinterlacing
# I was doing some research on the forums and QTGMC() seemed to fit my needs (I know it's very slow),
# unless there's something else that might fit better?
# Any other parameters I should be using with it?
QTGMC(Preset="Slower")

# As I understand it, QTGMC() does some denoising and sharpening on its own,
# so I probably won't need to use any other denoising/sharpening filters?


Since QTGMC() will double the frame rate (bobbing?), this will give me 50p video.
In another thread I saw someone recommending an upscale to 720p, mainly for compatibility, I think (many HW players don't seem to like 576p50 video, apparently?). Is this something I could/should do also?
I'm mainly gonna stream the files with a HTPC off of a NAS, but I figure more compatibility wouldn't hurt...

And about the SAR... I think common practice is to specify it when encoding (i.e. --sar for x264 command line encoding), right? If I'd upscale to 720p though, couldn't I include the SAR adjustment when resizing, so the resulting video would already have the correct aspect ratio? Or is this generally a bad idea (wasting bytes by creating additional resolution that doesn't contain any additional information, etc.)?


This is about it for now, I hope I didn't ask too many questions :o

Thanks in advance for any help!

sneaker_ger
17th December 2011, 13:29
Since QTGMC() will double the frame rate (bobbing?), this will give me 50p video.
In another thread I saw someone recommending an upscale to 720p, mainly for compatibility, I think (many HW players don't seem to like 576p50 video, apparently?). Is this something I could/should do also?

576p50 is not allowed in the Blu-Ray standard, but that is nothing you have to concern yourself with when encoding to MKV.

And about the SAR... I think common practice is to specify it when encoding (i.e. --sar for x264 command line encoding), right? If I'd upscale to 720p though, couldn't I include the SAR adjustment when resizing, so the resulting video would already have the correct aspect ratio? Or is this generally a bad idea (wasting bytes by creating additional resolution that doesn't contain any additional information, etc.)?

It is possible, but as you already suspected it is properly better to avoid that and instead set the according SAR when encoding (i.e. keeping the original anamorphic format), as it allows for better compression.

Ghitulescu
17th December 2011, 13:40
How came that the S-Video gave you worse results as composite? Well, I know only of one VHS model that actually has S-Video I/O, VHS decks have only composite, while S-VHS decks usually have S-Video. That means that you used a 1€ adapter and that's a no no.

The maximum compatibility is given by the industry standards. They give you the safety of two HW generations. The best choice for VHS-C still remains (in indutry standards) the DVD (same DAR/PAR/framesize/fps) - the recordings are treated like TV live (or like 4:3FS commercial DVDs) and are universally playable.

There are people around here that prefer encodings in H.264 in various resolutions, but they are more or less dependable on PC or specific HW solutions (Mediaplayers) and they are at the manufacturer's good will of supporting those formats on various DVD/BD-players.

Anyway, any solution you will pick up, be sure you'll keep the tapes and the player/s at hand, in 5 years you'll get for sure another advice to reconvert the recordings into the "codec of the year" whatever it will be it by then.

The quality of the transfer depends largely on the player and the aquisition device, everything else is only a "treatment of effects", never use SW solutions to correct HW errors, however SW solutions are needed for things difficult/expensive to be solved in HW. Anyway, the ultimate judge of qualtiy is you. if you're happy that's it.

Gavino
17th December 2011, 14:41
# Cropping and trimming
# (should I do this before or after deinterlacing?)
Crop(12, 2, -16, -10)
Since source is DV (hence YV12), any vertical cropping must be in multiples of 4 if done before deinterlacing, otherwise chroma will be screwed up between fields.

TheSkiller
17th December 2011, 16:09
Yes, another thing is, as soon as you start to crop anything at all you will end up with a non-standard frame size, except if you resize after that anyway.
But then you will in fact have zoomed in into the picture since on TV playback there will be overscan which would hide any nasty borders anyway.
Therefore my advice: TV playback = never crop (mask with black if really needed), PC playback = crop and resize (or leave anamorphic if you end up with a reasonable frame size), but be sure not to distort the aspect ratio when cropping + resizing. Think of cropping like this: you zoom evenly into the picture until all borders are gone, which usually implies to cut off something good as well because the borders are usually not evenly distributed to the sides.

Edit: upscaling to 720p will give better hardware capability but unfortunately vanilla 720p means you would have to pillarbox the video which is probably 4:3 to a 16:9 frame which is no good because it will give windowboxing (black bars on all sides) with any display except 16:9 ones (computer screens of 16:10, 4:3, 5:4 and TV screens of 4:3), imo not very preferable.

johnmeyer
17th December 2011, 18:21
I transfer VHS to DVD all the time for clients. Because VHS is interlaced, I never deinterlace. Why? Because deinterlacing -- even with the excellent QTGMC -- loses picture detail forever. I realize that most (although not all) modern displays do not handle interlacing in a native fashion, but that isn't necessarily always going to be the case. Also, the deinterlacers in most modern plasma or LCD TV sets is pretty darned good.

Another thing is that I always try to use a VCR that has a time base corrector built in. Until I got one I really didn't appreciate how much of a difference it makes. There have been a few attempts, documented in this forum, to create a time base corrector in software, but unfortunately it can't really do the same thing because the software doesn't have access to the original analog signal and can only attempt to deal with the artifacts after the fact, some of which cannot reliably be detected in software.

I would also suggest that whatever post processing you do, once you create something that you think is working, reduce all the settings in half so that the filters do less to the video. My experience in denoising is that everyone always turns up the settings way too high because they are initially really happy that all the noise (or other artifacts) are gone, but they fail to recognize that in certain scenes in their video, all sorts of really bad artifacts are now lurking. This only gets discovered, sometimes months later, when they actually sit down and watch the entire result.

I am speaking from a lot of personal experience: I ruined a lot of otherwise great VHS captures by being too aggressive with my AVISynth restoration scripts.

Here is a starting point of what I use. I never use the exact same settings for any particular job because there is no "best" approach for any given VHS video. For instance, some videos have massive numbers of dropouts because they were recorded on cheap tape. I have a completely different set of code to deal with those. So, use this as a starting point. I would change the comments in the script to simply use MDegrain2 (it's a lot faster) and I'd call the MDegrain2i2 function using 8,0,0 because its really fast. Also, I'd comment out the sharpening.

Use these suggestions as a starting point, and then tweak from there.

Oh, one other thing. The "VShift" and "HShift" parameters are designed to compensate for chroma shift artifacts that happen if you are capturing from a dubbed tape (a copy) rather than the original. It can also happen in other circumstances. However, while this can reduce certain types of ghosting, there are better approaches for other types of problem. In particular, there was a really nice discussion in these forums a month or two ago where Dideé looked at a specific type of chroma shift and came up with an interesting approach to that particular problem. It is worth a read if you find that you have any chroma shift artifacts (i.e., colored ghosts).

Finally, do a search on "VHS" in these forums and you'll find a huge wealth of information on this subject. Restrict the search initially to just look at thread titles, and if you don't get enough information, try the search again, this time looking at the entire thread.

#Denoiser script for interlaced video using MDegrain2

SetMemoryMax(768)

Loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
#Import("C:\Program Files\AviSynth 2.5\plugins\Film Restoration\Script_and_Plugins\LimitedSharpenFaster.avs")

SetMTMode(5,0)
#Modify this line to point to your video file
source=AVISource("E:\frameserver.avi").AssumeBFF()
SetMTMode(2)

#Only use chroma restoration for analog source material
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false) #VHS
#chroma=source.Cnr2("oxx",8,14,191,75,255,20,255,false) #Laserdisc

#Set overlap in line below to 0, 2, 4, 8. Higher number=better, but slower
#For VHS, 8,4,0 seems to work better than 8,0,0, but is much, much slower.
#However, 8,0 is good enough and MUCH faster.

output=MDegrain2i2(chroma,8,0,0)

#stackvertical(source,output)
#stackhorizontal(source,output)
#return output.Levels(16, 1, 235, 0, 255, coring=false)
return output

#-------------------------------
function MDegrain2i2(clip source, int "blksize", int "overlap", int "dct")
{
Vshift=0 # 2 lines per bobbed-field per tape generation (PAL); original=2; copy=4 etc
Hshift=0 # determine experimentally
overlap=default(overlap,0) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker

fields=source.SeparateFields() # separate by fields

#This line gets rid of vertical chroma halo
fixed_fields=MergeChroma(fields,crop(fields,Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
#This line will shift chroma down and to the right instead of up and to the left
#fixed_fields=MergeChroma(fields,Crop(AddBorders(fields,Hshift,Vshift,0,0),0,0,-Hshift,-Vshift))

super = fixed_fields.MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, blksize=blksize, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, blksize=blksize, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, blksize=blksize, overlap=overlap, dct=dct)

# MDegrain2(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)

# Eliminate next three lines and uncomment above line to use MDegrain2 instead of MDegrain3
backward_vec6 = super.MAnalyse(isb = true, delta = 6, blksize=blksize, overlap=overlap, dct=dct)
forward_vec6 = super.MAnalyse(isb = false, delta = 6, blksize=blksize, overlap=overlap, dct=dct)
MDegrain3(fields,super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,backward_vec6,forward_vec6,thSCD1=400,thSAD=300)

unsharpmask(60,3,0) # This is optional sharpening. Probably better off without it for most VHS video

#This function is unstable under SetMTMode and is a lot slower than unsharpmask.
#limitedSharpenFaster(smode=1,strength=160,overshoot=50,radius=2, ss_X=1.5, SS_Y=1.5,dest_x=720,dest_y=480)

Weave()

} #end function MDegrain2i2

gametiger
18th December 2011, 15:45
Thanks for your answers!


Since source is DV (hence YV12), any vertical cropping must be in multiples of 4 if done before deinterlacing, otherwise chroma will be screwed up between fields.
Generally, should I do the cropping before or after I deinterlace?

Oh and in the example I gave (Crop(12, 2, -16, -10)), isn't the vertically cropped amount a multiple of 4 (i.e. 12)? Or do both the top and the bottom, each on their own, have to be multiples of 4?


Edit: upscaling to 720p will give better hardware capability but unfortunately vanilla 720p means you would have to pillarbox the video which is probably 4:3 to a 16:9 frame which is no good because it will give windowboxing (black bars on all sides) with any display except 16:9 ones (computer sceens of 16:10, 4:3, 5:4 and TV screens of 4:3), imo not very preferable.
Are you saying if I'd upscale to 720p, it would have to be 1280x720? Couldn't I just upscale to, e.g. 960x720? Or wouldn't this help in terms of HW compatibility?

Ghitulescu
18th December 2011, 15:51
Are you saying if I'd upscale to 720p, it would have to be 1280x720? Couldn't I just upscale to, e.g. 960x720? Or wouldn't this help in terms of HW compatibility?

You may find a list of players that would play such a framesize, but I'll give a huge list of HW players not accepting it. The more you step away from the industrial standards, the less its compatibility and the higher the chances that you'll see it only on a computer.

Gavino
18th December 2011, 16:50
in the example I gave (Crop(12, 2, -16, -10)), isn't the vertically cropped amount a multiple of 4 (i.e. 12)? Or do both the top and the bottom, each on their own, have to be multiples of 4?
If done before deinterlacing, both have to be multiples of 4.
If done after, they can be multiples of 2.

It doesn't really matter whether you crop before or after deinterlacing as long as you follow those rules.
Cropping before will make the deinterlacing faster (less pixels to process), but that's marginal unless you're cropping a lot, and it also has the more restrictive mod4 requirement.

hello_hello
18th December 2011, 17:44
My personal view these days is industry standards be damned. It seems a little silly to me to worry about not using a certain resolution if the video's not going to be converted to an "industry standard" format (ie DVD or Bluray compliant disc), because as soon as you use a player capable of playing "non industry standard" files it's not likely to be a problem. Ever used a DVD player capable of playing AVIs which would only play them if they used "industry standard" resolutions?

Having said that, as the video contains family memories and is already DVD format friendly, I'd be converting the tapes to DVD "as-is", at the maximum possible quality. No de-interlacing, cropping or filtering etc. The DVDs would then become my "master" in case later down the track I wanted to convert the video to different formats (the quality of the tapes will only deteriorate with time). Plus it does have the advantage of being able to make copies for the technologically backward family members while hoping you don't have to show them how to use the DVD player for the 27th time. :)
From there I'd either re-encode them or capture them again in whatever format works for me.

Ghitulescu
18th December 2011, 19:21
My personal view these days is industry standards be damned. It seems a little silly to me to worry about not using a certain resolution if the video's not going to be converted to an "industry standard" format (ie DVD or Bluray compliant disc), because as soon as you use a player capable of playing "non industry standard" files it's not likely to be a problem. Ever used a DVD player capable of playing AVIs which would only play them if they used "industry standard" resolutions?

I feel again the need to remind those born in this millenium, that adding AVI/divX capabilities to DVD players is quite a new addition, it took longer by comparizon to make them be able to read recordable DVDs (that's we had the booksetting) and SVCDs(/CDR). It was a marketing thing, not a standard requirement.

It also took 15 years and three trials for MP3 to be implemented into CD-players, caraudios and mobile players.

Of course someone born yesterday that visits a nowadays supermarket might think that the ability to play divx/avi/mkv/mp3 and others is a native feature of any satellite receiver, or that the ability to display JPG photos is an inherent feature of any navigation system (GPS), or that refrigerators with integrated TVs are the result of a normal integration procedure of technical compatible requirements.

So, up to some 10 years ago it was not possible to watch a divx on the TV, only on a computer. Up to 15 years ago it was not possible to listen an MP3 otherwise than on a computer. Yes, today is possible. But I don't think that all the people converting like hell their music and movies into MP3/AVI ever thought of having them on standalones. And they definitively didn't nicely wait for 10-15 years to see their "long felt need", their dream come true. What if RIAA managed to stop Rio? And even today the divx certification is given by the #1 enemy, Rovi, formerly known as Macrovision.

In the same class, the only way of having VHS is the DVD (cheap, distribution format), maybe DV (expensive, shorter, but more edit-friendly).

hello_hello
18th December 2011, 20:38
No need for a history lesson. No need to speculate on whether people converting video to AVI ever thought they'd be playing them on standalone devices. It's not even a relevant response to what you quoted. If you're not converting to an industry standard format then you generally don't have to stick to industry standard resolutions because the player you're using, if it supports the file type, probably won't care. That was my point. Nothing more.

However in response to those who live in the past rather than just remember it, even my TV has a built in media player that'll play AVI/MP4/MKV etc directly from a USB stick. You can buy standalone media players (http://wdc.com/en/products/products.aspx?id=320) that do the same thing while almost fitting in your pocket. In fact some do. If you buy a Bluray player today which doesn't play non standard files there's possibly something wrong with you. Some standalone devices (mainly Bluray players) may have only recently introduced playback of non-standard formats, if they have at all, while others have been doing it for years, but the PC is far from being the only device which will play them. Today. Not in ten years time.

Ghitulescu
19th December 2011, 09:34
I don't know how other people think of their camcorder memories, but I never thought of compressing my recordings into a format that is not compatible with the majority of the players at the time of the conversion or in a near term foreseeable future. That's the reason I made those recordings, to enjoy the memories, not to stay over a PC monitor, like people watched soccer in the '50ies.
The only format that was designed from the very beginning by non-professionals was MKV (for video). MKV is a very nice container yet its diversity of options are achieved only on a PC (and even there not fully). Please give me one single example of standalone (dvd player, bd player, mediaplayer, or by extension, sat-receiver & co) that can read the subtitles from MKV and not supplied as a SRT or similar external file. Reports are that some standalones refused to play the secondary audio in the case of a multilanguage MKV. Almost no AVI made before the advent of the first divx-certified standalones will be played on those, unless the manufacturers (of players and/or of LSIs) included some new changes I am not aware of.

To me, conversion of VHS-C into SD AVI or MKV is a no go. The DVD matches perfectly a VHS source in almost every detail. The DVDs can be ported with absolutely no reencoding onto Blu-rays (except for MP2 audio, which must be converted to AC-3 to please the mighty Dolby Labs). Two HW generations must be ok for most people, and even that the next HDTV standards will be probably 4k and beyond it won't matter, since VHS will look even more nastier on 4k than it looks today on 2k displays (half of it because of the cheap upscaling algorithms in cheap TVs/players and because of the artificial sharpening of LCDs).
The VHS-C might be upscaled to "pillarbox" HDTV (1920x1080i50) in H.264, after cropping to YYYx540 for PAL to remove the head switching noise on the bottom and sometimes the upper part of the image, so this way the next HW generation will be secured at the expense of the DVD compatibility.

hello_hello
19th December 2011, 12:32
I don't know how other people think of their camcorder memories, but I never thought of compressing my recordings into a format that is not compatible with the majority of the players at the time of the conversion or in a near term foreseeable future.

Having said that, as the video contains family memories and is already DVD format friendly, I'd be converting the tapes to DVD "as-is", at the maximum possible quality. No de-interlacing, cropping or filtering etc.

I can only assume your comment isn't directed at me?

That's the reason I made those recordings, to enjoy the memories, not to stay over a PC monitor, like people watched soccer in the '50ies.

I've addressed the "PC monitor" nonsense. Many people, including myself, have their PC hooked up to their TV so there's no monitor huddling going on. Then there's the fact that many/most current Bluray players will play non standard video, and if we're not there already, give it another year or so and it'll probably be as hard to find a Bluray player which doesn't support MP4/MKV etc as it is to currently find a DVD player which doesn't support AVI. And there's already a plethora of other dedicated devices designed to play all sorts of formats while using a TV for viewing.
I have no idea why you keep talking about being stuck viewing non standard files on a PC all the time, or referring to the majority of players as only supporting "industry standards" because these days they're probably in the minority, and there's no doubt they'll be the exception in the foreseeable future.

The only format that was designed from the very beginning by non-professionals was MKV (for video). MKV is a very nice container yet its diversity of options are achieved only on a PC (and even there not fully). Please give me one single example of standalone (dvd player, bd player, mediaplayer, or by extension, sat-receiver & co) that can read the subtitles from MKV and not supplied as a SRT or similar external file. Reports are that some standalones refused to play the secondary audio in the case of a multilanguage MKV. Almost no AVI made before the advent of the first divx-certified standalones will be played on those, unless the manufacturers (of players and/or of LSIs) included some new changes I am not aware of.

Well until you can give me a single example of someone posting here inquiring as to which format to use in order to add subtitles to their home videos, or to add a second language audio track, I can't see any of that having the slightest relevance to this thread.
But yeah, yippee.... if you want subtitles on many standalone devices, which are obviously more primitive media players than the PC, it might pay to hard-encode them. I always do. Need a second audio track? Re-mux the video stream into a new MP4/MKV while replacing the original audio with the alternative version and keep both. Big deal.

To me, conversion of VHS-C into SD AVI or MKV is a no go. The DVD matches perfectly a VHS source in almost every detail. The DVDs can be ported with absolutely no reencoding onto Blu-rays (except for MP2 audio, which must be converted to AC-3 to please the mighty Dolby Labs).

There's a new limitation with the MKV container I'm not aware of? One which stops it from storing 720x576 anamorphic mpeg2 video as you described above? I better check those vob files I remuxed as MKVs and put away for safe keeping to see if they still work.
But I'll give you a brief summation of my earlier post again....
In the case of the video in question here, I'd convert the tapes to DVD myself without any processing and put them away for safe keeping. Then I'd convert them while going nuts on the cropping and filtering etc, (or even just remux them now I think about it) to a less archaic format such as MKV for storing on the HTPC, which if you recall is what the OP says he'll be doing.

Ghitulescu
19th December 2011, 13:17
Well until you can give me a single example of someone posting here inquiring as to which format to use in order to add subtitles to their home videos, or to add a second language audio track, I can't see any of that having the slightest relevance to this thread.

I do multilanguage home videos with subtitles (the secondary audio being the comments), which subtitles help older relatives understand the subject without driving the VOL+ to the maximum.

hello_hello
19th December 2011, 13:55
I do multilanguage home videos with subtitles (the secondary audio being the comments), which subtitles help older relatives understand the subject without driving the VOL+ to the maximum.

Well terrific.... if industry standards work best for your home videos then stick with them. You'd be silly not to.
I assume though you won't mind if the rest of us don't base our every encoding decision solely on your home video requirements?

Ghitulescu
19th December 2011, 15:53
You can do whatever you like, I said what I have to say to the original poster.

He's the only one here that can assess the technical and "historical" quality of his own material, and the way he intends to preserve those memories. I haven't found yet a single DVD player (or for that matter a BD player) that refuses to play a [correctly authored] DVD. The next generation of playback devices will probably not include the DVD playback, as the current generation dropped the VCD support. Because these are the formats pushed by the industry, and the industry is the one that manufactures such players. I don't think I'll see another Steve Jobs soldering resistors and transistors in the garage in our days, to escape from the bonds laid out by the industry.

In case he prefers to watch these memories on a PC, he can pick up any choice, as long he'll keep safe a copy of the software player and the codecs (together with the hope that the next generations of operating systems won't change again the internal structure, like Microsoft has shown us in the last 10 years :); in this case he must secure a PC with the current OS and hardware, too).

The third option, so much praised by some members here, is to hope that the manufacturers will include the particular format/codec/size/framesize/filesystem combination among the supported playback options of a particular player (from which a second identical model must be secured, should it be the only model capable of play the chosen combination).

About the analog capture, there has been all said, capturing isn't exactly a new thing for 2011. The best VCR he can have, the best capture card he can pay for, and uncompressed captures. Since the tape is the first generation, no TBC is really needed, only a VCR that can read VHS-C (something not really self-evident, but not all VCRs can flawlessly read VHS-C, even with adapter).

He'll pick his choice and live happy (if the choice was correct :)). End of story.

gametiger
19th December 2011, 16:51
Thanks for everybody's input!

I think I'll be using anamorphic H.264 50p video in MKV. Obviously I'm going to keep both the original tapes and the untouched captures (along with every AVS, audio cut file, etc.).


Another question though...

As you probably know, QTGMC() is very slow, so I figured I'll create lossless intermediate files from my AVS scripts and use those for encoding, i.e. AVS script -> lossless intermediate video -> x264 encode instead of AVS script -> x264 encode.
What codec is recommended for this?

2Bdecided
19th December 2011, 20:03
Here's basically how I'm planning to do things:
[LIST=1]
Capture the video (already started with this part)
I'm using my old Panasonic VHS VCR and a VHS-C to VHS adapter that I still have from back in the day. Both are in good condition so they should be fine for my purposes.
I'm doing the actual capturing with a Dazzle DVC 100/107, using composite video out from the VCR (S-Video actually gave me worse results), with the software that came with it (Pinnacle Studio 15 HD).So you're using a poor VCR with a poor capture device?

The better way to do it is to use a decent VCR (S-VHS with TBC), or at least a half-decent VHS (S-VHS without TBC) + good pass-through device (e.g. Panasonic DMR-ES10 DVD-recorder), and a decent capture device (take your pick). Ensure correct levels when capturing - no clipped blacks or whites.

Store the raw captures for posterity; restore, edit + encode to whatever is needed for use.

Ghitulescu is very passionate about TV standards etc, but DVD-R is not an archival medium. Even if you encode for DVD, keep back-up that you check regularly. Like any/all digital data. Left on a shelf, it will probably die.

~8Mbps MPEG-2* isn't great for noisy interlaced home movies IME. It's OK with care, but not visually lossless. If your camera work was better, and you denoise a lot, encoding faults are - but I wouldn't necessarily denoise a lot. It can make things look like plastic.

* - some DVD players get upset by DVD-Rs with bitrates consistently above ~7.5Mbps. Shame, because DVD can have 9.5Mbps! The extra helps quality, but hurts compatibility.

Cheers,
David.

2Bdecided
19th December 2011, 20:09
Since the tape is the first generation, no TBC is really neededNot in my experience. TBC picture was visibly cleaner (cleaner vertical lines). There was no "obvious" wobble without, but it was better with.

(S-VHS-C first generation, with stereo sound too, so probably higher quality than the OP has)

Cheers,
David.

Asmodian
19th December 2011, 20:25
Because VHS is interlaced, I never deinterlace. Why? Because deinterlacing -- even with the excellent QTGMC -- loses picture detail forever. I realize that most (although not all) modern displays do not handle interlacing in a native fashion, but that isn't necessarily always going to be the case. Also, the deinterlacers in most modern plasma or LCD TV sets is pretty darned good.

I am amazed you say this, I hate the look of interlaced video on progressive displays. If a client wants video for viewing on a computer (lots of people just want their home videos as clips in my experience) you have to deinterlace. The deinterlacing on TVs is usually terrible compaired to QTGMC and interlacing better not come back into fasion. :p

I agree with the rest of this post though.

Not in my experience. TBC picture was visibly cleaner (cleaner vertical lines). There was no "obvious" wobble without, but it was better with.

(S-VHS-C first generation, with stereo sound too, so probably higher quality than the OP has)

Cheers,
David.

I have found a TBC to be very helpful too, true it helps more with bad tapes but it is a very rare tape that is better without one, they usually fix something.

As you probably know, QTGMC() is very slow, so I figured I'll create lossless intermediate files from my AVS scripts and use those for encoding, i.e. AVS script -> lossless intermediate video -> x264 encode instead of AVS script -> x264 encode.
What codec is recommended for this?

I use lagarith (http://lags.leetcode.net/codec.html) or UT video, I have liked lagarith lately but have used UT more in the past.

Ghitulescu
19th December 2011, 21:24
I transfer VHS to DVD all the time for clients. Because VHS is interlaced, I never deinterlace. Why? Because deinterlacing -- even with the excellent QTGMC -- loses picture detail forever. I realize that most (although not all) modern displays do not handle interlacing in a native fashion, but that isn't necessarily always going to be the case. Also, the deinterlacers in most modern plasma or LCD TV sets is pretty darned good.

I am amazed you say this, I hate the look of interlaced video on progressive displays. If a client wants video for viewing on a computer (lots of people just want their home videos as clips in my experience) you have to deinterlace. The deinterlacing on TVs is usually terrible compaired to QTGMC and interlacing better not come back into fasion..

The truth is somewhere in between. Not all TV sets and players are born equal, some have very good results, some very bad. On the other hand, a good deinterlacing solution cost 10 years ago some 5000€, nowadays its price dropped to some 200€. While the HW solutions become better and better (and cheaper), a SW deinterlace stays as it is, and any wrong decision might be irreversible.

Asmodian
19th December 2011, 22:42
The truth is somewhere in between. Not all TV sets and players are born equal, some have very good results, some very bad. On the other hand, a good deinterlacing solution cost 10 years ago some 5000€, nowadays its price dropped to some 200€. While the HW solutions become better and better (and cheaper), a SW deinterlace stays as it is, and any wrong decision might be irreversible.

Sure, if it was something that might be revisited in the future I would also give them a lossless copy of the interlaced capture (after all the tape will die, even if stored well, in another 10 years) but giving a client an interlaced clip to watch on their computer... wouldn't be good. I have yet to see a TV that comes close to a well tweaked QTGMC and nothing in software for real time playback on a PC. Any detail lost during the deinterlacing is much preferred to the ugly mess of interlaced video on a progressive display.

Giving a standard home video user apparently low quality captures just to keep the closest to the source in case the TVs and video cards of the future will all have great deinterlacing probably won't help word of mouth business, people what it to look good on what they watch it on. A QTGMC'ed 720p @ 59.94 bluray is much preferred on most current LCD TVs compared to a 480i @ 29.97 bluray. Good consumer HW deinterlacing might get close but if you just want it to look decent anywhere deinterlace it.

Telling them to buy a good HW solution is obviously not an option. :rolleyes:

I'm doing the actual capturing with a Dazzle DVC 100/107

Just a note, you don't want to capture in a lossy compressed format (like MPEG2 or DV) if you can avoid it. Even a cheap ATI TV Wonder HD 650/600 Combo USB will give a better final video. Saddly there are not many good capture options that have drivers for Windows 7 x64. EDIT: Oops, as 2Bdecided points out, there is a issue with AGC on the 650.

gametiger
20th December 2011, 21:54
I use lagarith (http://lags.leetcode.net/codec.html) or UT video, I have liked lagarith lately but have used UT more in the past.
Thanks!

What do people generally use to create those intermediate files from an AVS script?

I've been using AVS2AVI because it's pretty straight-forward, but it seems old... Any alternatives? I'd prefer something command-line based, so I could do batch processing.

kypec
21st December 2011, 07:17
What do people generally use to create those intermediate files from an AVS script?
I use UtVideo as well, never bothered to try any other lossless codec, really.

I've been using AVS2AVI because it's pretty straight-forward, but it seems old... Any alternatives? I'd prefer something command-line based, so I could do batch processing.
:confused: avs2avi.exe is a command-line based app, I don't care if it's old as it works for me reliably even with latest Avisynth 2.6 build.

johnmeyer
21st December 2011, 08:53
... I would also give them a lossless copy of the interlaced capture (after all the tape will die, even if stored well, in another 10 years) but giving a client an interlaced clip to watch on their computer... wouldn't be good. I'm not sure where you get the idea that tape is a short-lived format. I do media restoration for a living. It is true that some tape formulations have had problems with binding material. You can read about how these are salvaged by baking the tapes in an oven. You then have one shot to read them because the oxide sheds when run through a tape machine.

Having said that, most tape quality is quite the opposite. As an example, I recently transferred reel-to-reel audio tape that was recorded in 1950, shortly after magnetic tape replaced wire recorders. The tape was not shedding and the audio was identical to what I believe it sounded like 60+ years ago. Also, all VHS and Beta tapes I have been sent work just fine. I just did an enhancement of a commercial 2" Quadruplex tape that was recorded in 1969.

Finally, tape backup has been the mainstay of the computer industry for most of its existence.

... Any detail lost during the deinterlacing is much preferred to the ugly mess of interlaced video on a progressive display.I don't think that is really the trade-off being discussed. Obviously interlaced video shown on a progressive display looks quite bad. However, I'm not aware of any progressive display that can't be driven by some sort of deinterlacer. Everyone has their opinions on which ones work best.

The real issue is how to preserve as much quality as possible in the video that actually gets archived on media. What is indisputable -- and is the point I tried to make so that the person asking the question wouldn't needlessly trash their video assets -- is that once you deinterlace, you have degraded the video. If you store in that format, and don't save another copy of the interlaced version, you have irretrievably lost video information.

So, all I was advising is to always keep the video in its native format, and then do whatever deinterlacing conversions or manipulations are needed either as a separate operation, or by creating a new set of files, or simply doing that operation at the time of viewing.

One last point. Converting interlaced to progressive, and then saving the result without also saving the interlaced version is very similar to other bad decisions people seem to make, such as reducing resolution in order to save space; using a high compression Internet "delivery codec" to archive precious video; and reducing colorspace in order to save a few bits.

Ghitulescu
21st December 2011, 09:41
I was born after the '60ies so I can't comment on tapes used in that period of time like Johnmeyer did, however I've dealt with VHS recorded before the '90ies and no sensible damage occurred to them (and they have been kept in conditions far from ideal). I don't think the tapes degrades themselves so badly, that one must hurry up into the next AV/PC-shop to buy one of the packages alarmist named: Save your tapes before it's too late and variations thereof (Rescue your tapes, Rescue your memories etc.). One should also notice that the many transfer services like to spread such rumours, as they live from their result. No panic, no money.

Yes, a tape can be very fragile, and the biggest enemy is the VCR (a mechanically defective one) then the TV (the magnetic fields of the deflection coils - most people still leave the tapes near to or on top of the TV). Chronos (aka the time) and Neptun (aka the moisture) are generally less aggressive than feared to.

2Bdecided
21st December 2011, 17:51
Just a note, you don't want to capture in a lossy compressed format (like MPEG2 or DV) if you can avoid it. Even a cheap ATI TV Wonder HD 650/600 Combo USB will give a better final video.But doesn't the ATI 650 have an undefeatable(?) AGC? If so, it's unsuitable for high quality work.

IMO DV-AVI is a good format for preserving many hours of unrestored interlaced SD captures. Not as good as lossless, but not everyone has the space for lossless.

Cheers,
David.

2Bdecided
21st December 2011, 17:54
One last point. Converting interlaced to progressive, and then saving the result without also saving the interlaced version is very similar to other bad decisions people seem to make, such as reducing resolution in order to save space; using a high compression Internet "delivery codec" to archive precious video; and reducing colorspace in order to save a few bits.FWIW it's quite easy to make the interlaced>progressive conversion fully reversible (though IMO TGMC works better if you don't use one of the lossless modes) - but Asmodian also suggests upscaling to HD, which will of course make recovery of the original completely impossible.

I guess it depends how anal you and/or the customer are. There won't be much use for SD video in a few years (some people have no use for it now), and the idea that you'll go back to the footage and re-deinterlace it, re-denoise it, re-filter it, re-edit it and re-caption it seems to assume many more hours in the day than I've ever been able to find.

So yes, I'd save it - but in the same way that I save many other things which I'll have to live to 200 to take any practical advantage of!

Cheers,
David.

johnmeyer
21st December 2011, 18:13
There won't be much use for SD video in a few years (some people have no use for it now), and the idea that you'll go back to the footage and re-deinterlace it, re-denoise it, re-filter it, re-edit it and re-caption it seems to assume many more hours in the day than I've ever been able to find.I agree 100% if you are talking about TV shows and movies.

However, if it is your own video recordings, then they are all you have. Since the heading of this thread is "Handling VHS-C home video tape captures," I assumed the OP was talking about video he shot himself which he now wants to digitize and move to a format that will be more accessible to his children and family members. If so, those are precious bits of memory, and it would be a shame to degrade them.

BTW, the reason I have taken the time to post multiple times in this thread is that I frequently am asked to "restore" old Kinescopes and other old TV shows. Before I restore them, I poke around to see if I can find something closer to the original source. In those cases where I have been able to find an original film Kinescope, or original videotape (rarely happens), or at least another OTA recording, I am appalled at how often the video I have been given has been trashed, usually by people who try to deinterlace and do a bad job; or people who apply noise reduction and remove massive amounts of detail; or people who erroneously think that 24p is a "better" frame rate and then do a pointless (and lousy) 60i --> 24p conversion.

I have learned a lot, from Dideé in particular, about what has actually caused various types of degradation and how to, at least partially, undo the harm.

So, whenever possible, I try to keep others from degrading their precious personal video memories.

gametiger
21st December 2011, 23:12
One more thing...

What's a good way to cut & transcode audio (probably AAC or AC-3, haven't decided yet), ideally using the Trim() frame numbers of my AVS script?
I'd prefer it the command line way.

Can this somehow be done using an AviSynth script (i.e. Trim())?

Asmodian
22nd December 2011, 00:33
Keep the audio as PCM through editing and trim() just works. :)

Then you just need to demux it and encode with eac3to.

but Asmodian also suggests upscaling to HD, which will of course make recovery of the original completely impossible.

I do not suggest upscaling to HD; I just said a 720p bluray looks better than a 480i bluray on most current LCD TVs. The only reason to upscale is because bluray won't let you use 480p @ 59.94. Compressing to anything lossy will of course make recovery of the original completely impossible.

I suggest going to an un-resized or only resized horizontally to 1:1 SAR H.264 in mp4 or mkv. This is for a final "to watch now" format.

However, if it is your own video recordings, then they are all you have. Since the heading of this thread is "Handling VHS-C home video tape captures," I assumed the OP was talking about video he shot himself which he now wants to digitize and move to a format that will be more accessible to his children and family members. If so, those are precious bits of memory, and it would be a shame to degrade them.

QTGMC can be configured to do enough better of a job, especially on tricky scenes, keeping everything interlaced doesn't seem like an option to me. If you just want to share home video clips with friends and relatives it doesn’t make sense to sacrifice their current viewing quality in favor of potential future video quality. People will often not have any deinterlacing if watching in on a PC and even the current hardware deinterlacing on newer video cards isn’t that good. This may be the only time these clips are viewed. I always offer to supply an interlaced archive version as well. Actually I usually supply three versions, an archive, a very low crf 4:2:2 H.264, and a medium crf 4:2:0 H.264. Sometimes people don’t want the archive (will not pay for the disks for it).

This will probably bother you johnmeyer as you will then get asked to restore my "to watch now" capture so it can be used in a documentary or some future project. Keeping all video interlaced isn't the answer though! (not that I really know what the answer is from that point of view.. ah the joy of interlaced video) ;)

Archiving the video in a digital format is a different thing than making a "to watch now" video for relatives etc. imo. Of course an archive should not be deinterlaced (keep it as close to the source as possible) but good archiving is hard because once you have gone to MPEG2 or another lossy format it is painful to think of using that as a source for another lossy compression in the future (if using very high bit rates it is less painful). Keeping lossless huffyuv or UT files are quite large and are not as universally supported. A zipped RAW v210/YUY2 capture is a good long term archive format even if it is a pain to use?

Thanks for the info about longevity of tapes! I was under the impression they were less stable than that, probably due to the oxide horror stories I have heard. I have not yet been asked to digitize any tapes that are more than twenty years old. Quality VCRs are also aging though so I still don't think digitizing VHS will be getting any easier in the future. :(

Asmodian
22nd December 2011, 03:25
But doesn't the ATI 650 have an undefeatable(?) AGC? If so, it's unsuitable for high quality work.


I think you are right, the 650 isn't a good option. :(

I have used the 600, it uses a different chip from 650 and appears to not have this problem.

gametiger
31st December 2011, 01:14
I've started encoding my videos the last couple of days and today I noticed something strange.

This is how my encoding process looks atm:
AviSynth script -> lossless intermediate file (UtVideo) -> x264 CLI

For comparison I did a straight AviSynth script -> x264 encode and to my surprise the resulting x264 encode had a different file size than the one I did before. I then compared screenshots of both encodes and indeed, there were differences.

So I suppose this implies that the intermediate file is in fact not lossless? Or maybe that some sort of colorspace conversion or something is going on?

Could somebody please help me figure out what's wrong? Let me know if you need to know more details.

Thanks!

2Bdecided
5th January 2012, 13:18
You'd need to explain what GUI you're using + settings, or what options you're specifying at the command line if no GUI.

Lossless codecs are lossless - but as you say, some ways of getting the video into and out of codecs will carry out colour space conversion(s) "silently" to "help" you!

A useful but not bullet proof check is to run your AVIsynth script a second time, loading the "lossless" output into the script, subtracting it from the actual output, and using levels to expand the difference. It should still be zero.

This doesn't guard against problems between the lossless file and the final encoder though.

Cheers,
David.

gametiger
5th January 2012, 15:02
You'd need to explain what GUI you're using + settings, or what options you're specifying at the command line if no GUI.

Lossless codecs are lossless - but as you say, some ways of getting the video into and out of codecs will carry out colour space conversion(s) "silently" to "help" you!

A useful but not bullet proof check is to run your AVIsynth script a second time, loading the "lossless" output into the script, subtracting it from the actual output, and using levels to expand the difference. It should still be zero.

This doesn't guard against problems between the lossless file and the final encoder though.

Cheers,
David.
This is how I create the lossless file with avs2avi:
avs2avi.exe script.avs intermediate.avi -w -p 1 -l codecparams.txt

And this is how I feed it to x264:
x264.exe intermediate.avi --preset slow --profile main --level 3.1 --crf 16 --qpmin 6 --qpmax 22 --tune film --sar 12:11 -o encode.264


The codecparams.txt contains the UtVideo codec settings, so avs2avi won't have to prompt for them on every run. I generated this file with avs2avi's -s option. This brings up a prompt where I selected the UtVideo codec. You can configure a few things here, I left everything unchanged:
http://i42.tinypic.com/sw2t6a.png