1 Attachment(s)
I have a precious wedding video of which I have only a VCD as source (PAL). The original tape was long gone unfortunately. It was never converted to DVD.
The VCD, obviously, looks absolutely crap with lots of compression blocks, mosquito noise when played on even a 19 inch computer monitor. Are there any generic AviSynth scripts or VDub filters that can attack typical VCD problems? This video is very important to me. Should I post sample video of the VCD? If yes, would the MPEG file be fine or I need to convert it to Huffyuv? NOTE: I am aware of Garbage In Garbage Out, VCD can never be made to look like DVD quality...etc. My intention is to do whatever little corrections that can be done to make the VCD look slightly better. :-) -- merged -- Ok now I realized I asked this same question back in 2011 in the below thread. I am sure the suggestions still apply. http://www.digitalfaq.com/forum/vide...-workflow.html -- merged -- I couldn't make any meaningful progress in restoring this VCD. Could you suggest me the Avisynth or any other filters to correct this VCD? Unfortunately, I do not have the original tape and this VCD is the only source there is. A short unaltered representative clip is attached. The clip is extracted using Dgindex. Appreciate your help. Regards |
2 Attachment(s)
Try this (it's a beginning, it may need a good antialiasing filter that's not smoothing everything...)
Code:
MPEG2Source("VCD Source Clip.d2v", cpu=0, info=3) |
1 Attachment(s)
The original sample has choppy motion because alternate fields in the interlaced original were discarded when creating the 352x288 VCD, which is not an interlaced format. Dropping alternate fields reduced the original temporal resolution from 50 fields per second to 25 fields per second. The sample also shows the effects of low bitrate and poor deinterlacing (aliasing, broken lines, shimmer, macroblocks, detail loss, etc.). There are also obvious oversharpening edge halos and some mild but visible chroma shift and bleed. The sample also has unsafe luma levels that exceed y=16-235 -- in fact the levels even exceed y=0-255, with strong bright clipping in parts of the image. Gamma levels also change considerably during the scene due to the way the camera reacted to light changes. There is not much grain in the sample, so I didn't use specific degrainers.
I used the AutoAdjust plugin to help keep overall levels and gamma a little more calm. The Tweak() and Levels() built-ins were used to maintain levels closer to y=16-235. Note that black borders are y=0 and will affect the levels filters so I cropped off the black pixels but restored them later to center the image vertically. Nothing can be done to fix the camera lens flare in the second half of the clip or to fix the sharp clipping of brights, which occurred partially in-camera and partially in earlier processing. I used DeBlock_QED to smooth microblocks. FixVHSOversharp helped to clean right and left edge halos. I used QTGMC in progressive mode to reduce shimmer, repair broken lines and aliasing, and to clean up some of the chroma blotches. The old cnr2 plugin also reduced more of the chroma noise. aWarpSharp2 in merge-chroma mode helped tighten blurred chroma around edges. The original sample has 8 pixels of black border across the bottom, which was apparently a rather basic method of covering bottom-border head switching noise but doesn't center the image vertically. I removed that bottom border and replaced it with 4 pixels of top border and 4 of bottom border, which centers the image. I used nnedi3 to resize the image 2X to 704x576. This size is legal for DVD but won't alwys be acceptable if you intend to go to standard definition BluRay. Also 704x576 can't be joined to other videos if others are 720x576. I added 8 black p[ixels to each side of the image to make the frame 720x576. The final result is progressive video but is encoded as interlaced to match other 576i videos you might be working with. VCD is a low-resoltion, low detail format that was never intendedm for large-screen display, so you can't get the detail you see in larger frames. Detail can't be "created", so I used only mild sharpening to avoid the usual artifacts. Code:
MPEG2Source("J:\forum\faq\naripeddi\VCD Source Clip.d2v") Code:
#--- resample for web posting, sharpen a little ---# @theMaster1; I didn't see much grain in the sample but saw macroblocks and shimmer, so I'm wondering why you used Mdegrain. Thanks for the script, however. Those MV routines look interesting. |
Many thanks to themaster1 and sanlyn for the scripts. @sanlyn, thanks for the education too.
The video was shot by professional videographers on DV tapes in wedding (may be better DV than consumer DV), and at the time DVD was not offered as an option as delivery format, neither was I appreciative of the DVD vs VCD quality difference. So, we went with the default option, which was VCD. Those days CRT ruled the TV space and the VCD looked perfectly fine on those TV's. I will apply these scripts to my entire video and post the results back. |
I don't have access to my main video computer this week, special project, but do plan to look at this. And I have experienced with Indian VCDs.
A VCD mostly has issues due to bitrate (macroblocks, mosquito noise) and deinterlacing. While some VCDs had good deinterlacing, or even IVTC, most did not. Thankfully, methods to improve such sources have themselves improved in recent years (past decade or less). QTGMC modes are one example. I agree, both themaster1 and sanlyn have given you nice scripts to start with. :congrats: |
Pardon my ignorance, after saving these scripts in notepad as AVS file, and opening in VirtualDub, how do I get my final output file in MPG?
|
Quote:
|
Quote:
I don't know what you used to demux and create your .m1v sample but it would also have created a matching audio file. The video and audio can be joined using Avisynth. If you post a sample of .m1v and its matching audio output file, we can post a script showing how it's done. |
1 Attachment(s)
I used Dgindex.exe to cut the sample portion of the VCD. Yes, it has created an audio file in .mp2 format (attached). Bear in mind that there is nothing but a lot of noise in the audio, I am not worried about the audio part restoration for now, since it will be replaced with some sort of music.
So you are saying that the output of this Avisynth script will be a lossless clip (though we started off with VCD to begin with), which again needs to be encoded either to VCD or DVD as per my choice. I would prefer to encode to DVD, I see you have resized it to 720X576. I will do DVD encoding later in Avidemux since I do not have paid software for it. As for my cutting joining needs, I do not plan to do it. The entire video file will be processed with the script and that's it. Even in case I need cutting, joining, I have bought TMPGEnc Smart Renderer 5 which is serving me very well. |
Sorry, tried to open the avs file in VirtualDub and I am facing several errors stating that certain plug-ins are not loaded, "/" can only be used at the beginning or end of a line...etc. I guess I do not have a proper set-up for Avisynth to work.
I started downloading (from avisynth.nl) and copying whatever plugin it said it didn't find into Avisynth plugins folder, but facing some new errors such as "There is no function named mt_LutSpa"....Some of the plugins I found as .dll and some are available as download only as an avsi script, which I assume I need to copy to pluin folder as well. I cannot fully utilize both of your scripts until I sort out my setup I guess. Is there an Avisynth rar file that I can download which contains all these plug-ins already (like LordSmurf's VirtualDub with filters)? I am using Windows 10 Home 64 bit. |
Quote:
Quote:
You should use 32-bit all the way for Avisynth and VirtualDub. When you start mixing 32-bit and 64-bit components, you get errors. |
5 Attachment(s)
Quote:
Here are downloads and links to the filters and plugins used in the avs script I posted earlier. The best way to manage them ism to create a separate folder for plugin downloads then create subfoldedrs for specific plugins or zip files,m and unzip the compressed files into their own subfolders. Do not unzip Avisynth plugin downloads directly into your Avisynth program's main plugins folder. Many plugin downloads contain additional files that don't belong in your main folder and can cause errors if they are in there. Avisynth plugins use files names that end in .dll, .avsi, and .avs. .dll's and .avsi files load automatically when an Avisynth script calls them in the text of the script. .avsi files are in plain text format and can be read using Notepad or any other word processor. .avs plugins are also plain text files but they don't load automatically when used in an Avisynth script. Instead, .avs plugins haven to loaded explicitly using the Import() function (http://avisynth.nl/index.php/Internal_functions#Import). .avs scripts are often used for plugins that have many different versions but contain common blocks of coded text that can be confusing if all of them are auto-loaded into a running script. MPEG2Source is a function in the free DGMPGDec utility (https://www.videohelp.com/download/dgmpgdec158.zip). DGMPGDec also contains the DGIndex.exe utility to create demuxed d2v project files and demuxed audio files. A d2v project file can be created from VOB, MPG, MPEG2 and MPEG1 video files. Create a folder on your PC and name it "DGMPGDec", then download the DMPGDec .zip file into that folder. Unzip the file, and all the utilities and guides you need are in those unzipped files. There is no install required, but you must place a copy of DGDecode.dll in your Avisynth plugins. DGDecode.dll is the only plugin thye utility needs in the Avisyth plugins folder. The scriptm functions Crop(), Tweak(), AddBorders(), ConvertToYV12/YUY2(), MergeChroma(), and return() are built-in Avisynth functions. They are documented with examples in Avisynth's installed help files in the Avisynth program folder and are available on the 'net by searching Google for "Avisynth" followed by a function name. The AutoAdjust plugin is in a previous forum post attachment as AutoAdjust260.zip SmoothLevels is a function in the SmoothAdjust plugin. It is contained with 11 other plugins in the previously attached avisynth_plugins.zip, which has a total of 12 subfolders with very popular Avisynth plugins. Some of the included plugins in the script posted earlier are SmoothAdjust280, FixVHSOversharp, QTGMC_Plugins_Nov_2017, ChromaShift27, FixChromaBleeding, and aWarpSharp2, and any support files required by those filters. Note the instructions that contain important details about how the files are installed and used, especially for the QTGMC package. Other plugins contained in the .zip are ContrastMask, DePan_1_13_1, FixRips, RemoveDirtMC, SmoothUV, and vInverse. You will see these plugins mentioned in many restoration threads and posts, one of which is here: http://www.digitalfaq.com/forum/vide...html#post51575. DeBlock_QED is designed to smooth macroblocks without destroying too much detail. It is attached here as DeBlock_QED.zip. DeBlock_QED requires three support plugins, all of which can be used as standalone filters in their own right: - DCTFilter_0150 (attached as DCT_Filter_0150.zip) - DeBlock_13 (attached as DeBlock_13.zip) - MaskTools2 (version 2.2.1x supplied with the QTGMC plugin package, listed above) Cnr2 is an old standby usedc to help clean chroma noise and ugly color blotches. It is attached here as Cnr2_v261.zip. nnedi3_rpow2 is a resizing function in the nnedi3.dll plugin (included inn the QTGMC plugin package, listed above). LimitedSharpenFaster.avs is contained in LimitedSharpenFaster.zip. Many Avisynth plugins require the Microsoft Visual C++ 2015 runtime Redistributable Package (vcredist_x86.exe). Microsoft's download link is http://www.microsoft.com/en-us/downl....aspx?id=52982 . You might already have this installed in your Win10 setup, but check Microsoft Visual C++ installs in your Control Panel. You'll need it sooner or later. After you install these filters you'll have a handy store of very popular Avisynth plugins that are in use everywhere. If any problems, post questions. :wink2: |
Quoting myself here:
Quote:
|
Wow sanlyn, that's so generous of you to provide all those plugins together. I will create my setup with them and attempt the scripts. Point noted on 32-bit.
I had to create RAR file for the audio since the forum did not allow upload of file type .mp2. This was the same reason why I had to create RAR file for the video as well, the forum did not allow files of extension .m1v (only m2v was allowed). Again, I will look at why the audio archive was invalid. Will be a day or two. |
Quote:
.m1v has just been added. 99mb limit on both. |
Thank you admin for adding support for .m1v.
Sorry for my oversight on .mp2. |
Within sensible limits, we'll add whatever is needed to make this site work better. :)
m1v was a good addition. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.