VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Member
    Join Date
    Oct 2008
    Location
    United States
    Search Comp PM
    In the past, I've pretty much always used XviD for my personal DVD rips. I tended to use 2-pass encoding, resizing the frame to a range of 512-640 pixels wide and a video bitrate ranging from 700-1200 kbps depending on the aspect ratio and frame size. With external storage getting cheaper, I've decided to move outside the typical scene quality standards and rip and encode my DVDs to a standard that will minimize quality loss (regardless of file output size). I've already decided to move to AAC VBR 5.1 ~192 kbps audio, but what I'm not sure about is how to encode the video. I'm going to use the x264 encoder, and avoid resizing the frame. So, after cropping, I'm probably looking at a frame width of 704 or 720. Most of my rips will be 16:9 aspect ratio.

    So, a couple questions:
    • How will pixel AR effect the encode? Does PAR just have to do with the display (TV as opposed to PC), or is PAR going to change from 11:10 to 1:1 when I encode the video? In other words, if I play a DVD on my standalone player is it 11:10, and if I play it on my PC (to my TV) is it 1:1? I'm sorry if this is unclear, I'm not exactly sure how to word my question. My PC and standalone player are both connected to my TV via HDMI, and to tell you the truth, I don't really notice the difference. So should I just not even worry about PAR?
    • What is a good bitrate range to use for ~720x576 and ~720x480 encodes? Does 1200-1600 sound right? Should I use a different bitrate depending on the frame size or aspect ratio?


    Thanks in advance for your help.
    Quote Quote  
  2. DVD only has two aspect ratios, 16:9 and 4:3. Use the same pixel aspect ratio (--SAR in x264) as the source:

    720x576 PAL DVD 16:9 SAR = 64:45
    720x576 PAL DVD 4:3 SAR = 16:15

    The MPEG 2 spec is pretty clear that the full 720x576 frame represents the DAR, but some people think the inner 704x576 should represent the DAR, as specified in the ITU digital video spec (704x576 represents the DAR, 8 pixels of padding left and right to fill out the 720x576 frame). In fact, even commercial DVDs appear to vary in this aspect. Often analog tape sourced material uses the ITU spec (like old TV shows). The SAR values for that are:

    704x576 PAL DVD 16:9 SAR = 16:11
    704x576 PAL DVD 4:3 SAR = 12:11

    In any case the difference is only a few percent and you probably won't notice.

    Forget bitrates. Use constant quality encoding --crf in x264. Experiment on a few samples to see what you're happy with. Try somewhere around 18 to 20. The bigger the CRF the lower the quality and smaller the file. Using CRF encoding you always get the quality you want, regardless of the frame size or the nature of the particular video.

    x264's weakness is noise in dark areas. It will often deliver posterization in those areas. So watch them closely. The following post shows a bad case example:

    https://forum.videohelp.com/threads/345427-Handbrake-Should-i-leave-it-on?p=2156674&vie...=1#post2156674
    Last edited by jagabo; 26th Apr 2012 at 23:10.
    Quote Quote  
  3. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    i encode ntsc 4:3 dvd to square pixel h264 (1:1) 640x480. and 16/9 to 854x480. it plays the same on tv or computer. for pal use 768x576 and 1024x576.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  4. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    I've always used the same ratio as the source, and it's never given me problems with a decent encoding program.

    My experience with target bitrate v. CRF is that if you don't use higher levels/profiles of h.264, such as with the standard profile in handbrake or vidcoder, 2 pass target bitrate gave me better results than CRF with bout encoded file sizes the same.

    But basic h.264, like handbrake with the standard profile (esp. since it doesn't use 8x8 DCT) doesn't actually give you better results than well tuned xvid ... I've seen very good xvid avi and terrible mkv. The really good stuff with h.264 is in the more advanced features.

    If you start tweaking h.264 encoders (assuming it's a good one that has advanced settings), though, encoding time increases dramatically. If you just get started with the advanced options you're going to triple the processing time over fast settings. Even an i7 with 8 Gb ram isn't fast enough for the really tweaked settings in 2 pass mode. It'd be doable but not reasonable. You'd want the sort of cascaded serious pro machine that you won't find in regular computer stores. And would cost serious $$$.

    Hence, like most people, I'm not using 2 pass anymore. Even with slightly tweaked advanced settings you can get better encoding with crf in the same time a 2 pass mode without advanced settings would give you. I've been making some seriously good encodes of my dvds lately in CRF set up to soften a grainy source, but it takes about 5 1/2 hours to encode a 2 hour video on an i3.
    Quote Quote  
  5. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by jagabo View Post
    DVD only has two aspect ratios, 16:9 and 4:3. Use the same pixel aspect ratio (--SAR in x264) as the source:

    720x576 PAL DVD 16:9 SAR = 64:45
    720x576 PAL DVD 4:3 SAR = 16:15

    The MPEG 2 spec is pretty clear that the full 720x576 frame represents the DAR, but some people think the inner 704x576 should represent the DAR, as specified in the ITU digital video spec (704x576 represents the DAR, 8 pixels of padding left and right to fill out the 720x576 frame). In fact, even commercial DVDs appear to vary in this aspect. Often analog tape sourced material uses the ITU spec (like old TV shows). The SAR values for that are:

    704x576 PAL DVD 16:9 SAR = 16:11
    704x576 PAL DVD 4:3 SAR = 12:11

    In any case the difference is only a few percent and you probably won't notice.
    Any SD video sourced from broadcast TV (NTSC/PAL, ATSC/DVB) will use 704 horizontal pixels. Any digital capture will be at 704. Most consumer level analog to digital capture devices will cap 720 horizontal pixels. This causes most consumer caps to include 8 pixels of blanking left and right (shows as thin vertical black side stripes). For example:

    Click image for larger version

Name:	London5.jpg
Views:	1048
Size:	72.7 KB
ID:	12203
    NTSC analog video capture with Canopus ADVC-100

    Further for PAL, 4x3 analog PAL video converts to 702x576 digital so even 704 capture will show 2 pixel side stripes and 720 capture will show 10 if the original source was analog PAL.

    DVD by definition can use 704 or 720 horizontal pixel widths for active video. The spec shows the same SAR for 704 or 720. In that case 720 would be interpreted as additional pixel width beyond 4:3 or 16:9. But many DVDs were encoded with 720 to represent 4:3 or 16:9. These would use the SARs listed by Jagabo.

    So, we live in a dual SAR world. If you use the ITU spec, any conversion to 1:1 square pixels should start with the center 704 horizontal pixels. Most digital TV sets operate this way but there are exceptions.
    Last edited by edDV; 27th Apr 2012 at 11:53.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  6. Originally Posted by edDV View Post
    DVD by definition can use 704 or 720 horizontal pixel widths for active video. The spec shows the same SAR for 704 or 720. In that case 720 would be interpreted as additional pixel width beyond 4:3 or 16:9.
    The DVD spec refers to the MPEG 2 spec regarding aspect ratios. The MPEG 2 spec is very clear: the flagged display aspect ratio refers to the entire frame, not a 704 pixel wide sub frame. The MPEG 2 spec does not have an explicit flag for pixel or sample aspect ratio (except for square pixel encoding which isn't valid for DVD).

    Originally Posted by edDV View Post
    But many DVDs were encoded with 720 to represent 4:3 or 16:9.
    Yes, all the ones that follow the spec.

    But, as was pointed out, nobody cares.
    Last edited by jagabo; 27th Apr 2012 at 12:47.
    Quote Quote  
  7. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by jagabo View Post

    Originally Posted by edDV View Post
    But many DVDs were encoded with 720 to represent 4:3 or 16:9.
    Yes, all the ones that are correctly encoded!

    But, as was pointed out, nobody cares.
    It's an eye of beholder issue as to who is right. The broadcast/telco oriented ITU spec which defined 720x480/576 digital video pre-dated MPeg2 by several years. The MPeg committee created the inconsistency. The DVD working group failed to bring the two sides together by accepting both 704 and 720.

    So the user must now contend with both definitions. There isn't much of a problem if you use an overscanned TV. If pixel by pixel TV sets honored 720 as 16:9, then all broadcast SD video would show side bars. That is why they scale from 704 and let the 720 "extra width" fall off screen.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  8. Originally Posted by edDV View Post
    If pixel by pixel TV sets honored 720 as 16:9, then all broadcast SD video would show side bars. That is why they scale from 704 and let the 720 "extra width" fall off screen.
    All my players and TVs show the entire 720x480 frame when using HDMI.
    Quote Quote  
  9. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by edDV View Post
    If pixel by pixel TV sets honored 720 as 16:9, then all broadcast SD video would show side bars. That is why they scale from 704 and let the 720 "extra width" fall off screen.
    All my players and TVs show the entire 720x480 frame when using HDMI.
    To do that, they would need to scale from 704 for broadcast and from 720 for HDMI in.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  10. Originally Posted by edDV View Post
    Originally Posted by jagabo View Post
    All my players and TVs show the entire 720x480 frame when using HDMI.
    To do that, they would need to scale from 704 for broadcast and from 720 for HDMI in.
    DVD players don't deal with broadcast. They just play what's on the disc. The full 720x480 frame is upscaled to 1920x1080 and sent to the TV via HDMI. With 1:1 pixel mapping on the TV I see every pixel of the 720x480 frame.

    As we both have said, when DVDs are made from analog tape sources they are usually captured via the ITU spec (704x480 padded to 720x480) and authored to DVD as-is. Because they don't care about the slight AR error. Anyone using an upscaling DVD player, HDMI, and a 1:1 pixel mapping TV will see the black bars (or other noise) at the edges of the frame. And the visible picture will have a slight AR error.
    Quote Quote  
  11. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    DVD recorders must deal with 704 tuner input. ATSC/QAM/DVB computer tuners all cap SD as 704.

    Cable/Sat tuners need individual testing for analog and HDMI out.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  12. Originally Posted by edDV View Post
    DVD recorders must deal with 704 tuner input. ATSC/QAM/DVB computer tuners all cap SD as 704.
    And as I've said many times: they don't care that the AR violates the DVD/MPEG spec.

    By the way, on the players I've checked, even though they output the entire frame via upscaled HDMI, they follow the ITU spec for composite output. So the composite output has the wrong aspect ratio according to the DVD spec. Again, nobody cares. The entire TV industry igonores the fact that the ITU and MPEG2 specs are different. They use whichever is convenient in their production.
    Last edited by jagabo; 27th Apr 2012 at 14:11.
    Quote Quote  
  13. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by edDV View Post
    DVD recorders must deal with 704 tuner input. ATSC/QAM/DVB computer tuners all cap SD as 704.
    And as I've said many times: they don't care that the AR violates the DVD/MPEG spec.

    By the way, on the players I've checked, even though they output the entire frame via upscaled HDMI, they follow the ITU spec for composite output. So the composite output has the wrong aspect ratio according to the DVD spec. Again, nobody cares. The entire TV industry igonores the fact that the ITU and MPEG2 specs are different.
    There are two specs. The ITU Rec-601 spec has the official weight and forms the basis for SD digital TV transmission. The "TV and DVD industries" often ignore both specs. Decisions need to be made at the point of TV master control or DVD disc mastering how out of spec video will be handled (cropped or padded) or "filter corrected". These prople have the luxury of low compression, 10 bit 4:2:2 intermediates to make low loss corrections. Once the video is converted to 4:2:0 and compressed for transmission or DVD, the end user will suffer much higher rescale filter loss. IMO it is often best to leave it as is rather than suffer "correction" losses.


    PS: Let's take the example of a TV station playing a 720x480 DVD or DV* tape to air. The correct procedure following the ITU based standard would be a center crop to 704 without rescale. The MPeg2 standard would suggest a 720->704 lossy rescale as the correct procedure. It would also suggest an end user lossy rescale 704->720 before display.


    * DV tape is the only "pro" standard to use 720. DVCPro, DigiBeta, D1, etc. all use 704.
    Last edited by edDV; 27th Apr 2012 at 14:54.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  14. Originally Posted by edDV View Post
    There are two specs.
    No, there is only one spec for DVD. It's just that the difference between the DVD spec and the ITU spec is ignored when dealing with analog video sources. Why do we keep going on about this? We're both saying the same thing.
    Quote Quote  
  15. Originally Posted by Trismegistus View Post
    How will pixel AR effect the encode? Does PAR just have to do with the display (TV as opposed to PC), or is PAR going to change from 11:10 to 1:1 when I encode the video? In other words, if I play a DVD on my standalone player is it 11:10, and if I play it on my PC (to my TV) is it 1:1? I'm sorry if this is unclear, I'm not exactly sure how to word my question. My PC and standalone player are both connected to my TV via HDMI, and to tell you the truth, I don't really notice the difference. So should I just not even worry about PAR?
    It depends on the playback device and whether it understands aspect ratios in MP4/MKV files. It won't be a problem for the PC, but some standalone players just assume MP4/MKVs have square pixels so anamorphic encodes won't display correctly.
    For example there's two different brands of Bluray player in the house and two different media players built into TVs. The Sony Bluray player is the only one which displays anamorphic MKV/MP4s correctly.

    It doesn't make much difference when encoding 4:3 DVDs as there's not much resizing when converting to square pixels, but for 16:9 DVDs anamorphic encoding should improve the quality a little. Especially for PAL which has more vertical resolution. If the player doesn't play anamorphic MKV/MP4s correctly then converting "up" to square pixels (854x480, 1024x576 etc) rather than converting "down" to square pixels (704x400 etc) is the next best option. The extra width will increase the file size though.

    And as has been said, forget bitrates and use single pass CRF quality based encoding instead.
    Quote Quote  



Similar Threads

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