VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Source: DV from my Sony TRV-9, captured with WinDV
    Destination: deinterlaced H.264 video file with aac audio

    After spending considerable time on this subject, I've found a great solution that produces "small" (about eight percent of the original) video files with excellent quality. The only negative is the time it takes to encode, but that is not an issue with me. On a quad-core at 2.33 GHz, encodes take about 16 hours per hour of DV source. I've got 45 hours of source video to convert in my leisure time.

    Basically, I followed this guide for upscaling SD to HD, but left out the upscaling part;

    http://www.dvinfo.net/conf/992266-post14.html

    After digesting that, I ended up with an AVISynth scripts look like this;

    SetMTmode(2,0)
    AVISource("DV28.01-06-22_01-08.17.avi", audio=FALSE)
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\removegrainsse3.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\repairsse3.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\nnedi.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-26.dll")
    Import("C:\Program Files\AviSynth 2.5\plugins\tempgaussmc_beta1.avs")
    ConvertToYV12(interlaced=true)
    AssumeBFF()
    TempGaussMC_Beta1(EdiMode="NNEDI")
    SelectEven() # bc the interlacer doubles the framerate
    Lanczos4Resize(720,528,0,5,720,469)

    I'm feeding it to MEGUI and using the Unconstrained-2pass-HQ profile and 2000kbps. My movies are 720x528, square pixels.

    Hope this can help someone looking for the same thing. I stumbled on it by accident.
    Quote Quote  
  2. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    Cool, I was wondering if my post was OK, thanks for clarifying.
    Quote Quote  
  3. Member
    Join Date
    Apr 2009
    Location
    Belgium
    Search Comp PM
    Originally Posted by bpoe
    ... On a quad-core at 2.33 GHz, encodes take about 16 hours per hour of DV source....
    16times looks for me terrible slow.
    I am converting dv-avi to MP4 (+aac) with an average of 5times on my 'old' pc (P4 of 2004). So 10 minutes of video gives 50 minutes of encoding.
    I do this with the following setup:

    DirectShowSource("clip.avi")
    TDeint(mode=2) #Deinterlaces the clip
    Spline36Resize(544,306) #Resize the clip

    Why are you using all these filterings (dll),...?
    Quote Quote  
  4. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    The TempGaussMC_beta1 script requires those other plugins. The filtering it does helps with low-light scenes in minimizing noise, but overall, it seems well known that the TempGaussMC_beta1 script produces nice/rich output. I've done lots of comparisons with other methods/deinterlacers/etc, and I have to agree.
    Quote Quote  
  5. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    You need to remove noise, both in-frame and temporally, for quality H.264 work. Otherwise it looks like crap. You also need to do a proper deinterlace, not some nasty half-assed drop-frame method.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  6. Member
    Join Date
    Aug 2002
    Location
    Sweden
    Search PM
    How can you say that lordsmurf? TempGuassMC_beta1 seems to be one of the better deinterlaces available. See this post:
    https://forum.videohelp.com/topic354397-30.html#1877202
    It use motion compensation and it looks good to me. But this deinterlacer is really slow and thsat is why the encoding is so slow. I might be worth rendering it to lossless format like lagarith before doing the 2-pass encoding.

    I would not consider this to bee a "nasty half-assed drop-frame method". Of course it would be better to keep the double frame rate but since the destination in this case is deinterlaced h.264 with small video size I think it may be acceptable to drop the framerate from 60 fps to 30 fps (NTSC) or 50 fps to 25 fps (PAL). And the script does include denoising also.
    Quote Quote  
  7. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    The 16 hours can easily be reduced to under 10 using CRF. And why even limit yourself to 2000kbps when the video can look so much better with a bit more bitrate, or just as good with so much less bitrate depending on the source? Inefficient encoding.

    As well, I hope you're archiving this, maybe precious and unrecoverable, DV source. You are going to lose alot of quality with this method and have severly hurt your high quality options for other playback options in the future.
    Originally Posted by lordsmurf
    You need to remove noise, both in-frame and temporally, for quality H.264 work. Otherwise it looks like crap.
    Can I get you to clarify this? All my low-bitrate x264 encodes, although "watchable", look like crap on a big screen TV so I gave up on it. Yeah, I can increase the bitrate of x264 encodes, but at that level, for high quality, there are better options.

    Still interested in trying something new for low bitrates, or even to be proven wrong of my belief that x264 is worthless other than for mobiles or Internet distribution.
    I hate VHS. I always did.
    Quote Quote  
  8. Originally Posted by PuzZLeR
    All my low-bitrate x264 encodes, although "watchable", look like crap on a big screen TV so I gave up on it. Yeah, I can increase the bitrate of x264 encodes, but at that level, for high quality, there are better options.
    Like what? Can you share your "better" options? Your statement implies that there is something out there that provides better compression i.e. more efficient

    Originally Posted by PuzZLeR
    Still interested in trying something new for low bitrates, or even to be proven wrong of my belief that x264 is worthless other than for mobiles or Internet distribution.
    Not sure what you mean? If you "shrink" a blu-ray source, what format gives you the best quality, best detail & grain retention at a given bitrate? In my tests - and tests done many others - videos encoded by x264 by far.
    Quote Quote  
  9. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    Hey Poison,

    I meant to answer in that other thread, but it was on VP7 and I didn’t want to hijack it. Was going to answer it, but well, then it got old. :P Nevertheless my friend, you deserve an answer.
    Originally Posted by poisondeathray
    Originally Posted by PuzZLeR
    All my low-bitrate x264 encodes, although "watchable", look like crap on a big screen TV so I gave up on it. Yeah, I can increase the bitrate of x264 encodes, but at that level, for high quality, there are better options.
    Like what? Can you share your "better" options? Your statement implies that there is something out there that provides better compression i.e. more efficient
    Well, it’s not so straight-forward.

    Assuming SD, among compressed formats with bitrates under 1000kbps-1500kbps there is no other that can beat x264. It totally rules the world here. No argument.

    But all it really produces at this level for most sources is something “watchable”, and "watchable" is not synonymous with "high quality". Although better compression, it's still blurry, smeary and looks hideous on the big screen.

    And the compression advantage of x264 is not so linear - quality benefits fade quickly with respect to bitrate compared to other formats, even to the point where it starts to dip below them in the curve.

    For "high quality" video you need to raise the bitrate for x264 (like any other lossy format). This invites other, and (much) better, options.

    At "realistic" bitrates of 3000kbps-5000kbps I get much better encodes with MPEG-2 using CCE (as well as with DivX/Xvid) and they look very nice on the big screen - with the same source/script. But the blur/smear stuff is still there, albeit in a somewhat lesser form, with x264. It never really goes away until mega bitrates like 6000kbps and more.
    Originally Posted by poisondeathray
    Originally Posted by PuzZLeR
    Still interested in trying something new for low bitrates, or even to be proven wrong of my belief that x264 is worthless other than for mobiles or Internet distribution.
    Not sure what you mean? If you "shrink" a blu-ray source, what format gives you the best quality, best detail & grain retention at a given bitrate? In my tests - and tests done many others - videos encoded by x264 by far.
    If you want very low bitrates, again, x264 is King here. But if you want something more professional looking than a “blurry”, or “smeary” video you’d settle with, then you need to raise the bitrate, and that invites, again, other better options once more like DivX, Xvid and MPEG-2 (such as with a good MPEG-2 HD encoder like TMPGEnc, etc.).

    Yeah, I know about the AQ thing optmized over Haali's previous patch, the negative alpha/beta thing and other artificial complexities, but all they do is balloon the bitrate, defeating any purpose of using x264 in the first place.

    I feel that x264’s secret is a “smart blur” subroutine somewhere optimized for low bitrate encoding and due to the fact that it takes forever to encode, does not play on DvD, and a pain to edit, and worse than others at high bitrates, I can’t help but come to the conclusion that other than mobiles and online distribution it’s completely usesless when it comes to high quality formats.

    The “Big Show” in my opinion, which is what I want, is the big screen, not with mobiles, or “distributed” Internet content. This is why I dropped x264.
    I hate VHS. I always did.
    Quote Quote  
  10. (I apologize for the thread hijack, this was on DV originally...)

    Puzzler - I have to disagree, unless you were referring to interlaced content; x264 is still in it's infancy in regards to interlaced encoding.

    I am talking about the big screen , progressive, high quality ie. blu-ray. I have to assume you were either using an old build or bad settings in your testing. I suggest you repeat your tests with a high quality blu-ray source, something that has a lot of film grain and detail.

    But if you want something more professional looking than a “blurry”, or “smeary” video you’d settle with, then you need to raise the bitrate, and that invites, again, other better options once more like DivX, Xvid and MPEG-2 (such as with a good MPEG-2 HD encoder like TMPGEnc, etc.).
    I know exactly what you're talking about, historically the oversmoothing was the biggest issue of the older x264 builds and that still plagues other h264 encoders (like mainconcept). While this type of discussion may have been more frequent a few years ago, this is the first time I've heard of someone suggesting MPEG2 or XviD provides better quality over a modern x264 build

    The modern x264 builds are a different animal. Even the fine details are preserved at lowish bitrates with x264 (fine film grain). Take 300 the movie for example (an example of "dancing grain"), and do some testing at various bitrates, I bet you will be surpised. Take any high quality blu-ray source and I am certain x264 will do a better job than MPEG2 , VC-1, VP7 or another other format at the same - and usually a much lower bitrate. And I mean in terms of retaining the detail and grain - something h.264 encoders have historically failed at.

    The visual quality advantage of x264 isn't just subjective or my lonesome opinion - look at the PSNR and SSIM objective testing: the MPEG2 numbers don't even come close! The results by x264 are visually lossless at a much lower bitrate than MPEG2 for any source, frame size, etc.

    For all types of content, MPEG2 usually requires 1.4-1.5x the bitrate to look equivalent to the x264 encode, and not just at lowish ~1Mbps bitrate scenarios or SD scenarios. This relationship extends well into the 1080p HD / blu-ray quality area. I realize the relationship isn't linear, but on some material, MPEG2 never reaches transparency to the source even at unlimited bitrates! (Take the classic Touhou lossless footage, for example)

    I feel that x264’s secret is a “smart blur” subroutine somewhere optimized for low bitrate encoding and due to the fact that it takes forever to encode, does not play on DvD, and a pain to edit, and worse than others at high bitrates, I can’t help but come to the conclusion that other than mobiles and online distribution it’s completely usesless when it comes to high quality formats.
    I agree with the long time to encode and pains to edit, but in terms of quality x264 is unmatched at equivalent bitrates. It provides better compression => this implies better quality at the same bitrate, or similar quality at a lower bitrate. I have yet to see 1 example where MPEG2 reaches transparency to the source earlier (ie. at a lower bitrate) than x264. If you have 1 example, please post it.
    Quote Quote  
  11. Member
    Join Date
    Apr 2009
    Location
    United States
    Search Comp PM
    puzzler said: >As well, I hope you're archiving this, maybe precious and unrecoverable, DV source. You are going to lose alot of quality with this method and have severly hurt your high quality options for other playback options in the future.

    I have seen the results - while its not the quality of the DV source, the quality IS excellent and "close" to the original. I do study the output frames and compare to original frames, and analyze motion. That is my whole point in my original post, this produces excellent quality video from DV source. I've done trials that show I could increase the bitrate and get marginal improvements, but the 2k is fine. I'm archiving the DV originals.

    As for the 16 hours, yes i could cut it down by first encoding to uncompressed and then do the 2-pass h.264 (i've done it), its just more convenient to point MEGUI at the .avs and que-up a 2pass and come back the next day.
    Quote Quote  
  12. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by ronnylov
    How can you say that lordsmurf?
    My comment was in reference to the post by laurentje.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  13. Member
    Join Date
    Apr 2009
    Location
    Belgium
    Search Comp PM
    Originally Posted by lordsmurf
    Otherwise it looks like crap. You also need to do a proper deinterlace, not some nasty half-assed drop-frame method.
    All depends what the definition is of 'crap'. I have made several tests with all kind of filtering and it is sometimes hard to see the quality difference with or without all those filters (at low resolution 400x300). And then of course you have to spill 16 h for 1 h of video.
    The resolution is very important, but perhaps we are on off-subject.

    Deint(mode=2) is that a "some half-assed drop-frame method"? I was not aware of.
    Quote Quote  
  14. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Crap = noise not related to the image, such as blocks and artifacts.

    Please spare me the "my definition" baloney. There are people that find scat porn erotic, but 99.9% of the world would also consider that unacceptable garbage. The 0.1% (or less) that define it as acceptable should be wholly ignored.

    Noise is noise, at any resolution.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  15. Member
    Join Date
    Apr 2009
    Location
    Belgium
    Search Comp PM
    Originally Posted by lordsmurf
    ...Noise is noise, at any resolution...
    Yes, but if there is no noise, then those filtering is not necessary. All this filtering costs a lot of time and money...
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!