digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Shifting Titles Or Jumpy Image, Which Is Worse? (https://www.digitalfaq.com/forum/video-restore/9792-shifting-titles-jumpy.html)

sanlyn 06-15-2019 09:44 AM

Shifting Titles Or Jumpy Image, Which Is Worse?
 
6 Attachment(s)
More Bad Tape Chronicles:

Which would you find worse? 30 seconds of temporarily shifting subtitles or really nervous objects that make you think you're having eye trouble or need to fasten your seat belt? Frankly I'd rather deal with shifting subtitles for a few seconds. The scenes before and after the posted sample are stable, so no jumpy problems there. The restored samples are attached as "Jumpy Image.mp4" and "Shifting Titles.mp4". Fortunately there are only a few short scenes like this.

This is another nightmare retail VHS tape damaged by sloppy digital mastering. I'm working up this tape for DVD and SD-BluRay for a local film club. It's a French film with English subtitles. The only other print in the world has Korean subtitles, reported to look worse than the NTSC version. The digital transfer from film has atrocious encoding, with crushed darks, smeared motion, ghosting, and low bitrate artifacts, while the original wide screen format has the sides chopped off for 4:3.
:smack:

Most annoying are many scenes with bad frame hop. English subtitles are superimposed right on top of all the crap. One can stabilize the hopping frame, but then the subtitles will shift onscreen.

If anyone wants to tackle the original with ingenious suggestions, I split the lossless capture into two parts attached as "original_huffYUV_Part1.avi" and "original_huffYUV_Part2.avi". If you don't like lossless (and wonder why we don't like to capture noisy VHS to lossy codecs) the unfiltered original is encoded with h264 and attached as "Unfiltered_capture_h264.mp4".

For equipment buffs, the VHS was played on a Panasonic PV-S4670 SVHS VCR thru a Toshiba RD-XS34 line-tbc pass-thru, an AVT-8710 frame tbc, a SignVideo proc amp, and captured with an ATi All in Wonder 9600XT AGP and VirtualDub. For those who care, the video cables were BlueJeans YC-2 s-video, audio was AR Pro Series Interconnect. I tried this tape on my AG-1980 but it made the digital smearing and low-bitrate artifacts on the source tape look worse. Sometimes a different player works better.

And it doesn't help to have to work with film damage like the gash in the upper right, below. I thought paid pro's were supposed to fix this stuff.
http://www.digitalfaq.com/forum/atta...1&d=1560610932

:depressed:

keaton 06-17-2019 08:08 PM

I would vote for jumpy subtitles over jumpy objects.

I would really like to help you, because you've helped me so much with your contributions to this forum. Unfortunately, I don't think I can take the pebble from your hand on this one. This is quite an advanced exercise! Whew! :wink2:

Your knowledge of avisynth plugins and the built-in features of avisynth exceeds mine, so I don't pretend I'm saying anything here that hasn't already crossed your mind. But perhaps my thinking out loud here provides some small spark of an idea. But for anyone else that may get something out of this, the only trick I've used in simple cases to help clean up selective parts of a frame when something like the ReplaceXXXMC scripts doesn't do the trick (because multiple frames had the same defect), is to use a very rudimentary trimming of a block of pixels from a frame before or after and overlay it on the target frame. Once there is motion within that part of the frame, this method breaks down rather quickly. But if there's no motion, it would seem possible by determining the maximum size "box' that the captions drift around in, and passing those coordinates to a function like this repeatedly frame by frame.

Code:

function blockreplace(clip c, int targetframe, int refframe, int left, int top, int right, int bottom, int xoff, int yoff)
{
  f1=c.trim(targetframe,targetframe)
  f2=c.trim(refframe,refframe)
  f2b=f2.crop(left,top,(right-720),(bottom-480))
  newf=Overlay(f1,f2b,x=(left+xoff),y=(top+yoff),opacity=1.0)
  result=c.trim(0,targetframe-1)++newf++c.trim(targetframe+1,0)
  return result
}

# Example usage
# Take pixels inside "box" defined by {x=40, y=300} and {x=680, y=420} from reference frame 99, then overlay on target frame 100
blockreplace(100,99,40,300,680,420,0,0) # set x and/or y offsets to non-zero to shift box relative to initial left/top coordinates
# same call with frames incremented
blockreplace(101,100,40,300,680,420,0,0)
#copy/paste/adjust previous line to exhaustion, or perhaps create some kind of "loop" that iterates over a range of frames calling blockreplace with frame numbers incremented by 1

I'm not of the experience level to create an avisynth plugin. I'm just brainstorming how I might try to do such a thing with the built in tools avisynth provides. The devil is in the details. The vision or theory of the idea is easy.

In very high level abstract terms, perhaps there's a way to just replace the bottom of the frame with a repeating still image without captions (using the blockreplace method above or some other kind of overlay of a constant image), then use tools mentioned in http://avisynth.nl/index.php/Interna...d_Mask_filters section of the avisynth page to create a layer that is caption only that can be overlayed on the captionless layer. The caption could be snapshotted/isolated from a single frame and repeated on this new caption only layer. Perhaps some hue and/or saturation based filter/keying could help isolate the caption from the background. The picture/examples on http://avisynth.nl/index.php/Overlay is how I see it working in theory, at least.

I don't know what methods were used. But it seems you've been able to solve both problems in isolation from the other. It's easy to say, well just take the two, isolate the caption part and then re-overlay it back on the other version. But, of course, it wasn't that easy. So I hope all this rambling on about theory isn't a big waste of time. I guess talking things through is the only help I can give at this time with my level of experience. Sometimes talking through the "obvious" stuff can spark a new idea or uncover a blind spot we might have.

I wish you the best of luck. I understand how much labor/love goes into restoring even a small bit of video. What we do is very painstaking, but also extremely noble and rewarding. :salute: If you or anyone else does figure this out, I would really enjoy/appreciate learning what is done. I'm naturally curious, and I may have a similar problem to solve some day.

sanlyn 06-17-2019 08:58 PM

Your comments are certainly food for thought, for which I thank you. It prompts me to try mounting this little sequence in AfterEffects to see what AE's motion tracking can do with it.


And thanks for your vote on titles over whole image (great minds think alike, LOL!).


All times are GMT -5. The time now is 05:19 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.