VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. I'm trying to rip a widescreen DVD to an Xvid/AC3 file with mencoder. However, the resulting file doesn't seem to be playing in 16:9 in anything but mplayer (like QuickTime, VLC, or DivX Player), instead it plays in 4:3 (and not all other applications have the option of changing that).

    For reference, the command I'm using is as follows (using single-pass for testing purposes, since it's quicker):

    mencoder -o test.avi -oac copy -alang en -ovc xvid -xvidencopts bitrate=1234:aspect=16/9 -vf pullup,softskip -ofps 24000/1001 dvd://

    Any ideas what the problem might be here? I'd really like this file to play in 16:9 in any application. If anyone can offer some advice, I'd really appreciate it. Thanks.


    Regards,
    David
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Many software players ignores aspect ratio in avi files. So if you want it to work in all players you need to resize the video.
    Quote Quote  
  3. Originally Posted by Baldrick
    Many software players ignores aspect ratio in avi files. So if you want it to work in all players you need to resize the video.
    Ah, so the DVD itself isn't sized like that, it's just some kind of flag or something that tells a player to "play me at 16:9"? And the avi equivelent of that flag is being ignored? That would make some more of the -v output from mencoder make sense to me.

    What would be the least lossy way to resize the video? Right now I'm testing "scale=854:480" after the -vf flag. Is there a better way?


    Thanks,
    David
    Quote Quote  
  4. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    The standard way is to resize to a 1:1 resolution.

    For instance a Full Screen DVD (720x480 for NTSC or 720x576 for PAL) would get resized to 640x480 whereas a DVD with a 2.35:1 aspect ratio would get resized to 640x272 (with the black cropped out) whereas a DVD with a 1.85:1 aspect ratio would get resized to 640x352 (with the black cropped out) etc.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  5. Originally Posted by FulciLives
    The standard way is to resize to a 1:1 resolution.

    For instance a Full Screen DVD (720x480 for NTSC or 720x576 for PAL) would get resized to 640x480 whereas a DVD with a 2.35:1 aspect ratio would get resized to 640x272 (with the black cropped out) whereas a DVD with a 1.85:1 aspect ratio would get resized to 640x352 (with the black cropped out) etc.
    Interesting. Now, a novice like me would probably say something like "but more resolution is always better, right?" But when we're talking about properly encoding a video, it's all about keeping it as lossless as possible. To that end, do you know of a good reference page that explains what you're telling me, encoding aspect ratios, etc? The Google response has, thus far, been a bit of a needle in a haystack. I've probably found all the information I need, just not in a context in which I'm understanding...
    Quote Quote  
  6. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    A user on this website by the name of DJRumpy wrote the following:

    Determining Aspect Ratios and Resolutions <--- This is a link

    That should help

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  7. Banned
    Join Date
    Nov 2005
    Location
    United States
    Search Comp PM
    Originally Posted by cyber0ne
    Originally Posted by FulciLives
    The standard way is to resize to a 1:1 resolution.

    For instance a Full Screen DVD (720x480 for NTSC or 720x576 for PAL) would get resized to 640x480 whereas a DVD with a 2.35:1 aspect ratio would get resized to 640x272 (with the black cropped out) whereas a DVD with a 1.85:1 aspect ratio would get resized to 640x352 (with the black cropped out) etc.
    Interesting. Now, a novice like me would probably say something like "but more resolution is always better, right?" But when we're talking about properly encoding a video, it's all about keeping it as lossless as possible. To that end, do you know of a good reference page that explains what you're telling me, encoding aspect ratios, etc? The Google response has, thus far, been a bit of a needle in a haystack. I've probably found all the information I need, just not in a context in which I'm understanding...
    first allow me to say that this isn't meant as an insult to either the author of the guide or the guy that provided it, but they don't know what they are talking about.

    first things first, no matter what anyone tells you, never, ever, resize your resolution never crop your video.

    a DVD encoded as 720x480 is 720 pixels across by 480 pixels high and each one of those pixels carries a unique piece of information. when you resize and/or crop, some of those pixels are discarded and once discarded can never be regained.

    as far as 4:3 and 16:9 values are concerned, there seems to be alot of confusion and consequently some bad advice, because few people seem to understand what they mean.

    if a DVD is 720x480 4:3, that means, as above, then each frame, or group of fields (if it's interlaced), is 720 pixels across and 480 pixels high and each one of those pixels 4 times as long for every 3 times high. this is because most tv's use pixels of the same dimensions, thus the DVD is encoded in this way so that the pixels of the DVD and the pixels of the align and the image appears normal.

    if a DVD is 16:9, then each frame, or group of fields (if it's interlaced), is 720 pixels across and 480 pixels high and each one of those pixels 16 times as long for every 9 times high. on tv's that use pixels of these dimensions (sometimes called "widescreen" tv's) the picture fills up the whole screen, if this DVD is played on a tv that uses 4:3 pixels, the image is "letterboxed" so that the entire scene can be viewed.

    a similar process happens on a computer monitor. all computer monitors use pixels that are 1 unit wide for every 1 unit high and thus when people try to view them they see black bars.

    a way around this is by reencoding it to a resolution whose aspect ratio is such that it compensates for either the 4:3 or 16:9 pixel ratio and that's were all this talk of encoding to 640x480, 852x480, 640x272 (<---a truelly stupid resolution to encode to), crop and "wasting bitrate" comes from.

    the fact of the matter is that if you prepare a video following their directions and go play it on a standard tv, having resized it, cropped it and the rest of the crap they advise, the results will look like th back of my ass.

    to the guy that told you to crop the video: when transcode a 720x480 16:9 DVD to another format without cropping out the black parts, you haven't wasted bitrate encoding black bars, those black bars are a consequence of the media player trying to compensate for the discrepency between the originally intended target screen and the one actually being used.

    last piece of advice: don't transcode to avi, go to mp4 (mpeg-4) with AVC and AAC.
    Quote Quote  
  8. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    deadrats hasn't a clue.

    Please ignore this person.

    There is SO much wrong with what he said ... in relation to the original question ... that it isn't even worth my time to repute all that he said point by point as what he said in total is utterly pointless.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  9. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Deadrats = Deadsh*t advice. I have no idea where he came by such absurd information, but it is truly scary in it's inaccuracy and naivety.
    Read my blog here.
    Quote Quote  
  10. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Originally Posted by guns1inger
    Deadrats = Deadsh*t advice. I have no idea where he came by such absurd information, but it is truly scary in it's inaccuracy and naivety.
    I found this thread that really shows what an idiot he is: CLICK HERE

    Read that thread to the bitter end if you want to find out just how clueless deadrats can be.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  11. Banned
    Join Date
    Nov 2005
    Location
    United States
    Search Comp PM
    Originally Posted by guns1inger
    Deadrats = Deadsh*t advice. I have no idea where he came by such absurd information, but it is truly scary in it's inaccuracy and naivety.
    you and Fulci are ********, aren't you? i try to help the guy and you both call me an "idiot" and that my advice is shit? how about the both of you squeeze your heads out of your asses, open up a book and learn something for a change.

    straight from wikipedia:

    http://en.wikipedia.org/wiki/Pixel

    quote: "Pixels can be either rectangular or square. A number called the aspect ratio describes the squareness of a pixel. For example, a 1.25:1 aspect ratio means that each pixel is 1.25 times wider than it is high. Pixels on computer monitors are usually square, but pixels used in digital video have non-square aspect ratios, such as those used in the PAL and NTSC variants of the CCIR 601 digital video standard, and the corresponding anamorphic widescreen formats."

    let's see what the DVD spec allows for:

    http://en.wikipedia.org/wiki/MPEG-2

    quote: "Allowed Aspect ratio (image) (Display AR)

    * 4:3
    * 16:9
    * (2.21:1 is often listed as a valid DVD aspect ratio, but is actually just a 16:9 image with the top and bottom of the frame masked in black)"

    and just one last link on general digital video information:

    http://en.wikipedia.org/wiki/Digital_video

    to the original poster: compare and contrast what i originally wrote with the information i linked to above and then compare what that stupid guide and these two jackasses said and decide for yourself which one of us hasn't a clue.

    You are in breach of the forum rules and are being issued with a formal warning. Please reread our rules.
    / Moderator Baldrick
    Quote Quote  
  12. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Yes, some of your individual points are factually based, but the way you have combined them into "advice" is so far off base.

    Yes, DVD is encoded with non-square pixels. The Pixel aspect Ration varies depending on the Display aspect ratio and the format. So PAL 4:3 is different to NTSC 4:3 is different to PAL 16:9 is different to NTSC 16:9. However when encoding for the PC the correct Pixel Aspect Ratio is 1:1 - different to all TV formats. So the resolution needs to be changed to correct the Pixel Aspect Ratio for 1:1 playback. This is also true when encoding for standalone playback, as the player will adjust for other factors on-the-fly. Some players can also adjust for incorrect PARs, but most cannot.

    When re-encoding for avi, black bars are a waste of bitrate. They should be cropped so the bitrate can be redirected to the image itself, where it is needed. Again, standalone players will adjust and add any letterboxing required. Playback on a PC will simply border the image without letterboxing unless you go to fullscreen, in which case it will add letterboxing on-the-fly.

    I am quite happy for you to follow your own advice. I have no problem with you believing what you have written. People believe a lot of odd things. Yes, you have linked to references that are, for the most part, valid. The problem is that while you have read some stuff, you don't really understand it and how it all hangs together. The only analogy I can think of is that you are like a person who watches a few Steven Seagal movies and thinks they understand Buddhism. But please, don't think you are ready to teach others.
    Read my blog here.
    Quote Quote  
  13. Banned
    Join Date
    Nov 2005
    Location
    United States
    Search Comp PM
    Originally Posted by guns1inger
    Yes, some of your individual points are factually based, but the way you have combined them into "advice" is so far off base.

    Yes, DVD is encoded with non-square pixels. The Pixel aspect Ration varies depending on the Display aspect ratio and the format. So PAL 4:3 is different to NTSC 4:3 is different to PAL 16:9 is different to NTSC 16:9. However when encoding for the PC the correct Pixel Aspect Ratio is 1:1 - different to all TV formats. So the resolution needs to be changed to correct the Pixel Aspect Ratio for 1:1 playback. This is also true when encoding for standalone playback, as the player will adjust for other factors on-the-fly. Some players can also adjust for incorrect PARs, but most cannot.

    When re-encoding for avi, black bars are a waste of bitrate. They should be cropped so the bitrate can be redirected to the image itself, where it is needed. Again, standalone players will adjust and add any letterboxing required. Playback on a PC will simply border the image without letterboxing unless you go to fullscreen, in which case it will add letterboxing on-the-fly.

    I am quite happy for you to follow your own advice. I have no problem with you believing what you have written. People believe a lot of odd things. Yes, you have linked to references that are, for the most part, valid. The problem is that while you have read some stuff, you don't really understand it and how it all hangs together. The only analogy I can think of is that you are like a person who watches a few Steven Seagal movies and thinks they understand Buddhism. But please, don't think you are ready to teach others.
    i always follow my own advice, but just to "educate" an "idiot" like me, answer the following questions for me:

    1) if i have a DVD encoded to 1280x720 progressive, at a bitrate of 15Mb/s and i play it on a tv, and with a dvd player, that supports 720p, how is the resulting image displayed? in other words, will the image fill the entire screen or will it be letterboxed? now how about if you try and play that same mpeg-2 on a pc, using a software based player and a standard LCD monitor, is the resulting image letterboxed or not? why do you think this is?

    2) if you decide to transcode the mpeg-2 to a different HD compliant format without cropping it how do you assume that you are wasting bitrate encoding the black areas, if the original encode as it came from the distributor didn't waste any bitrate on the black areas?

    the thing is that you, and almost everyone that you see in forums like these don't unnderstand one very simple thing: the black areas have no bitrate, they have no pixels, they are the absence of bitrate. it's very easy to test what i have said:

    take any 16:9 DVD you want and transcode just one of the VOB files to either MP4 (with AVC/AAC) or WMV, to a format that supports 16:9. do it twice, the first time crop the black areas out, the second time don't crop the black areas out and use the exact same bitrate for each encode (say 2Mb/s), then do a frame by frame comparison of the two encodes and tell me if you see a difference.

    lastly, i strongly urge you, and the rest of the participants in this thread, to learn how to read source code and analyse the source for mplayer, VLC and any other open source encoding app you can find (including codecs), get yourselves a good open source runtime debugger and see for yourselves that there is no bitrate used on the black bars you see.
    Quote Quote  
  14. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    the thing is that you, and almost everyone that you see in forums like these don't unnderstand one very simple thing: the black areas have no bitrate, they have no pixels, they are the absence of bitrate. it's very easy to test what i have said:
    If they are in the image, they take up bitrate. They exist as pixels in the image space. Take a movie with an OAR of 2.35:1. Put it in a 16:9 (1.78:1 ) frame, and you have to add black bars into the image to preserve the correct DAR. As soon as you put these in the image, they take up some bitrate. Yes, it might not be a lot, but it is not necessary to keep those bars when encoding for PC or standalone avi player playback. Any bitrate you can direct to the image instead of pointless waste is a good thing.

    By your logic then, I should be able to put 2 hours of completely black screen onto a disc and use no space, as black screen area does no use any bitrate, and no bitrate = no space. This is, of course, patently untrue. Any pixels in the image require some space. if they exist, they must be encoded. If they do not change, as the letterbox bars do not, then the space will be small.

    However you also ignore a fundamental problem with mpeg4 encoding at the sort of bitrates commonly used. So called solid areas, such as letterboxing, do not encode as solid areas in most mpeg4 encodes. Turn the gamma up and watch the pixels pop and shimmer. This is all bitrate being used up.

    So go ahead and believe what you want. Believe in the Easter Bunny or the Great Pumpkin, for all I care. They make about as much sense as your black bars/no bitrate arguement.
    Read my blog here.
    Quote Quote  
  15. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Let's get back to the original "concept" of this thread.

    The person that started this thread wants to encode a WIDESCREEN DVD Video to a MPEG-4 XviD AVI file with AC-3 audio.

    Your standard DVD will have a resolution of either 720x480 if NTSC format or 720x576 if PAL format.

    Now within that frame size (or resolution) you can have 4:3 material or 16x9 material and you may or may not have some "black" encoded into the video in order to maintain the aspect ratio.

    Now it appears from the original post in this thread that the DVD is 16x9 WS but I don't know what the aspect ratio actually is other than the DVD is 16x9 WS anamorphic. However the aspect ratio can be 1.78:1 or 1.85:1 or 2.35:1 etc.

    Anyways as I was trying to say at the start of this thread ... it is "traditional" to convert the DVD to a 1:1 resolution with a width of 640 being considered the "standard width" for a MPEG-4 file. This is a "standard" that has developed over time and had a lot to do with the "simple profile" aspect of the MPEG-4 format.

    However there are other options and one such option is to encode to MPEG-4 without any cropping or resizing. It is then possible to set the A/R to 4:3 or 16x9 using MPEG4Modifier. Some software media players will respect that and resize accordingly but some will not. As for stand alone MPEG-4 capable DVD players ... this is something that is now supported but for the most part this is only supported by the relatively new "crop" of players. Traditionally this would not have worked on older MPEG-4 capable DVD players. Yet another reason for the traditional approach of a 1:1 MPEG-4 encode.

    Getting back on track here ... to encode 1:1 or to encode at DVD resolution with no cropping/resizing is not a simple decision. A few factors come into play. How was the DVD encoded? Is it 4:3 format or 16x9 format? What is the "true" aspect ratio?

    Another thing to consider ... MPEG-4 is geared towards looking "best" at a 1:1 resolution based on the way it does compression. Encoding at a non 1:1 resolution will make it harder to encode for MPEG-4 and thus could cause macroblock issues etc.

    This last point gets a bit technical so I will leave that to someone better versed in the particulars than myself. Perhaps manono or jagabo would be better at this overly technical explanation.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  16. Wow, I feel all warm inside that my thread has become home to such heated debate

    In any event, the page FulciLives linked me to was pretty helpful, and was a great starting point for more reading. I just didn't know much about how aspect ratios in DVDs worked. Turns out these test discs are stored as 720x480, which is why mencoder was outputting them like that. What I'm doing now is scaling them properly into the AVI using the math outlined on that page.

    I've since run into a couple other roadblocks, but they were more mencoder-specific so I hit the mencoder mailing list for those.

    It's been quite the educational weekend for me, so thank you all for helping!
    Quote Quote  
  17. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Cropping black borders is a good idea, as is keeping the resolution mod16. Resizing isn't a good idea, but cropping without resizing and keeping it mod16 can mean cropping more than the borders. One advantage of cropping is that you shift the macroblocks.

    mencoder/mplayer is actually probably ignoring the MPEG-4 PAR info and resizing based on the ODML header. mplayer I think is the only player that uses this info and it uses it over the MPEG-4 info. My SAP is quite a few years old now and it supports PAR resizing. Still if it doesn't work for you, then you have no choice but to resize to 1:1.

    As for MPEG-4 being geared towards looking "best" at a 1:1 resolution. Got some evidence on this? The whole point of anamorphic encoding as I understand it is that the human eye is more sensitive to vertical resolution, so you actually save bits by going non 1:1. Means 720x576 instead of 1024x576 which means you can get away with a lower bitrate.

    Still given a low enough bitrate you will always gain quality by using a lower resolution, so how you resize depends on the the source and the target filesize. If you were encoding at a fixed quant though, then encoding without resizing down will give the best quality.
    Quote Quote  
  18. Member
    Join Date
    Nov 2006
    Location
    United States
    Search Comp PM
    I am trying to do the same thing as the original poster. I do have a couple questions that I can't seem to find a straight answer to:

    If a DVD has 480 lines of resolution (height pixels) would my video encoded to XviD not lose detail by taking the height down to 272 (or any other lower number) pixels? It appears as though it is recommended that the width be kept standard at 640 and the height be adjusted. This just doesn't make sense to me since I've always understood that DVDs have a fixed height but adjustable width.

    I do not want to lose any of the detail that is provided in the "lost" pixels (from resizing based on either height or width), so what would be my resolution for a 4:3 video (final size and bitrate disregarded- both would accommodate the resolution). Can I use a simple proportion based on that figure to determine the resolution for other aspect ratios?

    My goal is to be able to watch my video on a progressive display and not be able to see any difference between it and the original DVD.

    Am I completely confused or turned around on my thinking here?
    Quote Quote  
  19. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    640 x 272 is for a 2.35 :1 AR source adjusted back to square pixels.

    If your source is 4:3 then resize to 640 x 480 to adjust for non-square to square pixels.

    Adjusting from an anamorphic to non-anamorphic format must cost detail. Just look at the difference in image quality between an anamorphic DVD and a matted letterbox DVD of the same film. Anamorphic encoding allows for up to a third more image data through the use of non-square pixels. When you convert to a square pixel format (e.g. Xvid avi) you must lose some of this advantage.

    If you want to maintain the quality of the original DVD, watch the the DVD and don't convert. The conversion process to Xvid/Divx will reduce the quality to some degree simply because you re-encoding from a lossy format to another lossy format, and to one that is arguably inferior in many respects, as it is based in maximising compression over image quality. Your goal is unachievable.
    Quote Quote  



Similar Threads

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