VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    I call again on this fine forum for a little help.

    I have several file formats that must be converted to MPEG-2 and eventually to DvD. I fully understand that, no matter what, it will be a lossy process because MPEG-2 is a lossy codec. There's no avoiding this.

    However, I'd like to do it as lossless as possible, retaining as much of the quality as I can.

    Most file "sources" are: MPEG-1, DivX, Xvid, FLV and others.

    -File size is NOT important - don't care if I need something like 8000kbps+.
    -Encoding speed/method is NOT important - will encode overnight if I have to.
    -Free software is NOT important - will PAY for one that is very good.

    So without these barriers, and even ignoring any audio issues, the only important thing is purely the highest quality preservation at any cost, whether that "cost" is bitrate, time or even money for software.

    Two questions:
    How can this be done as good as can be?
    Any software apps you want to recommend?

    One method I'm thinking about:
    Encoding to near max DvD at 9000kbps with CBR. Good? Bad? (I figure since I'm near the DvD ceiling, CBR or VBR won't matter...)

    Thanks so much in advance and for previous help in other threads.
    I hate VHS. I always did.
    Quote Quote  
  2. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    Converting mpeg-1, divx, xvid, flv etc. to 9000 kbps CBR is quite overdone taking into account the source formats (say quality). If you wan't to pay for it use CCE and encode at 1-pass VBR with a minimum of 5000 and a maximum of 9000 kbps and Q set to 20. I think then you will hardly notice any visible difference between te source and resulted mpeg-2.
    Quote Quote  
  3. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    However, if the target format is mpeg-2 for DVD then you do need to consider other factors.

    The biggest issue you are going to face is not the quality of the encoder - there are plenty of good quality encoders, both free and payware. The problem will be resizing the source material to DVD specification and maintaining quality. Most FLVs are very low resolution - often 320 x 240, whereas Divx/Xvid avi files can be pretty much anything. Resizing up to DVD specification, be it VCD resolution, half D1 or full-D1 is where all the flaws inherent in the source start to become very noticeable. Add to this the different gamma curves of your TV, and even the best encoder in the world is not going to hide the problems.
    Read my blog here.
    Quote Quote  
  4. I agree with guns1inger, the MPEG encoder is the least of you worries. More important will be resizing algorithms, frame rate conversion, colorspace conversions, deblocking methods, etc.
    Quote Quote  
  5. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    And, you can't really hit them all with the same degree of filtering and resizing. Otherwise, imagine how easy this stuff would be

    I suppose you could try the DeeMon VideoEnhancer package with some VirtualDub Plugins, in particular the MSU Deblockers. There are some HQ filters made by a russian guy, can't recall the names. I'll edit this when I do.


    Upres and Deblock and Filter ---> Lossless AVI (Huffyuv) ---> Change FrameRate and Enhance --> Encode
    ---------------DeeMon VE-----------> AVI--------------------------> Avisynth------------------------------> HC or CCE


    A really easy way would be using TmpgencXpress 4 . It isn't bad at all, although the filters aren't as great as the ones found it Avisynth. Still, it'll save you some hassle.
    Quote Quote  
  6. Member
    Join Date
    Jan 2007
    Location
    NJ, United States
    Search Comp PM
    Soopafresh, could you give a little more detail? I would like to try your method. Thanx.
    Quote Quote  
  7. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Caveat - This procedure is slowwwwww. Motion compensated upsizing and denosing requires a lot of processing power. Don't even consider it unless you have a fast system (well, you can, but break out the calendar to time it)

    -Download VideoEnhancer from http://www.thedeemon.com/ (interesting articles there as well)

    Example scenario: I have a 320x240 file which should have been 16x9 aspect ratio. I wish to create a 720x400 output file which I'll later letterbox and ultimately encode to Mpeg2.

    -So I'll add some deblocking, then add super resolution to my desired dimensions. Output the file to HuffyUV or Lagarith to be lossless.


    -I've saved the resulting file to MyFile.Avi. The dimensions are 720x400 and the codec used is Huffyuv
    -----------------------------------------------------------------------------------------------------

    -Install Avisynth 2.58

    -Download MVtools plugin http://avisynth.org.ru/mvtools/mvtools-v1.8.4.zip ,unzip, and place dll in Avisynth plugins folder.

    The script would look like this: (save it as MyAvsFile.Avs )



    SetMemoryMax(512)
    Avisource("Myfile.Avi").Killaudio()

    # Add Motion compensated denoising

    Source=last
    backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
    backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
    forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
    forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
    source.MVDegrain2(backward_vec1,forward_vec1,backw ard_vec2,forward_vec2,thSAD=400,idx=1)

    # Letterbox the 720x400 image into 720x480

    AddBorders(0,40,0,40)


    ----------------------------------------------------------------------------------------

    -Load MyAvsFile.Avs into your favorite Mpeg2 encoder and encode as 4x3 Aspect Ratio


    *Notes: Another trick is to supersize the video to huge specs, like 1440x810, add denoising at these dimensions, then resize to NTSC or PAL specs. This will hide some of the artifacts and provide an even better looking final output, but will increase the conversion times by quite a bit.
    Quote Quote  
  8. Bitrate requirements may be entirely different dependent on the source media. Converting a highly optimized Divx may be possible with a surprisingly low bitrate, as leaving out a lot of 'invisible' detail is part of its encoding procedure and MPEG2 will also profit from it.
    Bad sources, with lots of blocks for example, may need high bitrates to re-encode even though their own bitrate is low.
    As it is nearly impossible to guess the right settings by mere visual inspection of the source, I would use a constant quality setting with the MPEG encoder. HCenc can do this perfectly. but you need to manually edit its .ini file instead of using a GUI.

    Cheers
    Quote Quote  
  9. I usually use constant quality encoding too. I pick a quality level I'm comfortable with and let the files come out to whatever size they do. Then I put as much as fits on each DVD. This works very well for 22.5 or 45 minute TV shows.
    Quote Quote  
  10. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    I've revived the thread to comment on how wonderful the advice here as been. Didn't get a chance to thank you guys till I was sure it worked with me.

    I now understand that a "good MPEG-2 encoder" is only a capper to the solution, but in between there's work to be done. I've tried CCE and HCE, both are great, but I decided to stick with TMPGEnc Xpress since it's also great too and I already own it.

    Since this thread, I've learned the importance of working with lossless codecs in between, and I've found Lanczos3 and the MSU filters excellent in the process - they make a world of difference when you compare!

    When it's complicated, I stick with VirtualDub to do this middle work. If it's simple enough, such as no real resize or deblocking necessary, TMPGEnc Xpress handles it all, even HuffYUV encoding, and the final MPEG-2 encoding too whenever I need it.

    My crappy old VCD, etc. stuff from the 90s looks much better now.

    Thanks to all who helped. Hopefully others benefit from this thread too like I did.
    I hate VHS. I always did.
    Quote Quote  
  11. It's always nice when someone writes back about their successes. Congrats!
    Quote Quote  
  12. Member PuzZLeR's Avatar
    Join Date
    Oct 2006
    Location
    Toronto Canada
    Search Comp PM
    I hate VHS. I always did.
    Quote Quote  



Similar Threads

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