Removing green tint on VHS?
2 Attachment(s)
Hi everyone,
I want to improve this video clip. It was taken with a tube camera (Panasonic VK744-C ) connected to a portable VHS (Panasonic 5751-K) witch i can put on a docking station (Panasonic VA556-K ), My capture rig: Pana AG 1960 / DMR-ES15 / AVT 8710(green) /AIW 9600 AGP on win XP sp2. The clip was captured with VirtualDub with histogram levels within 'safe' 15-235 region. This camera often show a green corner in bottom left section, see image. Is there a way to correct? if not i will have to live with. The joined video show many problems. Low light conditions and image is noisy. Can we reduce noise. At left, we see a band, i guess i will have to cut, no way to restore. The whole image has a green tint, can it be improved? This clip is shaking , what are the options to stabilize the images? If you have any suggestion, pertaining to the process order ( do we treat noise before chroma etc.) they are welcome. Last, source is VHS and i intend to transfer on DVD 4:3 ntsc. Regards |
Thanks for the sample, but it's been processed. If you captured to RGB you made a mistake that's difficult to correct. You could also have a longer sample but as RGB the file is 3 times bigger than it should be as losslessly compressed YUY2.
|
1 Attachment(s)
Sanlyn,
I'm new to Virtualdub. attatchement show the MediaInfo result of the source avi. If my source is uncompressed, how to extract under a lossless file. Sorry for my bad english. |
1 Attachment(s)
Sanlyn, i found the answer in another post, replied by you.
However, VirtualDub in "full processing mode" saves as uncompressed RGB by default. So the resulting video is not huffyuv compressed and will be be pretty large. Change your "Video" menu setting from "full processing mode" to "direct stream copy" after making your cut and before saving the AVI, in order to get a smaller huffyuv video. I extractred another clip in direct stream copy. See the joined video. |
4 Attachment(s)
Quote:
Quote:
Quote:
-- DeShaker home page & tutorials: https://www.guthspot.se/video/deshaker.htm -- VirtualDub BorderPatrol plugin: https://sourceforge.net/projects/bor...atest/download Quote:
Quote:
http://www.digitalfaq.com/forum/atta...t-mediainfojpg That picture is not a MediaInfo report. It's an image of the front info page and contains very little useful information. In MediaInfo click on the top menu "View" item, then select "text" from the drop-down menu. Select the text that displays and copy it to the clipboard. You can paste that entire text into a forum post. Below is the MediaInfo report on your second .avi sample. It is huffYUV YUY2. Code:
General Quote:
Quote:
In your work you will also need to save files occasionally as YV12. Huffyuvv cannot compress YV12. For that you will need Lagarith, which has a very easy and simple installer. Lagarith makes slightly smalller files than huffyuv. It can compress YV12, YUY2, RGB24, and RGB32. https://lags.leetcode.net/codec.html The images below are samples of corrections and denoising I managed. I joined both video samples. A video result is atttached as VHS1_and_2_DVD.mpg. http://www.digitalfaq.com/forum/atta...1&d=1590010413 http://www.digitalfaq.com/forum/atta...1&d=1590010418 Scripts were opened in VirtualDub, and VirtualDub filters were applied to the Avisynth output while was the script was running. The filters used are described below the scripts. Script for VHS-#1 (change the path statements to show file locations in your system) : Code:
AviSource("D:\\VHS-CoupeAGP2-nron-2020.00.00.avi") Code:
AviSource("D:\\VHS-CoupeAGP2-nron-2020-YUV2.00-75362.avi") -- AviSource(), opens files. Avisynth built-in. http://avisynth.nl/index.php/AviSource -- ConvertoYUY2/YV12/RGB32: Avisynth built-in.http://avisynth.nl/index.php/Convert -- ColorYUV(), color control. Avisynth built-in. http://avisynth.nl/index.php/ColorYUV ---- "cont_y" = Y channnel contrast, "gamma_Y" Y-channel midtone gamma, "off_y" = Y-channel luminance offset, "off_u" = u (blue) channel offset. See COLORYUV documentation for more notes. -- Tweak() for saturation. Avisynth built-in. http://avisynth.nl/index.php/Tweak -- The ContrastMask function requires MaskTools2, Avisynth external plugin: MaskTools2 2.2.18, http://avisynth.nl/index.php/MaskTools2 -- Histogram (testing line only, disabled with character "#" marks): Avisynth internal filter: http://avisynth.nl/index.php/Histogram -- SeparateFields(), Avisynth built-in.http://avisynth.nl/index.php/SeparateFields -- dfttest, Avisynth external plugin. & Supported files. Very important and valuable denoiser, http://avisynth.nl/index.php/Dfttest. Be sure download all the supporting files and follow simple instructions. Download all to a separate folder -- don't download directly to the plugins folder. Extract the required files and copy only the plugins into the plugins folder. -- TemporalSoften, Avisynth built-in. http://avisynth.nl/index.php/Soften\ -- Sharpen, opposite of blur, Avisynth built-in.http://avisynth.nl/index.php/Blur -- Weave, Avisynth built-in. http://avisynth.nl/index.php/Weave -- Crop (remove unwanted borders) & AddBoreders (replace removed borders). Avisynth built-ins. http://avisynth.nl/index.php/Crop, http://avisynth.nl/index.php/AddBorders -- function ContrastMask2, a special internal function written for this coded cleanup. It can be used in other scripts, just copy the block of text to the bottom of a script. Copy from the word "function" to the last "}" mark at the end of the text. VirtualDub filters used: ------------------------ VirtualDub color filters were loaded in VDub's filter window and applied to the output of the script after activating "Save Avi...". The filters and settings are saved in a .vcf file to automatically load the filters and their settings. The .vcf file is attached as "VirtualDub_Settings.vcf". Download the .vcf and save it to your video project files -- do not load it into VirtualDub's plugins folder. When you are ready to use the filters Click "File..." -> then "Load processing setttings", locate the .vcf, and click "Open". The filters will load and you can view them to see how they are configured. The filters used were "ColorCamcorderDenoise (ccd17.vdf)" (http://www.digitalfaq.com/forum/atta...1&d=1544578132), and ColorfMil2.1.vdf (http://www.digitalfaq.com/forum/atta...colormill21zip). ColortMill was used to tweak the YUV color work and to add overall cyan (blue and red) balance and midrange brilliance, and to correct the blacks and darker colors in the image. Unfortunately VirtualDub has no effective denoisers for the noise in these clips; they are either ineffective or would make it look worse. If you're going to work with muddy home video from budget cameras and poor light it takes a lot of work to clean a lot of problems. |
7 Attachment(s)
Here is another way of processing your YUY2 sample, with some details on what some of the YUV and RGB settings are trying to accomplish. The corrections were determined one at a time. At first they were measured on a histogram.
The image below is the original frame 40 from you #2 sample. The black borders are removed to keep them from affecting the histogram attached to the right side of the image. The image is slightly reduced. http://www.digitalfaq.com/forum/atta...1&d=1590086762 In the right-hand YUV histogram above, notice the white bar across the top of the small chart. This indicates the luminance levels. White data to the left of the bar shows darks. The middle of the horizontal bar is the midrange tones, the right-hand side is the brights. The image looks foggy because there are no dark colors in the image. We would say that the black level is too high, toward the middle of the spectrum. Here is the Avisynth script that opened the clip, cropped off the borders, and added the histogram: Code:
AviSource("J:\forum5\faq\JACFIS\B\VHS-CoupeAGP2-nron-2020-YUV2.00-75362.avi") To do that some ColorYUV settings are added to the script and modified until we have what we want, and the changes are viewed on the histogram. http://www.digitalfaq.com/forum/atta...1&d=1590086908 Code:
AviSource("J:\forum5\faq\JACFIS\B\VHS-CoupeAGP2-nron-2020-YUV2.00-75362.avi") Now, to modify these results:.... Code:
AviSource("J:\forum5\faq\JACFIS\B\VHS-CoupeAGP2-nron-2020-YUV2.00-75362.avi") While the slight changes might not look like much, it is subtle in the shadows and color has been pumped with Tweak() to clarify objects a little more. The Levels() filter raises the darkest shadows slightly from about 10 to 16 in the statement that begins "Levels(10,0.95,255,16,255". The rest is up to VirtualDub. The script disables lines that are no longer used by preceding the unwanted lines with "###" character marks to turn them into comments instead of code. The clip is then opened directly in VirtualDub -- a formal RGB conversion and border fixes will be done later, after denoising. "Return last" is used to stop the script and return the results of processing so far. Code:
AviSource("J:\forum5\faq\JACFIS\B\VHS-CoupeAGP2-nron-2020-YUV2.00-75362.avi") http://www.digitalfaq.com/forum/atta...1&d=1590087145 A recent personal user's guide to using ColorMill that may be helpful:http://www.digitalfaq.com/forum/vide...ll-filter.html. One change in Avisynth that will simplify denoising is to replace dfttest with another favorite plugin, which someone on doom9 modified and called MDG2. The name is shorthand for "MVDegrain2", which is a function in the mvtools2 plugin. MVtools2 is used inside many other filters as well. The .dll filter comes in a zip package with documentation in a subfolder. Download it at http://www.avisynth.nl/users/fizick/...v2.5.11.22.zip. It is a 32-bit filter. Download the zip file into a separate folder somewhere on your PC -- don't download it directly into plugins. Unzip the package in its own folder and copy only mvtools2.dll into your plugins folder. There are also subfolders with extensive documentation, and even mnore on mvTools2's home wiki page at http://avisynth.nl/index.php/MVTools. MDG2.avs is a scripted avs filter. As text it must be imported from plugins into your script. You do that with the Import() function. The statement to bring the text of the filter into your code at runtime is "Import("D:\Avisynth 2.5\plugins\MDG2.avs". Change the path statement to point to the location of your plugins folder. The Import statement is explained at http://avisynth.nl/index.php/Internal_functions#Import. Code:
Import("D:\Avisynth 2.5\plugins\MDG2.avs") http://www.digitalfaq.com/forum/atta...1&d=1590087435 VirtualDub settings used are saved as a.vcf file *(attached). The filters used were ColortCamCorderDenioise, ColorMill, and VirtualDub's built-in temporal smoother. If you want anything cleaner or sharper than this, you'll have to learn to use prime deinterlacers/cleaners like QTGMC. https://forum.doom9.org/showthread.php?t=156028 |
Thanks Sanlyn,
Result is far better than what i expected from that bad clip. Your reply are always well explained and documented i grant you for that. I am not english speaking, so if i use the wrong terminology, correct me and this will help me to search in the forum. I am checking my capture hardware and VirtualDub configuration setting to make sure i have everything right before capturing again. I am searching informations about colorspace and how to use Histograms. Like: A&E's Technical Guides to All Things Audio and Video (v3) and infognition. I believe taht when you understand, you can correect better than going by trial and error with no understanding. Documentation form filters and plugins will be very helpfull too. Video restoration is new to me and i hope to be able to improve my home videos by myself. |
Restoration and filters are difficult in the beginning because you don't know where you're going at first. But with practise and patience you find the way, sometimes quickly. Filter documentation can be difficult, but don't try to be an engineer. Just look for the central idea of what the filter is supposed to do. Studying color and histograms is free on internet photo sites.
This website is in English but perhaps the images will help: CAMERA HISTOGRAMS: TONES & CONTRAST: https://www.cambridgeincolour.com/tu...istograms1.htm CAMERA HISTOGRAMS: LUMINOSITY & COLOR: https://www.cambridgeincolour.com/tu...istograms2.htm |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.