![]() |
Cleaning and Enhancing miniDV capture files
I have captured a large number of miniDV tapes using a firewire connection between camcorder and pc and used WinDV / Sceneanalyzer live, to capture native format DV files. I think it´s the right method as the original is already a digital source and so I´m only doing a digital copy with exact the same characteristics as the original.
The captures went well , all of them with no drop frames and the quality is acceptable for miniDv quality 720x576 PAL interlaced. However even miniDV can benefit from filtering and enhancing as there are some noise ( namely in low light conditions ) , need for de shake, desinterlace ( for pc version ) and eventually I´m not sure if it can result upscale and expansion to 16:9. I Intend to use VirtualDub for filtering. I found a detailed description of filters to use and most usual settings for cleaning several media, analog and digital ( codecpage.com ) however I ´m not sure if the writing is actual and if the best filters are still the same. Pc presentation -Filters recommended for DV Smart deinterlacer ,General Convolution ,Xsharpen ,Temporal Smoother Optional De shake ,Warp Sharp filter ( crispening ), levels filter, HSV I have also some general doubts and I would be grateful if someone could enlighten me One problem is what format to use to minimize losses due to reencoding after filtering , is it better to work with an intermediary format like Huffyuv , MJPEG or should I work in the original DV format? After filtering I can eventually do some editing if limited with virtualdub, if not with with Sony Movie Studio Platinum Is it better after filtering and editing to stay in DV format or choose for instance MP4 as a PC presentation format. If DV is an option a good DV codec will be needed for virtualdub ( could Cedocida DV codec be a good choice, there are better choices ) Desinterlacing should it be done to 25 or 50 ( what are the rational to select one or another) Should the filters be applied to the complete film or for instance should some zones be split and specific filters used only on them ( for instance significant noise due to low light conditions that only affects a small section of the film) Some filters need to be in specific order, what are the filters that are position dependent to have good results I have heard a lot about spot remover could it be a better option for denoising Does smart upscale double resolution and expansion to 16:9 result well with a miniDv source are there already mature solutions, sometimes display processors in some mid-range flat-screen TVs are substandard, generating visible motion artifacts and previous upscale could eventually provide better results. What will be the better solution to do so. For Mpeg encoding (Dvd- Blu-ray) Similar choices without desinterlacing Probably will choose TMPGenc video mastering works and Sony DVD architect studio to encode and authoring DVD and Blu-rays. Does CCE Basic (cinema craft encoder) still exist ? does it provide better results . Could a progressive MPEG 2 for computer playback be an alternative to DV or mp4 options Thanks for your comments and advice's |
Never perform post-process filtering or image mods with lossy encoded video. Use losslesss huffyuv, Lagarith, or UT codec.
Why are you deinterlacing? Is this for web or PC-only playback? BTW, The correct term is "deinterlace", not "desinterlace". :wink2: Most PC media players will deinterlace properly during play. For the internet, you have to deinterlace. Don't use someone's silly smart-deinterlacer. The smartest deinterlacer is Avisynth's QTGMC. An alternative with Virtualdub would be yadif, which is a decent filter. Deinterlacing doubles the frame count and doubles the frame rate. Stnadeard defintion DVD and SD BluRay cannot be encoded at 50fps. Segments of video that require different filters should be cut out and treated separately, then rejoined when you're finished. Upsampling lower-resolution standard def video to HD sizes is almost always a waste of time. Take your chances there, but you should know exactly what you're doing and how different resizing methods affect video. All resizers are not alike. Many DV cams shoot 1080i widescreen video, some shoot standard definition. DVD is interlaced and plays best that way on TV. DVD cannot be encoded for HD frame sizes. DVD is Standard Definbition only, either 4:3 or 16:9. If you encode 4:3 video sources for 16:9 display, the image will be distorted (stretched) and fuzzy. You can also encode to standard definition BluRay at higher bitrates, but SD BluRay for 720x576 PAL is also interlaced 25fps. Progressive 50p video is not valid for BluRay at either 720x576 or 1920x1080. |
Add these considerations to my earlier comments, above. You seem confused about several things:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
I didn't know DV had spots. Okay, maybe it does. I just don't recall. Quote:
You keep mentioning "expansion" to 16:9. What is the aspect ratio of your MiniDV videos? Are they already 16:9? Are they 4:3? "16:9" is not a frame size, it's an aspect ratio. Standard definition video can be encoded for final output as either 16:9 or 4:3 display aspect ratio. The standard definition encoded frame size for both aspect ratios, whether it will be 16:9 or 4:3 playback, and whether you want DVD or BluRay, is PAL 720x576. You cannot use any other frame size for those encoded SD formats. The video should be interlaced, and the frame rate can only be 25fps. Quote:
- DVD = 25fps, interlaced, 720x576, MPEG2, 48KHz audio - SD BluRay = 25fps, interlaced, 720x576, MPEG2 or h264/AVC / MPEg-4/AVC, 48KHz audio high definition BluRay: - 1280x720 (16:9 playback only), 50fps, non-interlaced, MPEG2 or h264/AVC / MPEg-4/AVC, 48KHz audio - 1440x1080 (for 4:3 source video on 16:9 display), 25fps, interlaced, MPEG2 or h264/AVC / MPEG-4/AVC, 48KHz audio. - 1920x1080 (16:9 playback only), 25fps, interlaced, MPEG2 or h264/AVC / MPEg-4/AVC, 48KHz audio. For some high definition frame sizes, there are progressive modes for film-source video (24fps or 23.976fps). Your miniDV's don't qualify for those formats. Quote:
Quote:
Quote:
I'd suggest taking one step at a time, or you'll have a nervous breakdown until you get a handle on various processing steps. Begin with opening your DV in VirtualDub. If you can read the video in VDub, you already have a DV codec installed. If not, install Cedocida. You can make a short sample of several seconds using VirtualDub's "direct stream copy" output mode, and post it here. Or you can make an un-reencoded DV sample in your SONY software, but don't apply any filters. We can't go into detail about filtering without a short sample of real, unfiltered video. |
Quote:
Some DV camcorders could record in a kludged 19x9 format, they often just cropped lines from the top/bottom of the 4x3 frame. Not a very satisfactory way to do it. However, Century Optics offered a 16x9 adapter that could be used with a 4x3 DV (or analog camcorder for that mater) camcorder to record a 16x9 aspect ratio image. (On DV it effectively changed the pixel aspect ratio.) Some HDV camcorders could record 16x9 aspect ratio SD. |
2 Attachment(s)
Thank you so much sanlyn for your detailed answers.
For post-processing filtering the problem is fixed , I will use an intermediary lossless format like huffyuv. However for editing I don’t know if that type of problem arises or not. If I only need to do some cuts I could do it with virtualdub and do a direct stream copy without losses , however if I need more extensive editing and have to use a NLE like Sony Movie Studio or Premiere do they have the ability to edit natively with DV or Huffyuv ? how to limit losses in editing context? Related to deinterlace ( sorry English is not my mother language and an error can occur ) I was only thinking to do so for PC playback obviously, but if as you say most PC players do a competent job deinterlacing perhaps there is no need to do it. I initial thought trying QTGMC instead of smart deinterlace as I have read it´s much better ( for virtualdub your proposal I know is yadif ) but as I have no knowledge of avisynth script language I thought it could be more difficult and will be better trying first virtualdub filters. What is important to know is if PC players can present similar results to the ones we can get from Yadif with virtualdub or even QTGMC if it´s the case deinterlacing is a no problem. My original videos are SD 4:3 Pal so according to your comments only HD 4:3 upscaling is possible, however it could be complicated and not worth the effort. Related to the more usual filters to clean normal DV footage I understand that it´s film dependent, however having more then 250 films to clean I must find a sort of lowest common denominator, if not it will take forever. The quality of my DV footage is relatively uniform with exceptions for noise in low light conditions and shaking in zoom and pan situations. I will post 2 small samples of normal video and video in low light conditions to have your comments. After filtering you recommend saving to YV12 with lagarith or UT video codec , can it be done as Huffyuv or doesn’t it support the YV12 colorspace When I referred eventually using Spot remover for denoising I was referring to spot remover from Konstantin Khlopenkov and using noise reduction only, as I have saw some examples with very good results. Related to upscaling methods other then smart upscale that give superior results can you detail a little more. Mpeg encoding - according to your comments I will be doing DVD 25 fps, interlaced, 720x476 MPEG2 , 48 kHz audio and /or Blu-Ray 1440x1080 , 25fps interlaced , MPEG2, 48 kHz Well related to the use of TMPGenc video mastering works and Sony DVD architect you already gave the answer when you said "TMPGenc gives superior encoding quality" , It´s why I was thinking using it for encoding and as I have limited needs for authoring using Sony DVD architect as a complement only for authoring. Related to the MPEG2 vs MP4 for PC playback are there specific advantages relative to one another, for this purpose? |
Thank you for the samples. Will look into them tonight.
As for spelling "desinterlace", don't worry about it. We see language crossups all the time. I'm certain a lot of USA natives use some of the worst English and spelling that anyone ever saw. |
1 Attachment(s)
Source is already not so great
remain in YUV, RGB not in [Edius is okay] Avisynth QTGMC and with Edius the intricacies Difference, before ...... afterwards as GIF www.ww-consulting.ch/DL/Vergleich.rar On DVD or Bluray only in an emergency small example www.ww-consulting.ch/DL/Test.rar |
I'm sorry to report that I will be away from the forum for a few days because of a death in my family early this morning. My family lives in the Southern U.S. about 1100 miles from my location, so I will be traveling for a while.
I've looked over the samples. Both are workable. Sample 1 doesn't need conventional noise reduction, but appears soft because of line twitter and bad interlace combing (it almost looks like dot crawl, but it's just bad DV interlacing). The combing is easily corrected, but the line twitter is more difficult. You can see line twitter in the white-framed windows in the latter part of the sample. It can be corrected to a great extent, but not with VirtualDub. Sample 2 has low light CMOS noise, but it can be cleaned up. I should caution that removing all of the noise from the video will result in obvious block noise (rough and nosy gradients) unless controlled and dithered film-type grain (not very visible in playback) is added back into the video after filtering. I will have to explain this later, when I'm able to get back to my PC's. Meanwhile, other forum members might have several suggestions. I apologize for the delay. |
If you want to store deinterlaced/upscaled 4:3 video on BluRay (or Youtube for that matter), deinterlace with QTGMC and upscale to 960x720. Pad with 160 pixel pillar bars on the left and right to get a 1280x720 frame. If you are editing with a NLE, you can avoid intermediate re-encodes by using DebugMode Frameserver to feed Avisynth and your output encoder. For BluRay, using H.264 as opposed to MPEG-2 is acceptable.
|
4 Attachment(s)
Quote:
But then created in a project Edius 720 50p...see screen. Testsample2 here now times in x264 but interlaced, MBAFF possibly scaliert this clean a good scaler in TV -- merged -- Source is already not so great remain in YUV, RGB not in [Edius is okay] Avisynth QTGMC and with Edius the intricacies Difference, before ...... afterwards as GIF On DVD or Bluray only in an emergency small example |
Sanlyn my sincere condolences .
Thanks for all other comments and advice . It seems that despite the positive evolution of PC video players, QTCMC deinterlacer could still present an advantage as it seems to give a significant quality improvement . I will have to analyze in detail your comments and try to see if I can use QTCMC as I never have used Avisynth before. I do not have Edius I have Sony movie studio and Premiere and an old version of Pinnacle studio but probably I will be able to do something similar. Has I have told before my objective is to have a version for PC playback ( MP4 or MPEG2 I have still to decide with your help) and a DVD/ Blu-Ray version with or without upscaling. I will try to see all your comments so as to have the maximum information to take the most correct decisions. I have also to identify beyond the deinterlacer which other Filters may be useful and their right workflow I will be out this weekend I will see in detail everything next week |
1 Attachment(s)
Sony is working internally in RGB
Edius internally in YUV Pinnacle can not do anything with YUV [YUY2] not with streams in Lagarith and Huffyuv_MT. see screen |
Quote:
__________ codecpage.com has ancient cleaning methods listed, and several has nasty side effects. Don't do that. Some of the filter chains make me cringe. That won't be pretty at all. DV > filter intermediary (Huffuyuv suggested) > archived output (high bitrate MPEG-2 suggested) DV codecs can really adversely affect quality. Choose carefully. Most just use Canopus. A raw deinterlace unfold fields, thus doubling framerate. But you get vibrations and jaggies. Simple methods like drop-frame drop a frame; it fixes vibration, but not jaggies. Quality methods like Yadif 2x (VLC playback) and QTGMC (encoding via Avisynth) are needed for quality deinterlacing. I hate the term "capture", when it comes to DV. The DV format footage is transferred via IEEE1394/Firewire, not captured. Even my Bluray players has no idea what to do with AVC-on-DVD discs. Yet it plays the same video as MP4 or MKV over the network just fine. NJRoadfan describes upscaling perfectly ... but it's still not something I'd ever suggest doing. SD will never be HD, so there's not much point in doing it. More can go wrong than right. Never use Pinnacle. It's junk. Premiere should be fine. |
miniDV cleaning and enhancing for PC playback and MPEG2 DVD/Blu-Ray
There are several situations that probably benefit from optimization 1- Use a correct workflow DV file >VirtualDub (DV Decompress ) (filtering ) > Intermediary lossless format or Frameserve >NLE edit Sony Movie Studio/ Premiere Pro >Frameserve or intermediary lossless format> Encoding(TMPGenc Authoring works) > Authoring 2- Select DV codec Decompressor , intermediary format ( lossless HuufYuv ? ) , colorspace ? and external (auxsetup ? ) or internal frameserve . 3- Select the best filters , settings and chain to use with virtualdub or Avisynth The order indicated is not necessary the best one or pretend to be correct is only shown as an example DV decompressor – DV codecs apparently have very different results , from what I have read apparently Canopus , Cedocida and Mainconcept have the best results, even if there are different opinions, but Canopus latest version is old, version 1.02 (99) found at videohelp and its only for playback. Perhaps the Grass Valley playback codec pack only for windows 7 and 8 (64 bits) includes a DV codec . Mainconcept codec I think is not free. As Cedofita ( open source Video for Windows (VfW) DV-Type2 - 32 / 64 bits) is still supported, last version 0.2.3 (October 03, 2012) supports RGB,YUY2 and YV12 and is generally considered a good DV codec I tried it and I think the results are better than the ones I get from the internal virtualDub dv codec. Formats / ColorSpace – conversions could introduce losses DV (YUV 4.2.0) VirtualDub and most filters must run in RGB colorspace ( internal DV codec apparently supports YV12) NLE Editors as Premiere Pro and Sony movie Studio 13 platinum work internally with RGB . The so called smart rendering only for transitions or similar alterations could not be possible.Eventually Cyberlink Power Director could render only audio or video portions that have been modified Frameserving between the different applications can have also limitations I think that the best would be to use a lossless format and colorspace that could be used without conversions in all application involved and if possible frame serve from one to another but that doesn’t seem to be completely achievable and it could be necessary to find the best possible solution. Even if separate applications could be more specialized and give best individual results ,could it be interesting to reduce the apps number to avoid eventual additional conversions . Cleaning the video I´m convinced that QTGMC for Avisynth is the best deinterlacer ( for a PC playback version ) the others filters I don’t have by now a definitive idea , could general convolution , xsharpen , temporal smoother be part of the solution for the samples I have posted. Even If I don’t get the best possible results I am also interested in a group of filters that can work as a general purpose cleaning solution for this type of files, a sort of lowest common denominator as I will have no time to find the best solution for every each one of a lot larger then 250. If possible I would like to know your opinions’ about using VideoCleaner (supported on AvsPmod. Avisynth, VirtualDub) and also vReveal for cleaning miniDV. I ´m sure they will provide worse results but could they be interesting in a time / benefit perspective ? I will try to put a sample of the results I got with vReveal |
2 Attachment(s)
Quote:
Here I have both Edius 6:08 and 7:50 installed on different PCs. As a newer version of Canopus DV codec is included automatically. see Screen Working here for Edius 1.0 My first version was Edius 1.0, previously with the DV Storm and Storm video and Storm-Edit. ----------------- postscript Screen 2 = Edius 7:50 |
Quote:
Quote:
|
2 Attachment(s)
I have made 3 different approaches to clean miniDv files. The conventional one using virtualdub and Avisynth an other with videocleaner (supported on AvsPmod. Avisynth, VirtualDub) and a third with a discontinued software vReveal.
I was almost sure that the results from the last two options would be probably worse than from the first approach however they involve a descending order of effort and I wanted to see if it was possible with less effort to get results close to the ones of the first option. Version for Pc playback Option 1 –VirtualDub and Avisynth - used QTGMC to deinterlace with a simplified script AviSource("c:\sample1.avi") QTGMC( Preset="Slow" ) SelectEven() Additional VirtualDub filters used - general convolution, xsharpen, temporal smother, levels and HSV. For the sample with extra noise due to low light condition I tried also neat video Options 2 and 3 – The results I got even if probably not optimized in the context of own applications are clearly inferior to what I would be expecting. I think I will retain the first option , however I will need to optimize the script for QTGMC ( I hope someone could provide or help with an optimized script) and to find out/ confirm the best filters to use in this situation and if the chain is correctly established. Your opinions are welcome. I also will need to establish what will be the appropriate settings for MP4 or MPEG2 compressors to assure good playback quality. DVD version I will do the same filter approach after it´s optimized for PC playback without deinterlacing . I tried TMPGenc trial for encoding and was satisfied with the results , however as I intend to do DVD and Blu-Ray´s I will need TMPGenc video mastering works .As this application does a lot more then only mpeg encode , I was thinking in order to limit losses and eventual changes in colorspace to eventually use only this application to do everything else , edit , encode and authoring even if I have Sony movie studio and premiere pro that could be better for editing and Sony DVD architect that could be better for authoring ( my needs in editing and authoring are limited ) . If I can use only one product like TMPGenc video mastering works, I think I can have eventually benefits associated with limited reconversions and losses but I´m not sure about it. I would like to know you opinions about a good application workflow in order to limit recompressions , colorspace conversions , intermediary formats , losses in general, but with adequate characteristics to do a good job |
2 Attachment(s)
Not much noise in the new captures. Many bright spots exceed rgb 255. The daylight scene has black levels and gamma a bit too high, will look rather washed out on TV, and the clouds in the sky are beginning to edge out of clarity. Both videos are deinterlaced by discarding alternate frames, which gives horozintal motion problems in all formats -- more visible on TV, but you can see horizontal "double-image" judder on PC monitors during camera pans. On some TV's this will sometimes look more like skipping than judder.
Commercial PAL DVD's and SD PAL broadcast are interlaced or use some form of quasi-interlace (pulldown). You can get away with 25p on DVD, but not always, and motion is still a problem. Some authoring programs won't accept 25p for authoring to-spec DVD, some others will. Some authoring apps won' even tell you one way or another, they just re-encode non-compliant videos in their entirety. Time to go over some basic BluRay encoding rules for the second (and maybe third) time: 720x576p standard def at 25fps is not compliant with standard def BluRay/AVCHD or DVD (16:9 or 4:3). 1280x720p HD at 25fps is not compliant with BluRay/AVCHD (16:9 only, 50 or 60 fps only). 1440x1080p HD at 25fps is not compliant with BluRay/AVCHD for 4:3 images, 16:9 display. 1920x1080p HD at 25fps is not compliant with BluRay/AVCHD (16:9 only). Again, you can take your chances on encoding this way, or you can cheat and encode progressive video as interlaced when you want. Unfortunately, if you've discarded frames the original, judder will look worse. Previously I prepared various encoded demos for each likely format but they're already archived. I do have on hand the earlier Sample1 in a PAL DVD version (720x576, 4:3 interlaced) and a 1440i version (interlaced) for BluRay. They won't play exactly alike as far as line twitter or other problems, and they vary in different players, but the DVD seems to have the cleanest motion in small moving objects and edges. The 1440i version is zip'd because it's "regulation" encoded for BDMV as an .m2t file. m2t isn't an allowed upload extension, so I zip'd it for loading (even though zipping compressed video just changes the file name, it has little or no compression effect). My workflow was Avisynth -> VirtualDub filters (if any) -> TMPGenc encoder. I can dig up the darker sample2 versions later. But as an HD upsample will show, there is no dark detail at all in much of the street, and motion in dark areas is blurred and smeared -- that's because underexposed video areas have little or no detail, just mostly random noise. Upscaling simply reveals how terrible it really is. I'd stay with standard def on the night scenes. |
The samples now posted are not new captures , they are only my first attempt to try to clean miniDV footage, using the previous samples posted some days ago for comparing purposes.
|
My fault, I should have been more specific. The video I submitted was based on your original post, not on the modified videos posted later.
I'll have more samples and ideas later today. |
1 Attachment(s)
Some additional details about what I have done so far and doubts that I still have
1. I installed Cedocida DV Codec ,VirtualDub can use it instead of the internal DV codec ( Microsoft ?) for DV files decompression. I think the results are better than with the internal codec, however Canopus/Grass Valley or Main Concept DV codecs could eventually be superior . Grass Valley as 2 codecs pack -6.02, 14-02-11 (XP,Vista ,Windows 7 ) playback only and Grass Valley codecs pack 7.31.2939( windows 7, windows 8/8.1) all of them including among others DV codecs. I´m tempted to test it but I have not done it so far. Main Concept as a paid version but I think it comes also included in Premiere Pro. Any idea if Grass Valley DV codec will be the right choice for DV codec or could it be Cedocida or this is not an issue that should be given importance? 2. I´m using QTGMC deinterlace now and I’m completely convinced, however I´m still experimenting some complementary functionalities. For PC playback as it was suggested, not using the SelectEven (initially experience) to get a 50 fps file bring advantages avoiding judder and motion problems. However there are other parameters related to motion analysis, Sharpness, denoising , etc that for now I’m still not aware if I must use them or not.Should I include some of this parameters in the script ? 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. 4. Saving to MP4 (version for pc playback) – which are considered good parameters for encoding quality MPEG-4? 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? 6. Related to my problems associated with losses control and namely for the DVD/Blu-Ray version (I am not to worried if a Blu-Ray or up-scaling proves not interesting for SD footage –that where ideas to discuss and see if they were viable) what will be the better applications workflow. Virtualdub (DV decompression and filtering)-NLE editor- Encoder-Authoring getting the most specialized application for any and each job, but eventually increasing losses and conversions or for instance using a more generalist application like TMPGEnc Authoring works 5 or even Premiere? Are there any rules to try to limit colorspace conversions and formats ? Or no need to be worried and use what application I want as the eventual losses and conversions are minimal and not noticeable. |
2 Attachment(s)
Oh,my. So many questions in one post. I can get to some of them later. I'll say right away, however:
Don't be misled into thinking that Adobe gives you the genuine, full-fledged MainConcept encoder. It's more of a dumbed-down somewhat crippled version, very similar to that in Vegas Pro. That doesn't mean it's garbage. But there are free encoders and TMPGEnc's product line giving MPEG/h264 results that are as good or better. VirtualDub DeShaker: not too difficult to use after your first try, but it does soften a bit and you'll have to crop off parts of your image on all 4 sides and then resize (another quality hit if done in Virtualdub), or crop off parts and apply border masks to maintain proper frame size. Before I close up for the night and try to tackle your catalog of questions, I should post these 720p versions of your original .avi posts. By deinterlacing and keeping all frames, you could get decent AVCHD or BD or PC playback by resizing to 960x720 and adding 160 pixels to each side to get 1280x720. Of course, this plays at 16:9/50fps with a 4:3image inside the frame. On the other hand, on a 16x9 display the 1440x1080 bigger 4:3 version plays with side pillars anyway. The dark Sample2 was a real horror. There's nothing "down there" except darkness. Trying to pull up some tiny details also dredges up a ton of noise. Getting rid of the noise endangers whatever detail one can find. For the two 720p mp4's attached I used Avisynth, which offered the 16-bit dithering and contrast masking needed for the underexposed video. The daylight scene is also tricky, because the camera's Autogain continually changed luminance levels, and because line and edge flutter are rather prominent. I used an Avisynth line smoother, but anything stronger would have softened the image too much. I felt that your modified Sample2, while a thorough job of denoising, had an uncomfortably stretched contrast range. Some added-in controlled noise would have given a more natural look. The only VirtualDub filters I used here were CamcorderColorDenoise and ColorMill (only for the dark Sample2). To control levels, gamma, etc., I worked in YUV in Avisynth. If one waits until conversion to RGB to work with levels and contrast, it's too late to avoid clipping and crushing. Your Sample2 has crushed darks and clipped brights, some of it originating in the camera, but not all of it. Colorspace conversion: it's best to avoid it altogether, but that's usually impractical. General Rule #2 is to start working in the original colorspace until you can do no more inside that matrix, then move to the next colorspace and do the same, but don't go randomly back and forth. I use Avisynth and sometimes the dither plugin package for colorspace conversion when possible. Colorspace methods differ for interlaced, progressive, and other factors, as well as for SD and HD. Avisynth has plenty of commands for handling conversions. Although I use RGB filterts in VDub for various reasons (usually color), I save VDub's output to YV12 for encoding unless I have other work to do. Back later. |
3 Attachment(s)
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:
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): http://www.digitalfaq.com/forum/atta...1&d=1435956531 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 http://www.digitalfaq.com/forum/atta...1&d=1435956645 Sample2_720: http://www.digitalfaq.com/forum/atta...1&d=1435956709 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:
Quote:
|
1 Attachment(s)
Thank you so much Sanlyn
I made an H264/AVI test file ( for PC playback) with the day light sample1 that to my eyes doesn’t seem too bad, however it got a bit rate of 46.5 Mbps I have to do it with 15Mbps or so . It is perhaps a little to over sharpened but I tend to prefer images with more contrast , more saturation and more sharpened .I tested it in a large high definition TV set ( Pc connected through HDMI ) and it seems ok and better than the original DV file more particularly in what definition / detail is concerned. I think I can still improve the results somewhat particularly with some of the statements / recommendations included in your recent answers that I’m going to test . I used a similar QTGMC script slightly modified AviSource("c:\sample1.avi") QTGMC( Preset="Slower",TR2=2 ) and after used the virtualdub filters already indicated by me ( I don’t have yet changed filter order to avoid denoise and other cleanup after sharpening) One unrelated question , can I make a DL DVD instead of a normal DVD with TMPGenc or TMPGEnc Video Mastering Works 5 with a higher bit rate more than 15 Mbps. If possible and DVD players accept it ( perhaps not ) could it give a significant increase in quality ? |
You can use any MPEG2 encoder to encode for DL-DVD disc. TMPGEnc Mastering Works will, I believe, set it with basic authoring and organize it for DL disc. I use TMPGenc Authoring Works for authoring and burning.
The maximum bitrate that is valid for DVD is 9300. The maximum GOP size for PAL DVD is 18 frames. Audio must be 48Khz, not 44KHz as with DV. Most MPEG encoders can manage those settings. |
2 Attachment(s)
4:2:2... will presumably be able to pass the ball only in the PC, in the TV this will not go
See picture 1 With Mpeg2 and high bit rates, Intra DC Precision on 10 put Max bit advises =9800 kbps [incl. audio and subtitle] Standard GOP [PAL] M=3 / N=12 NTSC N=3 / M=15 If mpeg2 on DVD always all GOP close. See picture 2 |
Thanks for the info Goldwingfaher
Well the 4.2.2 was only an experience probably not adding value and only incrementing the bit rate and file size. However the TV set did not complain, and the perceived quality was good, but I agree if I have it done in 4.2.0 the perceived quality would probably be equal. The sample is only one of many tests I have done to try to identify the best format for pc playback ( and best parameters for encoding ) and which of them MP4 / H264 will be better for the purpose . |
4 Attachment(s)
There is no "best" encoding format for PC playback, other than encoding everything as progressive (which usually results in larger files than interlaced video). Because your preference is for oversaturation and oversharpening artifacts, as well as a contrast range beyond the limits of most common formats, almost all encoders will use more bitrate to define those elements in a video and will clip over-brights and crushed darks. Oversaturation, oversharpening, motion, and larger frames have higher bitrate requirements, and more bitrate has higher CPU requirements. h264 tends to over filter, so that would be the choice to give you the plastic look you prefer. h264 is commonly used for BluRay/AVCHD formats, and for mp4 and mkv containers. Many factors are involved, so you will have to make your own choice.
Officially BluRay, AVCHD, and MPEG have GOP, bitrate, buffer size, and other limits specific to those formats. mp4 and mkv are less strict, but not without certain limits. Sloppy encoding can result in problems such as bitrate spikes that cause stutter and freezing, etc., and excessive contrast can cause monitor "flashing", flutter and other problems. BluRay and AVCHD requirements for MPEG and h264 are designed to provide stable playback on PCs and as well as Tvs, so observing the standard limits can help with those formats as well as mp4 and mkv. For h264 encoding: http://forum.doom9.org/showthread.php?t=154533 If you resize or crop video, be aware of restrictions concerning colorspace, frame structure, and elements. http://avisynth.nl/index.php/Crop. Video frames must be at least mod-8 in all dimensions. The color matrix for standard definition video is Rec601, for HD it's Rec709. Many encoders will correct the matrix for you, some will not. Attached are four mp4 samples using DeShaker. Two samples show how DeShaker has changed borders to do its work of deshaking and leveling. These samples show how the 4 borders move if uncorrected. Note especially the side and bottom borders, which change during play. The "Fix" samples show borders masked to attain stable borders and the correct frame size. You can crop and resize if you want but because border corrections are not even, the aspect ratio of the final resized image won't be correct. Sample 1 clip: - Sample1_DeShake_Borders.mp4 = DeShaker correction showing border changes. - Sample1_DeShake_BordersFix.mp4 = DeShaker correction showing borders masked and stable. Sample 2 clip: - Sample2_DeShake_Borders.mp4 = DeShaker correction showing border changes. - Sample2_DeShake_BordersFix.mp4 = DeShaker correction showing borders masked and stable. You could make DeShaker stronger, but you would lose more of the image. Sample2 gamma has to be raised because much of the video was too dark for DeShaker to read some areas of the image. |
What is the most correct chain position for the DeShaker filter . In the last Position?
|
You mean you haven't tried it yet? LOL! :)
Use DeShaker by itself. I have added a simple mask over the changed borders to illustrate how the image changes after leveling. But most users would save the output, crop away unbalanced borders in Avisynth and use AddBorders() to add border pixels and center the image in the frame, before sending the video to the encoder. |
So as a first, filter with QTGMC or TGMC.
Then material is given as progressive. now change resolution if one needs. Deshaker Addborders () Encode in MP4 |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.