1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HD material to SD XviD(looking for higher bitrates)

Discussion in 'DivX / XviD' started by Miami797, Jul 15, 2009.

  1. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    I know people ask "why convert HD to SD if you have an HDTV?" Because I have a SD XviD player (philips dvp5140) and my wife won't let me hook up my gaming PC to the TV in the bedroom because of heat and noise issues.

    I've been experimenting with trying to make very high quality XviD encodes, but have yet to achieve a bitrate I'm happy with.

    My method for getting good looking xvid's on my HDTV has been to set the resolution to 720x576 and use AR resize to get the proper DAR.

    I've used plenty of encoders and guis. Nothing seems to get the bitrates I'm looking for(3000+kbps). I've been using MEncode with a few different GUI's, but the highest bitrates I've been able to consistently get are about 1500kbps, sometimes I'm lucky enough to get 2100 (which is wierd since I'll get that with a source that had a lower bitrate than the sources I've been getting 1500kbps encodes at.)

    I used to use super for encoding things to my mp3 player, but that gives you no real control over the Kbps. The documentation for super even says that the kbps control that they give you sucks, and 90% of the time it's way off.

    I've used AutoGK, which is nice, but it doesn't have anamorphic ability.

    I've used handbrake, which has loose anamorphic, but that only let's you set the width and not the height. I find this to be like the resize setting of AutoGK. I was under the impression that Handbrake had the ability to do a better job with anamorphic, so I was disappointed to say the least.

    I have tried MEgui, but I get so many argument errors it's not even funny. I'll figure out how to fix one thing, and then another error comes up. I would really like to figure out how to use MEgui, or even write my own avs scripts, but the documentation out there is a pain to figure out. The other issue I have with it is that at the end of the day I wind up with 50 new programs I need to download and figure out how to use, and I still can't get anywhere with it.

    My favorite thing so far has been MEwig. It seems to give me the most control, it's simple, and I love MEncoder. I just still can't get the bitrates I'm after.

    I've been using 720p sources (h.246 encodes@about 4000-6000kbs), so is my problem that I should be using better sources, something like 1080p with extremely high bitrates?

    I probably should just stick to dvds using progressive scan, but I'm thinking that if xvid is more efficient than mpeg-2, than xvid at the same resolution as a DVD with a DVD like bitrate, should be able to look better than the DVD. On the other hand I'm thinking that the dvd was probably made from much better source material than most HD material anyway, so it's probably a fruitless effort on my behalf.

    I'll probably waste a lot of time trying to do something that can't be done, but I'm determined to try.

    I would go into more detail about the settings I'm using for my encodes, but my laptop is about to die. I'll get to my desktop so i can proof read this and see if I can add anything to make more sense for you guys.

    Thanks ahead for any replies.
     
    Last edited: Jul 15, 2009
  2. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    Use Virtualdub. I did a test, used a good quality 720p.
    Set the divx encoder to Q=1 @720*576 and got a bit rate
    of approx 4000 kbps.

    What program do you use to reset the aspect ratio, and does
    your Philips player honor the A/R info ?

    Most players do not.
     
  3. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    I'll give virtualdub a try. I think I still have it on my computer from when I used to use it before.

    You can use most programs to set the AR. Depending on the program though you mind up with different things. This comes down to knowing the difference of SAR,PAR,and DAR. Some programs make it more confusing since they have things labeled wrong.

    Super, MEwig, and AutoMen (which is another decent GUI) will make your AR settings an anamorphic flag for your player. Handbrake and AutoGK will just let you input the width and automatically create the height to match the AR of the original file, so you just wind up with a lower resolution image that has a lower bitrate compared to Super.

    For instance, let's say I have a 1280x720(16:9)source. In Super(or MEwig) I set change the output resolution to 720x576, then set the AR flag to 16:9 and I wind up with a 720x576 16:9 anamorphic file(just like on a DVD). It's actually more of an DAR(display aspect ratio) than an AR.

    With handbrake all I can do is start with that 1280x720 source. Then you can only enter the width of 720 and it automatically makes the height to something like 404 or 400. 720x404 is 16:9, and it will stretch across my 16:9 tv, but it's alot of space your losing to store the picture information, which it still has to stretch anyway to fit your screen. This is good for people who want to make 700mb rips of dvds, but I'm not worried about making a small file. You'll notice with this method your bitrates will be much lower than with the other method, and the stretch image won't look as good on a larger screen.

    You can set handbrake to make a 720x576 resolution, but then when you watch it on your 16:9 tv it's not going to fit right since it won't have a flag to tell your player that it needs to stretch it to 16:9.

    Sorry if that was a lot of info, but I think that's along the lines of what you were asking.

    About the philips. Yes it does notice the 16:9 flag, and it does it very well, especially for the $40 the player cost me at target about 2 years ago. The other great thing about this player is that you can turn off the region codes. That is how I'm able to use 720x576 rather than just 720x480.
     
  4. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    Thanks for the info - I've a Samsung HD841 from 3 or 4 years ago.
    Divx/region free. Works great, but I'm pretty sure it does
    not honor any of the aspect ratio flags. Perhaps I'll test it again.

    Good to hear about the Philips. I'd heard it was a good player.

    The reason I mention Vdub is because you have complete manual
    control.. Sometimes, it's the only way to do things.
     
  5. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    I'm messing with VDub at the moment.

    I'm still only getting 1100+ bitrates so far. Maybe because I'm using a h.264 source that only has a 4000kbps rate.

    I can't get the aspect ratios to work yet. I see a place to mess with that on a filter and in the compression setting.

    So far I get a video that is 720x576 that has a little higher bitrate that i was getting with other programs, but VLC doesn't see the flag. If I open it in GSpot it shows the SAR as 2.4, which is correct, so I'll have to test that one on my standalone to see if that recognizes the flag. I doubt it will if VLC can't, but you never know.

    The rest of my attempts get resized down to 720x300 or 1380x576 depending if I use letterbox or crop. The source file is 1280x528, so those numbers make sense, but it's not 720x576 with the 12:5 AR flag that I need.

    I have a lot of reading to do to figure out vdub, but i'll give it a shot. It's been so long since I've used it, and when I did it was fo something totally different than trying to make high quality xvids.

    Thanks for pointing me in the right direction.
     
  6. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    Not too much, just a few basics.
    If you get into the xvid or divx configurations screens
    (virtualdub/video/compression) you can set the bitrate
    explicitly, or as I did choose a quantizer of 1 and start from there.

    Another thing, my Samsung has problems and starts to stutter if the
    bitrate gets too high. Can the Philips handle 3000 kbps ?
     
  7. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    I used VDub Mod and came out with great results. It's the same thing as VirtualDub, but the GUI is a bit more strait forward for what I have to do.

    If I use 2 pass encoding I hit a wall at 2018 kbps no matter how high I set the target bitrate.

    Single pass with a weight/quantizer of 1 I got a 7488kbps, and when I adjusted the weight/quantizer to 2 I got 4850 kbps.

    My player plays the 4850 and 7488 bitrates, but some scenes are slow motion. I'll have to do some tests and find the sweet spot. It's probably somewhere between 3000 and 4000kbps.

    With VDubMod it's really simple to make the flags work with my player. I couldn't get them to work with using the regular VDub, not even VLC player would notice them. With VLC player I could manually set the AR so that it would look right, but I don't have that option with my standalone. Maybe you should give VDub Mod a shot to see if they'll work with your samsung.

    Just use the resize filter to set it to 720x576, and then in your compression settings you keep the PAR the same as your source(1:1) and then set the DAR to whatever you need (12:5 in my case since it was a 1280x528 source).

    On my computer the image is much nicer than through my standalone though. Looks almost about the same as a dvd and a little bit worse than the HD source. On the standalone you can tell that it's still XviD, high quality, but still an XviD. I'll have to play around with the filter mode(bicubic, etc.) for the resize and see if that improves anything.

    Thanks again for your input.

     
    Last edited: Jul 16, 2009
  8. MysticE

    MysticE Active member

    Joined:
    Nov 15, 2003
    Messages:
    2,787
    Likes Received:
    0
    Trophy Points:
    66
    Never heard of such a thing. Can't really understand the logic.

    FWIW I use this app to make some nice conversions. Lots of options.

    http://www.winnydows.com/page.php?2
     
  9. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    Which logic don't you get, handbrakes or mine?

    Handbrakes isn't a true 16:9 since it's actually a 1.78 AR instead of 1.77. To be a true 16:9 it would have to be something like 720x405, but that isn't what comes out of handbrake for me.

    Either way, none of those would be mod16. It would have to be 720x400 to be mod16, but that's still 1.78 and not 1.77.

    This is what is annoying about handbrake. If they made it where you could actually set both the H and the W and still have it be anamorphic it would be great. Maybe that's just asking too much though.

    If it's my logic you don't understand, what I'm getting at is that it's better(for me atleast) to use the highest resolution possible, and have it use a anamorphic stretch to fit my screen, rather than encode to a resolution that is a correct AR and just stretching across my screen. The image won't hold as much information this way. It's the same reason that DVD's that are "enhanced for 16:9" have a resolution of 720x576(or 480) with anamorphic AR to fit your screen. That's why they usually look better a 16:9 screen than just a widescreen DVD that has the bars encoded onto the picture to fit a widescreen DVD onto a 4:3 tv. Yeah, your DVD player can be set to 16:9 and cut out the bars, but it's still not utilizing the total resolution that the dvd allows.

    I'll check out that app.

    Thanks.

    UPDATED: I did soom investigating and it sounds like people are getting different outcomes with handbrake. Some are getting 400 and some 404. I would think the 400 is better since it's mod16, but the people who are getting encodes with 400 are getting SAR with 1.78 instead of 1.77, so it's still messed up. Either way, it's still not anamorphic, it's just matching the encode to the original AR.
     
    Last edited: Jul 16, 2009
  10. MysticE

    MysticE Active member

    Joined:
    Nov 15, 2003
    Messages:
    2,787
    Likes Received:
    0
    Trophy Points:
    66
    Confused again, round off 16:9 to two decimal points and it is 1.78. And what possible difference can there be between 1.77 vs. 1.78 anyway?
     
  11. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    I guess the only difference is that it's not the true AR. To be a true 16:9 it has to be 720x405. The only problem with that is that it's not mod16, so that's why it probably goes to 720x400.

    It may only be one one-hundredth, but when you're talking about film and math you're sometimes dealing with people who usually won't settle for that small of a difference.

    That's just another why I'd rather do things anarmophic than deal with trying to match the SAR to the AR of the film, and then factor in mod16.
     
    Last edited: Jul 16, 2009
  12. MysticE

    MysticE Active member

    Joined:
    Nov 15, 2003
    Messages:
    2,787
    Likes Received:
    0
    Trophy Points:
    66
    You math is flawed. True 16:9 is not 1.77. You are making a rounding error. If you want some sort of exact accuracy you should at least go to 3 decimal points, 1.777. The difference then is 3 thousandths. I'm sure your $40 player's geometry is off by at least that much as is the TV you are watching it on.
     
  13. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    It's actually an infinite decimal.

    I understand that 1.77 and 1.78 are 16:9, but handbrake didn't give me either of those. It spit out 720x400 (1.8), which is almost a whole different AR at 1.85:1. I could see if the 400 was in place to comply with mod16, but I still wasn't getting a 16:9 DAR with it. GSpot didn't see the flag, and when you opened two instances of VLC to play the video side by side with the original, you could tell it didn't match, especially when you stretch the 720x400 to match the source.

    My $40 player plays 720x576 anamorphic videos at a higher quality than it plays a 720x400,404,or 405 video anyways. That's why I asked about making an anamorphic 720x576 in the first place.

    And my math isn't flawed, maybe my stubbornness for numbers is. What definitely is flawed is using something like handbrake to do a proper job at anamorphic. Even more flawed than that is having a HTPC with BluRay and HD tuner that my wife won't let me have in the bedroom with the HDTV.
     
    Last edited: Jul 18, 2009
  14. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    Have you tried using a DVD instead of a CD. With a CD I was maxing about 3000kbps with a file that had no audio. I tried a DVD tonight and it played 6000kbps with the full 640hrz 5.1 surround sound. I forget what the max bitrate is for a CD, but it's no where near a DVD.

    Thanks for the heads up on VDub for xvid.

    I'm doing single pass with a quantizer of 1 and streaming the full audio from a 1080p source. High Quality XviD to say the least.

     
  15. dark2samu

    dark2samu Member

    Joined:
    Nov 10, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    11
    ive been trying to convert HD vids that are in mp4 and mkv format to avi and everytime no matter what converter i use the video and sound are not in sync
    like im converting a HD video to avi
    its done then i play it and the sound is five second behind the video and never catches up
    can anyone help me on this
     
  16. davexnet

    davexnet Active member

    Joined:
    Jul 7, 2003
    Messages:
    1,896
    Likes Received:
    0
    Trophy Points:
    66
    This sync problem comes up almost everyday on this forum.

    One approach is to open the avi in Virtualdub. Set video and audio
    to direct stream copy, and adjust the audio offset from the audio/
    interleaving screen.

    Save it as a new avi.
     
  17. Miami797

    Miami797 Member

    Joined:
    Apr 26, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    11
    dark2samu: Use virtualdubmod.

    There are a few ways you can go about it. You can open the mkv directly in virtual dub, you can make an avisynth script to open the mkv in virtual dub, or you can extract the sound and video from the mkv before hand and open it in virtualdubmod.

    When you extract the sound and video before hand you'll have to use something like avc2avi to rename the h264 to an avi. A lot of people swear by this, but I've had issues in the past with the avi index.

    What I would recommend is making the avisynth script.

    Once you have the mkv open in virtual dub you can save the the audio as a wav, convert the wav to mp3 outside of virtual dub(I use super for my mp3 conversions), then stream the mp3 back into your video.

    If you have never used virtualdub, it's easier than it first looks. When you have your video open in virtualdub, go to the Streams menu, then select Streams List. Highlight the Audio track that you want to use for your avi and press the Save WAV button. It should save the wav into the original folder as your mkv source.

    After your audio is converted to mp3, you go back to the Streams List in virtualdubmod and disable the original audio track(s). Then press the Add button and select your new mp3 audio track. When the MP3 is on the streams list you can see the time length of the track, take note of that time. You want to find the difference in time between your audio track and your video.

    After you have find the difference is time you have to right click on your audio track and select the "interleaving" option. When the interleaving window opens you can leave the default values in place. The only one you're worried about is "Audio Skew Correction" Where it says "delay audio track by ___ ms" you will put the difference in length of time between your audio and your video. Depending on which is longer you will use a positive number or a negative number.

    If you want to see if you got it right you can just preview it on virtualdubmod before you encode the movie. If it's still our of sync then most likely you're using a positive when it should be a negative, or vice versa. If it's not that then you're math is off when you're trying to figure out the difference in time of the audio and video.
     
    Last edited: Aug 11, 2009

Share This Page