Can this video be improved?

Rich Parry wrote on 2/5/2015, 6:20 PM
In 1999, a family member using a circa 1997 digital camera shot video of my granddaughter which only a grandfather can watch (that’s me). Although I’m stuck with poor source video, I did my best to breathe some life into the video.

The source clips are 160 x 112 @25fps, After some quick editing I rendered an MP4 video (AVC codec) video at 320 x 240 @29.97fps.
1) I changed the frame rate from 25 to 29.97, that was probably a bad idea
2) The 160 x 112 source clips are in a 320x240 project, probably another bad idea
3) I did no color correction or levels adjustments, thought I would do that last.

Given I am stuck with poor source material, is there anything anyone wants to suggest to improve the final video? The destination of the video is Vimeo and Facebook to share with a few family members. If the video can’t be improved, it is still “priceless” to me “as is”.

If you have some suggestions to improve the video, specifically in the area of "Project Settings", I like to hear from you.

Here is final video
https://vimeo.com/118545993

Here is a sample clip showing what I had to work with.
https://www.dropbox.com/sh/ccac5fyxg34v43o/AADKMCw75i2VwzGDvT09R1saa?dl=0

MediaInfo source clips parameters:
Bit rate mode : Variable
Bit rate : 146 Kbps
Width : 160 pixels
Height : 112 pixels
Display aspect ratio : 1.429
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive

CPU Intel i9-13900K Raptor Lake

Heat Sink Noctua  NH-D15 chromas, Black

MB ASUS ProArt Z790 Creator WiFi

OS Drive Samsung 990 PRO  NVME M.2 SSD 1TB

Data Drive Samsung 870 EVO SATA 4TB

Backup Drive Samsung 870 EVO SATA 4TB

RAM Corsair Vengeance DDR5 64GB

GPU ASUS NVDIA GeForce GTX 1080 Ti

Case Fractal Torrent Black E-ATX

PSU Corsair HX1000i 80 Plus Platinum

OS MicroSoft Windows 11 Pro

Rich in San Diego, CA

Comments

johnmeyer wrote on 2/5/2015, 8:03 PM
I was faced with an identical problem, except that the video was from, literally, the very first generation of digital video.

The video was distributed on the original multi-media magazine called "Nautilus," with content on a CD that arrived every month. The video I wanted to restore was almost the same resolution as yours: 160x120 pixels. It was only 12 frames per second. From what I could see of your video, I don't think it was 25 frames per second, even though it may have been stored in that container. I expect it was closer to 12 fps as well.

So, your video is about the same as the video I was dealing with, although since mine was the result of 1990 video technology, the encoding artifacts in the original video were an order of magnitude worse that what I saw in your two original clips.

I applied various filters to suppress encoding artifacts, and then up-res'd the result using some algorithms suggested over at doom9.org. I then corrected the color and gamma. Finally, I used motion estimation to create 24 fps progressive video.

Here's the result. I did all this work because it is a really cool "storytelling" performance by Geoffrey Lewis, a well-known character actor who has been in many of Clint Eastwood's movies:



john_dennis wrote on 2/6/2015, 12:08 AM
With the Project Properties set to 25 fps, I see a change in the Preview Window every third tap of the right arrow key. Possibly ~ 8 fps.
johnmeyer wrote on 2/6/2015, 1:37 AM
Yes, it appears to be exactly 25/3 fps.

Here is a link to the doom9.org discussion where I asked for some help with my Celestial Navigations video:

Ideas for restoring early generation (really old) digital video

If you go to that page, you can download the original clip to see what I was dealing with.

Just for fun, I decided to restore your clip using that script as a starting point, but with the following changes:

1. I decimated the input video by throwing away two out of every three frames. This game me the 8.333 fps of the original video.

2. I changed the motion estimation to 25 fps. This creates two artificial frames between each frame which brings the fps back to 25 fps, but with interpolated motion. This makes the video appear to be more or less smooth, like modern video.

3. I reduced, dramatically, the noise reduction, because your video is much nicer than what I was dealing with.

4. I changed the resize to 720x576 to match PAL.

Here is the result:

drawing1.avi

Here is the revised script that I used to create this video:

loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")

source=AVISource("E:\fs2.avi").converttoyv12().selectevery(3,0)

preNR = source.FFT3DFilter( sigma=1, sigma2=1, sigma3=11, sigma4=1, bt=5, bw=16, bh=16, sharpen=1, interlaced=false )

preNR_super = preNR.MSuper(pel=2, sharp=1)
src_super = source.MSuper(pel=2, sharp=1, levels=1)

backward_vec2 = MAnalyse(preNR_super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(preNR_super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(preNR_super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(preNR_super, isb = false, delta = 2, overlap=4)

denoised=source.MDegrain2(src_super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=700)

super=MSuper(denoised,pel=2)
backward_vec = MAnalyse(super,blksize=8, overlap=2, isb = true, search=3, dct=1 )
forward_vec = MAnalyse(super,blksize=8, overlap=2, isb = false, search=3, dct=1 )

estimated=MFlowFps(denoised,super,backward_vec, forward_vec, num=25, den=1, mask=2, ml=100)

final = LanczosResize(estimated,720,576)

return final


I hope this helps!!

[edit]Here's a before/after pic which shows the noise reduction. There are better ways to do this, and if this were a paying job, I think I could do a lot better job. However, the real improvement is the motion estimation to provide the intermediate frames. You can only appreciate that by downloading and playing the clip.



Rich Parry wrote on 2/7/2015, 12:07 AM
@John M and John D,

Thank you both for your time.

After going to doom9 to see what you had to work with, the final result is impressive. I also viewed your version of my granddaughter's video clip. That effort was above and beyond what I expected, thanks.

You are both correct, the frame rate is not 25 which is the value stored in the container, I had my doubts it was 25 but believed "MediaInfo" analysis.

I browsed the doom9 thread, so ignore the following two questions if they are answered there. I'll study the thread asap.

1) I understand that you decimated unused frames (2 of every 3), but can't imagine how you did that?
2) You mentioned removing noise, is that a VP filter/plug-in you used?

I'm not sure how to run the script or what it does, but that just means there is a learning opportunity for me. Thank you again.

Rich

CPU Intel i9-13900K Raptor Lake

Heat Sink Noctua  NH-D15 chromas, Black

MB ASUS ProArt Z790 Creator WiFi

OS Drive Samsung 990 PRO  NVME M.2 SSD 1TB

Data Drive Samsung 870 EVO SATA 4TB

Backup Drive Samsung 870 EVO SATA 4TB

RAM Corsair Vengeance DDR5 64GB

GPU ASUS NVDIA GeForce GTX 1080 Ti

Case Fractal Torrent Black E-ATX

PSU Corsair HX1000i 80 Plus Platinum

OS MicroSoft Windows 11 Pro

Rich in San Diego, CA

Rich Parry wrote on 2/7/2015, 7:55 PM
@John M,

I'm not familiar with Vegas scripting, but I did cut and paste your script into a foo.cs file and blindly ran it not really know how to use it or what to expect.

You've done enough, I'm not expecting script support, but if you wanted to know, below is the error message I got.

C:\Program Files\Sony\Vegas Pro 13.0\Script Menu\John Meyer Old Video Fix.cs(21) : Unrecognized escape sequence
C:\Program Files\Sony\Vegas Pro 13.0\Script Menu\John Meyer Old Video Fix.cs(20) : A namespace cannot directly contain members such as fields or methods

CPU Intel i9-13900K Raptor Lake

Heat Sink Noctua  NH-D15 chromas, Black

MB ASUS ProArt Z790 Creator WiFi

OS Drive Samsung 990 PRO  NVME M.2 SSD 1TB

Data Drive Samsung 870 EVO SATA 4TB

Backup Drive Samsung 870 EVO SATA 4TB

RAM Corsair Vengeance DDR5 64GB

GPU ASUS NVDIA GeForce GTX 1080 Ti

Case Fractal Torrent Black E-ATX

PSU Corsair HX1000i 80 Plus Platinum

OS MicroSoft Windows 11 Pro

Rich in San Diego, CA

johnmeyer wrote on 2/7/2015, 8:47 PM
Sorry, my fault for not being clear. The script I posted is an AVISynth script. Vegas won't know what to do with it.