Sunday, 28 June 2015

Archiving Hi8 Video Tapes to MP4

So recently i was reading up about the Hi8 Video tape format, this is what i used to use back in the 1990s and 2000s with my Sony TRV-66E camcorder.

I have a significant amount of old tapes that never get played and read that the Hi8 tape format is prone to degradation after about 15 years.

So with that in mind i began to transfer my tapes into H.264 / AAC streams for proper archiving and uploading to YouTube, so these are my experiences.

Tape Degradation
I have viewed some of my tapes and some do show some form of playback artefacts. As you can see in this picture below the bottom half is affected by distortion and horizontal sparkle effects and runs throughout the entire tape. Visually there is nothing visible on the physical tape itself.

Digitizing The Media
This is a lossy step in the process, that means you can affect the quality of the final recording depending on how you do this.

I dont have a PC based video capture device, it's not something i have needed before. I have used them in the past (during the late 1990s and early 2000s) with mixed results, maybe better products are out there now but i generally dont like them!

I do however, have a decent quality hard disk based DVR and DVD writer (a Sony RDR-HX710). This will allow me to record my tapes into an MPEG2 stream either directly onto a DVD+R or to the internal HDD for later transfer to DVD+R.

The DVR can accept analog video in the forms of composite or  S-Video. S-Video is obviously the preferred format here as it separates parts of the video signal to retain more detail.

Because the DVR has only a single layer DVD writer i am limited to standard 4.7Gb DVD+R or DVD+RW so i need to try and fit one whole Hi8 tape onto one DVD. I want to make the 90 minutes fill the disk. If you encode the tape so it only fills 1/3 of the DVD your effectively losing quality because you may find a slightly high recording quality in the DVR settings that could fill the disk with nothing left over.

After some testing i found the most efficient way to record the tapes was to write DVD+Rs directly. This saves me time as there is no HDD -> DVD recording process. I also found using the DVR quality setting on 'HSP' (this is only a Sony naming convention, yours may be different). This encodes at about 7.7 Mbps.

Using the DVR is great, it means i can set play/record and leave it to finish,  it doesn't tie up my PC for hours and i don't have to worry about wonky capture device drivers that will drop frames if you so much as look at the PC the wrong way, or audio that drifts out of sync. It also means i can just archive my tapes onto many DVDs that can be ripped and edited at a later date. In addition to this the output is pure PAL standard 720x576 25FPS Interlaced.

Transferring to PC
This part should have been the simplest, but in reality it was not but in a way it helped the process in a funny way.

After the DVD is written and finalised i can take the DVD and read off the files on my PC. All DVDs are readable this way with the exception of copyright protected disks that have their files encrypted. Because this is an original recording from my DVR there is no encryption so the files can be copied without any issue.

The files that contain the actual content are the VTS_01_[X].VOB located in the VIDEO_TS folder. Copy and rename these on the PC to .MPG and they will play in most media players.

This is where i hit my first problem, for some reason the first VOB file wont play in VLC or load into Movie Studio. It's corrupt or badly formed in some way. It plays fine on the DVR and in Windows Media Player. Thankfully it does load into Handbrake. I have transferred recordings using this method before without issue so i may look into this further to see which bit i'm doing is causing the problem.

I wanted to edit and make the final videos from this original MPEG2 source in Movie Studio but there was a lot of noise in the encoding, small MPEG blocking artefacts and high frequency noise from the original tape and i had this issue with the corrupt file. Movie Studio has little or no options for removing blocking artefacts or noise too so i needed another solution...

After some experimenting i found i could encode these MPEG2 streams into MPEG4 using Handbrake which can read the corrupt file and apply some additional processing to reduce some of the artefacts so in a way it helps even though it adds an additional encoding step and more time to the process. So my handbrake settings were as follows:

Picture Tab: 

Anamorphic: Strict
Cropping: custom, set to zero. Handbrake does a poor job of cropping and i prefer to use the pan/scan options in Movie Studio. So i disable this option, annoyingly it will always revert back on any new video.

Filters Tab:
Deinterlace: Fast, being an original PAL source the picture is interlaced so  this should be removed prior to encoding into the final video.
Deblock & Denoise: Off

Video Tab:
Quality: 12
Constant Framerate: On
Framerate: Same As Source
x264 Preset: Medium
x264 Tune: Grain
H.264 Profile: High

Alternative Method, less filtering, lower compression.
This method i disable the deblock and denoise functions and increase the compression Quality enough so the inherent grain is retained. This actually looks more natural. There is a balance though, you need enough quality to resolve the noise. Not enough and the noise will turn into very obvious blocking itself. In my tests a Quality setting of 12 and disabling the deblock and denoise functions.

Final Differences
I was going to include some half and half images between the MPEG2 and MP4 versions but the differences are so subtle i doubt you would be able to see them. It really is just some high frequency noise.

The original MPEG2 .VOB files are around 1Gb in size, after conversion to MP4 they do increase to more than 2.5Gb, i found this was inevitable to retain the grain, this is only an intermediate format for editing though. Once the videos have been rejoined, edited, cropped and some basic level and gamma correction they are exported from Sony Movie Studio as a 5mbps MP4.