Log in

View Full Version : Black drop outs in Video 8 transfer


arobertson1
27th February 2012, 14:00
I have a damaged video 8 transfer which is really bad with black drop outs. I have tried playing it on several players and it just won't lock onto the signal at all. The players are all fine as they play other tapes okay.

Basically the video will play okay for a second or two, then it will roll, lose the signal and go black. It then rolls again and the signal is restored. It then plays for a second or two before repeating again.

I've tried various image stabilisers but the drop outs are several frames long and the stabilisers just can't cope with the drop outs.

Is there any way avisynth can detect a pure black frame and delete the frame from the video? There is little point in keeping the frames as the sound isn't there either.

I realise this will be quite stuttery but it is better than nothing.

Thanks,

Alan

StainlessS
27th February 2012, 14:58
Take a look here, onwards:
http://forum.doom9.org/showthread.php?p=1538989#post1538989

in particular at post #16, will probably want to use AverageLuma rather than YDifferenceFromPrevious.

Ghitulescu
27th February 2012, 16:08
That's a recording problem I suppose - similar to what I had myself here (http://forum.doom9.org/showthread.php?t=161181).
I solved it using a HW TBC to stabilise the video (which you should do too irrespective of the cassette generation, Video8 is more sensible than VHS), then manually re-equalising the audio at those spots.
In your case I would recommend a Digital8 from Sony (with analogue capability, they have TBC as well) or one of their top-of-the-line (TOTL) VCRs (like the Sony EV-S9000). Like in VHS<->S-VHS game, Hi8 gear is better than pure Video8 ones, at least because they have S-Video connections.
Try this first before going into SW solutions, as there will be more than one frame to be corrected ;) per error.

arobertson1
13th March 2012, 23:36
Hello Ghitulescu - tried loads of TBC's / image stabilisers with no luck. The recording is seriously damaged. As far as I can tell the camcorder that was used developed a fault and had to have the eject mechanism replaced. I don't know if the tape was stuck in it and they tried to pull it out or something. Anyway the camcorder was fixed and the tape recording is pretty poor.

Hello StainlessS. I didn't have much luck with that script but it did get me thinking about AverageLuma. After a lot of trial and error I managed to get rid of the frames by using an avisynth script to detect black frames and create a list of them. I then fed it back into the "Frame Tweaker" Virtualdub filter and they're all gone. For some reason I couldn't get it to delete just the frames and had to copy a good one over the top.

It works pretty well:

AviSource("test.avi").ConvertToYV12
copy = " copy "
paste = " paste"
WriteFileIf("output.fts", "AverageLuma<80", "(current_frame-1)", "copy")
WriteFileIf("output.fts", "AverageLuma<80", "current_frame", "paste")

It's probably not the best of code (I am a newbe) but it did the trick and wrote a file that Frame Tweaker could use.

Now the next question - is there a way to detect chroma? More specifically, how I can detect pure greyscale frames. the reason I ask is when the signal is lost the picture goes black, then it is restored as greyscale which is rolling round and then it goes colour and finally stops rolling around. If I could detect low chroma / no chroma fames and replace them with duplicates then this would also improve the video. How can you work out if a frame has no / low chroma?

Alan

Gavino
14th March 2012, 00:05
How can you work out if a frame has no / low chroma?
Look for UPlaneMax, UPlaneMin, VPlaneMax and VPlaneMin all being equal to 128 (or close to it).

arobertson1
14th March 2012, 02:33
Thanks Gavino - worked a treat and no more greyscale frames:

WriteFileIf("output.fts", "(UPlanemax-UPlanemin<30)" , "(current_frame-1)", "copy")
WriteFileIf("output.fts", "(UPlanemax-UPlanemin<30)" , "current_frame", "paste")

Now all I need to do is sort out the vertical hold problem. I'm assuming Avisynth can't do this so I was thinking of exporting all the video out as frames and then trying out some JPEG corruption rescue software. I've heard some software allows you to re-assemble JPEGs when they are jumbled up kind of like a jigsaw puzzle. At the minute when the picture rolls the top is at the bottom and the botton is at the top. I've taken a single frame out the video to see if it can be done and apart from the "hole" where the bar was it joins up nicely.

Once I've done that I'll put them all back together and see how it plays. I suspect it will probably need further motion stabilisation but I'll see how it looks first. Let's just hope the audio sync isn't too bad....

Alan