Go Back    Forum > Digital Video > Video Project Help > Restore, Filter, Improve Quality

Reply
 
LinkBack Thread Tools Search this Thread
  #1  
01-28-2025, 12:26 PM
hermetic_charm hermetic_charm is offline
Free Member
 
Join Date: Feb 2023
Posts: 20
Thanked 1 Time in 1 Post
I am attempting my first dive into restoration/filtering, attached is a clip of the raw capture of the video I am currently working on. It for the most part captures the darkest and lightest scenes as well as some motion.

This was from a hi-8 tape, my capture chain was like this:
Sony DCR-TRV530-->SVIDEO-->TBC-1000-->SVIDEO-->ATI 600-->VirtualDub Huffyuv YUY2

Edit: Forgot to mention the TRV530 has TBC on and DNR turned off for this capture.

I have already been researching here and a few other sites, and I have been experimenting with different things to get my hands on learning, but I am at a point where I am going in circles a little bit and could use some help on what to focus on.

My high-level plan, in this order, is:
Store original Huffyuv as archival then
Deinterlace with QTGMC->Color corrections->Denoise->encode to x264 crf 15 422 for delivery format to share with family.

Colors:
Based on analysis with avisynth: It looks like there was not any luma clipping (good!) but is heavy on the dark side, and from the histogram it seems to me like chroma is all squashed into darks, with maybe some areas with too much red/yellow. This is just based on my understanding; I might be wrong here.

Based on eyeballing: I think it backs up what I see in the numbers from avisynth. The scenes look dark and undersaturated, almost gray-ish colors especially in darker spots.

levels1.jpg
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


I tried experimenting with Color Mill in Vdub. I thought to increase the saturation some, as well as mid-levels and bring darks down a little bit and I tried to counter-act some of the red by increasing cyan a little. This was valuable for learning in that I saw some changes, the histograms looked a *little* better, but I am still not happy with the end result. It seemed like it made the image softer, noise is more pronounced, and I think maybe there is too much yellow now? I try to keep tinkering, but after a while I start to lose track of what I was doing and feel like I have just been pushing slider bars all over the place and feel lost.

levels2.jpg

Noise:
There is quite a bit of noise, I think this is from the scene being captured in low light. I think it might be called gaussian noise, but I was having a hard time identifying different types of noise.

I was giving Hybrid a whirl, and mClean on the default settings seemed to give decent results but maybe lost too much grain/detail. But I was really just blindly trying filters. I wish I had the experience to know which filters might work best, but I guess for now I am just trying things to see what works.

Keep in mind this is only the preview window in hybrid so image quality is not great but you get an idea. Also, this is with QTGMC applied in hybrid, then mClean. But mClean produces similar results with deinterlace set to progressive in hybrid (to skip it).

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


At this point, I am getting the feeling that tinkering with denoising filters is probably a bit easier for a beginner than trying to figure out levels/colors, at least for common scenarios.

If you know any filters or scripts I can tinker with let me know, or if you want to share your own attempt at restoration on this clip I will do my best to dissect and understand it.


Attached Files
File Type: avi sample_2025_01_28.avi (97.15 MB, 11 downloads)

Last edited by hermetic_charm; 01-28-2025 at 12:48 PM.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-28-2025, 05:38 PM
timtape timtape is offline
Free Member
 
Join Date: Sep 2020
Location: Perth, Western Australia
Posts: 914
Thanked 180 Times in 166 Posts
The biggest problem is the low light and general unevenness of the original lighting. Members might try to improve the low light scenes but basically the low level information was not captured. Unfortunately we cant enhance what is not there.

Last edited by timtape; 01-28-2025 at 06:09 PM.
Reply With Quote
  #3  
01-28-2025, 10:36 PM
keaton keaton is offline
Premium Member
 
Join Date: Jan 2017
Location: USA
Posts: 225
Thanked 103 Times in 74 Posts
Attachment was uncompressed RGB, not Huffyuv. But no worries, I did a quick scan of it and did a couple things to it. Lots more notes and things to investigate in the attached .avs file I used.

The color actually looks pretty good, based on the 4 secs there is to look at. If you have any preference for less "warmth", perhaps a mild decrease in red and/or increase in blue in mid and upper range in Color Mill may be useful. However, it quickly started to look "cold" to me (i.e. a bit greenish and/or blue-ish). The attached sample did nothing to change the color or hue balance.

I did give it a gamma boost, which can be accomplished with either Avisynth Levels or ColorYUV. See comments in avs file on that.

Based on your comments about going too far with grain/noise reduction, I went lightly on that with a temporal denoiser I use a lot, RemoveDirtMC. As noted in the avs file comments, I don't recall all the prerequisites needed, but I think it works if you can get QTGMC working in Avisynth. I set it up years ago based on posts from sanlyn. Some forum searching should find it. I attached the RemoveDirtMC.avs file I used.

There's so many denoisers out there. That could be your biggest level of effort. I mention a couple more in the avs file comments. See http://avisynth.nl/index.php/External_filters#Denoisers It's a matter of preference how much grain/noise you prefer. You can go much harder than I went in this sample. There's also some such as FFT3DFilter that have a sharpen setting that can try to undo a bit of the smoothing effects. But if you've got noise leftover, it will likely sharpen that too.

Because the color balance looked good (in lieu of more flesh tones to sample for accuracy), I gave it a simple boost of saturation for all colors with the tweak command. More on that in the .avs file comments.

Depending on how far down the rabbit hole you want to go, there's plenty out there to learn more about color correction. However, based on this short sample, you don't seem to have any major issues there. You can go into Video Color Correction. But a simpler approach may be to do a bit of Photoshop (or Gimp if you don't want to spend money on that) and get some RGB color correction experience. A color accurate monitor is critical. There's color picking tools that can help, but a good eye is also a big advantage. That takes some time to develop. Doing some simple Red and Blue adjustments on pictures can help with developing that eye of what's too blue and what's too yellow, and what's too red or too green. Especially with analog video, unless it's broadcast quality stuff, you don't always get consistent and reliable color reproduction. So don't focus too much on any one frame of video, because the colors can change like the weather sometimes. The things that are most obvious are neutral (white, grey, black), and flesh tones. Our eyes seem to notice color casts in these most easily.

Best of luck to you.


Attached Files
File Type: avs sample.avs (3.9 KB, 18 downloads)
File Type: avs RemoveDirtMC.avs (1.2 KB, 4 downloads)
File Type: avi sample-after-huffyuv.avi (52.02 MB, 6 downloads)
Reply With Quote
The following users thank keaton for this useful post: hermetic_charm (01-29-2025)
  #4  
01-29-2025, 07:39 AM
hermetic_charm hermetic_charm is offline
Free Member
 
Join Date: Feb 2023
Posts: 20
Thanked 1 Time in 1 Post
Thanks keaton! I am going to dig into everything more when I get home from work today.

Odd about the uncompressed RGB vs. Huffyuv. It was captured in Huffyuv, I used an avisynth script with trim to make the clip, then I used direct stream copy to save the new avi as I have seen that method mentioned multiple times here as the preferred way to trim with no filters. I just assumed if it came in as huffyuv it would go out the same way, but I will check this when I get home.

I didn't know what gamma boost did so I had to do a quick search, it sounds promising and glad I learned about it and during the search found these threads which I think will help me learn a bit about ColorMill usage too:

https://www.digitalfaq.com/forum/vid...ll-filter.html
https://forum.videohelp.com/threads/...-as-VirtualDub

Going to read through those at lunch to try and get more acquainted with ColorMill. I have used Photoshop/Lightroom and Gimp in the past and done some simple brightness/contrast and color corrections for amateur photography, but diving into it for video seems like a whole different monster. I feel like once I do enough research and tinkering it will start to feel more intuitive.

I do have QTGMC up and running in Avisynth as one of my tinker projects over the last weekend was getting that working in both Avisynth and hybrid and seeing if there are major differences doing deinterlace + filters in Avisynth vs. deinterlace + filters in hybrid vs. deinterlace in Avisynth + filters in hybrid etc. I haven't tried RemoveDirtMC yet, so I will see how that (and the others you mentioned) performs when I get home.

Thanks for the tips and scripts to play around with, I will come back hopefully with some good results to share soon.
Reply With Quote
  #5  
01-31-2025, 09:11 PM
hermetic_charm hermetic_charm is offline
Free Member
 
Join Date: Feb 2023
Posts: 20
Thanked 1 Time in 1 Post
Thanks again. Gamma boost, levels, and increasing the saturation a little bit definitely helps bring some life back into this.

I have been trying variations of the functions you had in your script and running those in Vdub, but I have also been trying to then translate that over to hybrid just to get an idea of how it works in both tools.

I wound up really liking the combination of ColorYUV(gamma_y=XX) followed by a call to levels.

For denoise, RemoveDirtMC was giving me issues but after some forum creeping found some posts (i.e. sanlyn) that helped me get all the files I needed. Although I am not entirely sure everything is working correctly. It's not giving errors anymore, but I am not seeing any kind of visual difference in noise when I run it, even if I adjust the settings up or down.

I am also not so sure I even want to denoise anymore. Everything I have tried that does make a noticeable difference in the noise ends up softening the image so much that I think maybe I should just stick with the grain.

I am going to keep playing with it, but I have a feeling it is going to take a long time to get any good at and in a year or two I am probably going to want to come back to these and redo them. Which is why I better hold onto the raw captures, I am treating this as my experimental stage.
Reply With Quote
The following users thank hermetic_charm for this useful post: keaton (02-01-2025)
  #6  
01-31-2025, 11:58 PM
hermetic_charm hermetic_charm is offline
Free Member
 
Join Date: Feb 2023
Posts: 20
Thanked 1 Time in 1 Post
I spent some time trying other filters tonight to help with the noise and I am really liking the output from MCDegrainSharp and MLDegrain at the moment.

Last edited by hermetic_charm; 02-01-2025 at 12:12 AM.
Reply With Quote
  #7  
02-01-2025, 11:57 AM
hermetic_charm hermetic_charm is offline
Free Member
 
Join Date: Feb 2023
Posts: 20
Thanked 1 Time in 1 Post
Attached is the same sample clip but after applying filters and getting ready for encode for delivery format. I definitely don't think this is the best it could be as I have very little experience so far, but I also think it is a step in the right direction as I learn.

As a learning exercise, I tried to replicate the process in both VDbub + AVISynth and also Hybrid. This clip is coming from Hybrid as I really liked the results of MLDegrain. Maybe someone knows something that could replicate this directly in Avisynth? I experimented with some other filters but couldn't get the same result so far.

Applied:
QTGMC with faster and bob
Levels to boost the gamma = 1.35 (could not find a ColorYUV equivalent in Hybrid unless I am blind)
Tweak to boost the saturation =1.6
RGBAdjust to revert some of the yellowish/orange that was overpowering whites
R=1.03 G=1.0 B=1.05
MLDegrain to help clean up some noise while not completely removing grain or over softening the image
Additionally, as this is going to eventually be encoded to h264 for delivery:
I cropped 4,0,-8,-2 to take out the black edges and scanlines at the bottom
Then resized to 720x540 with a DAR=4:3

For this particular case I saved using FFHV, sent it back into Vdub and trimmed it. Normally I think I would just be encoding to h264 at this point but wanted to share a trimmed clip here.

Attached is the Vapoursynth script generated from Hybrid.

I really like both editing tools. Hybrid seems like a quick way to get to delivery and will be useful if the footage doesn't need too much custom work while Avisynth scripts directly in VDub seems like a very powerful way to edit if I need very detailed/custom work. I think I will end up using both, as well as VDub filters sometimes, and maybe even combining all three in some projects.

For now, I think I am going to continue with my captures, I have a good workflow down for that now. If I have a large backlog of raw captures, I will have a lot to experiment with and can just learn along the way, taking lots of notes, and always having the option to redo things as I get more experience.

Please school me if I am doing anything wrong or could improve something objectively.


Attached Files
File Type: avi sample_2025_01_28_edited_trimmed2.avi (95.36 MB, 10 downloads)
File Type: txt hybrid_vapoursynth.txt (4.4 KB, 9 downloads)
Reply With Quote
  #8  
02-01-2025, 12:26 PM
keaton keaton is offline
Premium Member
 
Join Date: Jan 2017
Location: USA
Posts: 225
Thanked 103 Times in 74 Posts
Glad you're having success! It's a wonderful feeling bringing the past back to life with the aid of modern technology!

When it comes to bringing life back into faded photos or videotape, adjusting contrast to use the full range of shadow/midrange/highlights and increasing color saturation (assuming any color cast issues have been addressed first) is the biggest bang for the effort. My experience tells me that Avisynth YUV based filters are usually superior to Virtualdub RGB based filters for adjusting luminance levels (contrast) and major color adjustments (subtle adjustments in RGB can be helpful with Virtualdub, but are also achievable with RGBAdjust Avisynth).

Hi-8 seems to be much better than VHS, but you still have to accept that consumer camcorder footage rarely has ideal lighting (i.e. outside on a sunny day) and the camera sensors do not adapt like our eyes do to the color casts of the indoor lighting. If the light bulbs are yellow light, the camera will render yellow light. So you may have objects that should be neutral (white/gray), but they have a yellow color cast too them. If you attempt to remove all of that yellow, you may find that the rest of the colors are not right. I focus most on flesh tones for color accuracy, and learn to accept it when neutral objects are not neutral. Although, if you have a particularly strong yellow color cast by a lamp, for example, you can use the tweak Avisynth function to selectively reduce the saturation of certain hues (in this case the yellows). The avisynth help on that command provides a color wheel and corresponding hue values.

For color and contrast, you've already got a good start on that with prior Photoshop work. The video captures are in the YUV space instead of RGB. I liken YUV a bit to LAB color space in photoshop. Y is luminance (L in LAB), U and V are the color difference information (A and B in LAB). I had done some LAB work in Photoshop, so that helped me understand YUV better. Hue and Saturation are what you see on the Vectorscope. Increasing Saturation moves color further towards the outside of the scope. Hue rotates the colors on the scope. Some video sources have a global color cast problem, which sometimes can be easily addressed with a hue adjustment, but are impossible to fix solely with RGB adjustments.

After fixing luminance and color, what remains is resolving imperfections of the analog source and dealing with the highly personal preference of noise and grain removal. Some do not wish to part with any of the detail in the image that lays underneath the layer of noise/grain, and their eyes are able to adjust and see through that to the detailed image underneath. Some are distracted enough by that layer of noise/grain that they cannot filter it out in their mind and wish to accept the softening effects that come with removing that layer of noise/grain. Often there's a compromise where some level of reduction is less distracting and the image is not too soft. If you have a soft image to start with, the noise removal can be easier to accept because there's not as much detail left to harm from more softening.

RemoveDirtMC is really not going to have much difference with different settings, except it can start to remove small objects that are mistaken for noise. It works much better, I find, on sources with a much milder level of noise/grain, as well as removing analog imperfections such as dropouts/comets from the videotape. Although it was not designed as a strong degrainer, it can still reduce some degree of grain to a possibly more acceptable level, depending on how far one wants to go. So you probably had it working right. Sometimes it can be good to use multiple denoisers, with each being on a milder setting. RemoveDirtMC is just one I've happened to lock on to. There are so many more I haven't explored simply because I was content with what I've found so far. But I know if I wasn't satisfied with a video, then I would force myself to investigate other filters. Which is what you are going through right now.

If you do go the route of removing most or all grain, a tip I read from sanlyn was to add some random noise back in with something like AddGrainC in Avisynth. It may seem a bit counter-intuitive to add back what was removed. But if you find a really good denoiser, but it's looks too "plastic" or smooth, adding a subtle layer of noise back may help it look a bit more natural.

Absolutely hold on to the raw captures, and be sure to keep more than one copy (hard drive space is so cheap compared to the value of what's in those files) and ideally keep a copy in a different location in case of emergency (natural disaster or theft).

I've been doing this for several years, because I really love it. You don't have to spend that much time to get good results. Mostly it takes a technical understanding of the fundamentals and practice finding out what works and what doesn't work for different types of video issues you encounter. You learn what you need to learn about for each video you come across. After a while, you begin to see the same things, and it gets easier. When I look at earlier work, I see things that I could have done differently. So long as you hold on to those original lossless files, you can always go back and give it another go.

P.S. - Just reading your latest post as I'm about to send this one. One quick reaction is I resize from 720x480 (or 704 x 480 after trimming off black edges) to 640x480 (using Spline36Resize in Avisynth, but there are others http://avisynth.nl/index.php/Resize) and encode with a DAR of 1 to h264, because I tire of video players that don't use the DAR information and therefore render it distorted. So if I force a physical 4:3 ratio and only resize the horizontal and don't touch the vertical, I feel I'm doing the least amount of modification that I can when resizing. I don't resize the vertical, instead I use Avisynth AddBorders to replace any rows I removed with Crop to get rid of the scanning noise at top or bottom of frame. I guess I do that because I know the capture was stretching the video horizontally when it was captured, and the vertical is not. So I choose to resize the horizontal to 640 and not touch the vertical.

A very nice improvement over the original! Good work! I think you have a 90+% solution, if not final. I think you are getting into that last few percent of subtle choices on more/less grain, subtle color adjustments, if any.
Reply With Quote
The following users thank keaton for this useful post: hermetic_charm (02-01-2025)
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Camcorder Color Denoise usage guide? Feedbucket Restore, Filter, Improve Quality 3 07-19-2021 07:52 AM
Hi8 capture filtering. color correction? sinul Restore, Filter, Improve Quality 2 06-10-2021 02:46 PM
Color correction for VHS captured videos? Okiba Capture, Record, Transfer 15 07-20-2020 02:27 AM




 
All times are GMT -5. The time now is 02:38 PM