To address some of your other comments and questions:
DV codecs: I've worked on projects with samples using all the DV codecs mentioned. But I don't use DV myself. All Dv codecs look petty much the sme to me and seem to have the same pros and cons. DV in most consumer cameras doesn't seem to handle interlace or motion well -- it's a headache to wok with in that regard, butt DV wasn't designed for extensive restoration or re-encoding to other formats. Most of the codcs you mention are installed on my system, including Cedocida and Cineform and maybe one or two I don't remember.
QTGMC: it has extensive poarameters to modify its operation. Most users are not aware that QTGMC isnt basically designed as a denoiser: denoising and other cleanup are byproducts. IF you look at the support files it uses, you'll find that almost all of them are standalone filters in their own right with a ton of their own parameters. Most of QTGMC's settings are either named the same as those parameters or otherwise address them indirectly. For example, the faster modes of use FFT3D for basic denoising, but slower modes use the stronger dfttest. Other parameters adjust the operation or correct the deficiencies sometimes found in those filters, such as blurring and/or ghosting with high values in FFT3D and dfttest.
Of course, reading thru QTGMC's html is sheer intimidation for those who are new to it. There is even more information in the avsi script itself, where you find tables listing the various preset modes and how those QTGMC parameters are set for each mode and each operation. But the .avsi isn't readable when opened with Notepad. Intsead, open the .avsi with Windows Wordpad, save the file as QTGMC.txt, then open the .txt version in Notepad and disable Word Wrap. The complete avsi script is 963 lines of text. The actual function code begins on line 62, but below it you'll see hundreds of lines that are interspersed comments. Paramater settings for each "preset" mode begin on line 153. Looking at that table, you'll see that some of the Repair modes "Rep0, Rep1, TR1, etc.) are very low or turned off in the fastest modes of "very fast, "ultra fast", etc., but increase in value for the slower modes from "medium" thru "Very slow". The presets are handy as sets of optimized components. But what if you want the fast operation and less denoising of faster modes but more accurate motion interpolation found in the slower modes? What you can do is specify a "fast" or "very fast" preset, then add settings that increase values in the motion interp settings from slower modes. Sometimes the slowest presets do too much denosiing, so you have settings that retain and restore adjustable amounts of the original noise to keep results from looking too "plastic".
For the daylight scene I used the "fast" preset. Likely I'd get a sharper image using "medium" or "slow", but it looked rather overfiltered to me (there are ways around that). I used "slow" for the night scene, then still had to clean up low-frequency noise in the darks with MDegrain3, DeBlock_QED and some other measures, then prevent banding with special filters to restore a bit of controlled noise. One thing I didn't -- and maybe couldn't -- fix was the line flicker in the daylight shot. It's obvious in the white window frames, where I did clean some of it, but look closely at the second half of the clip and you'll see subtle line flicker in the shadowed gray cobblestones. It's there whether the clip is interlaced or not. A few Avisynth filters can clean it, I just didn't get that far. Another problem with the daylight shot is luma and gamma changes by the camera. Some Avisynth plugins can help stabilize it but they're a hassle to optimize. You can see a basic bright luma change in the original, interlaced Sample1.avi. Run the clip slowly in VirtualDuib and look the way the clouds and sky change starting about frame 135 and again at about frame 180.
Quote:
Originally Posted by AJAX1
3. VirtualDub Filter Chain- with the original video file opened through the QTGGMC script I add a chain of filters with the present order – general convolution, Xsharper, Temporal Smoother, Levels, HSV. Are these the most indicated filters for this type of DV files and is this the correct chain? Am I over /under using filtering.
|
The Sample2a.avi clip does look over-filtered. It also has crushed darks, some hot-spot highlights, and some oversharpening in a few areas. But altogether, other than being slightly darker than the original, it's not a bad effort.
I'm not certain how convolution filters work, but if you have some insight into them you're ahead of many of us (LOL!). Many Avisynth plugins use these filters internally, but I've never deciphered them. In general, the same filter set won't work for everything. But I suppose you realize this. Your filter sequence sharpens before denoising, so you're sharpening noise. One should denoise and do other cleanup before sharpening or resizing, otherwise you are resizing unwanted defects along with everything else.
I used Camcorder Color Denoise to reduce dark noise further and ColorMill for just a touch of blue in the the darks in Sample2. I used no
VirtualDub filters in Sample1. For both videos I monitored everything in VirtualDub with the ColorTools histogram in the output pane.
The differences in filter methods can be illustrated in several ways. But to give a specific example:
The images below are from the posted Sample2a.avi as modified in your VirtualDub setup (on the
left), and Sample2_720 before resizing (on the
right):
A = upper left corner from Sample2a.avi, as posted. The upper-left sky is near zero black, actually a little darker than the original Sample2. One light beam is very dim, the other isn't visible. At near black, the noise that's really there isn't easily seen. But TV display would be somewhat brighter and the encoder will make the noise more visible as artifacts.
B = the same upper left corner from Sample2_720p. The sky is brighter, with a little more visible detail in the sky and chimneys.
C = Blue sky area of Sample2a, brightened for a blue average of RGB 40 to 80. Notice mottling in dark and brighter blues. If you had raised the brightness of the darkest sky, the mottled blues would be easily visible, The mottling and broken color is low-level CMOS noise. Temporal smoother is a nice filter for grain, but it doesn't address low-level noise. After encoding, this mottling would move and "simmer" in motion, like vague blue blobs dancing in near darkness. You can also see red fringing (from the sharpener) and dark red over saturation in the building. The light beams look a bit oversharpened, more like lazer beams. But on a big screen it might not matter.
D = Sample2_720p sky raised to the same blue brightness. Plugins for debanding and block noise, and fine grain added afterward, make the sky look smoother and stable. Low-level CMOS noise is really difficult to subdue. It will never disappear completely without destroying much of the original image. In any case, this kind of noise is less visible in a still image than in motion, and encoders can handle fine, stable grain better than they can cope with dancing blobs.
Except for 2 filters, all was done in Avisynth. My Avisynth filter chain went this way:
Sample1:
- SmoothLevels for RGB 16-235, with dithering to reduce banding effects in large flat areas.
- Santiag, to reduce line twitter and aliasing.
- QTGMC ("fast", but "medium" would have been better). All frames retained.
- Spline36rezise, kept at 720 width but 1/2 original height, for line tweitter.
- Spline36resize (960x720)
- TemporalSoften, for some DV mosquito noise in shadow areas
- LSFMod (masked sharpening)
- AddBorders(160,0,160,0), adds 160 pixels left and right, for 1280x720. Not needed for PC-only.
- ColorMatrix (Rec601 SD to Rec709 HD color matrix)
Sample2 was more difficult. Had to be done in two steps, QTGMC being the in the first step:
- ContrastMask to raise dark data gamma in the range RGB 16 to about RGB 100
- Highlighter to raise some midtone values while taming brightest highlights.
- ColorYUv to offset all values by -3, reduce red contrast, slightly raise dark blue valuies.
- ColorYUV(off_y=-3,cont_v=-30,off_u=2)
- SmoothTweak raised saturation about 15%, with dithering to prevent chroma gaps.
- SmoothLevels, again to retain darkest darks, raise midtone gamma slightly, tame highlights.
- santiag for line twitter and some broken lines in the background building horizontal edges.
- QTGMC(slow)
- DeBlock_QED for low-level block noise and mottling in darks.
- MDegrain3 for motion-compensating denoising, especially in the darks, and avoiding macroblocks.
- Dither_Resize 16-bit resizing to 960x720
- GradFun3 in dithered 16-bit mode to smooth block noise and gradients in darks.
- TemporalSoften to slightly smooth noise during camera motion.
- aWarpSharp2 to tighten edges blurred by underexposure.
- LSFMod, for masked sharpening similar to Photoshop, Premiere Pro, etc.
- Dither plugin for 16-bit conversion YV12 -> to -> rgb32 for Virtualdub
- Load VirtualDub CamCorder Color Denoise, settings pre-determined in VirtualDub
- Load VirtualDub ColorMill, settings pre-determined in VirtualDub
- Dithered 16-bit conversion back to YV12
- AddGrainC, adds fine film-like grain to mask dark and sky noise, prevent "plastic" look.
- AddBorders, 160 pixels each side for 1280x720 frame. Not needed for PC-only.
- ColorMatrix (Rec601 SD to Rec709 HD color matrix)
The difference in results are below (Sample2a.avi = upper image, sample2_720 = bottom). The darks could be made a bit brighter, but the problem is the poor man near the camera in the lower left. He is at RGB 100 or so, right in the middle of the spectrum. Raising midtones would reveal more dark objects, but the man in the lower left would be washed out.
Sample2a.avi
Sample2_720:
On the other hand, everything in personal video restoration is relative. People tend to take up techniques they like, or discard others, to suit their purpose. The idea is to show that there are many possibilities and that some filters exist for very specific problems. There are many possibilities.
Quote:
Originally Posted by AJAX1
4. Saving to MP4 (version for pc playback) – which are considered good parameters for encoding quality MPEG-4?
|
Everyone experiments to find their optimum settings. There's no single answer. mp4 or mkv (both are containers, not formats) and h264 looks good with this type of video at variable bitrate targets of about 8000 to 10000 target, and 15000 max. HD frames require more bitrate than SD, usually. Some videos look well with less, others might need more. I'm using TMPGEnc for the samples posted here. Others use base x264 with detailed GUI interfaces, but that's a learning curve. x264 and other h264 encoders are a lot more complicated than other codecs, but TMPGEnc usually gives a usable range of options.
Quote:
Originally Posted by AJAX1
5. For some source material due to problems associated with zoom and panning I will need a Deshaker, is the version from Gunnar Thalin one of the best?
|
It's very good, but it does have issues concerning border changes, as most such filters do. Avisynth versions exist, with similar results. Later I'll try to work up a DeShaker demo to show what I mean. Some videos with imperfect camera motion don't always need deshakers.