VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    Recently I've been trying to simplify and speed up my workflow when re-encoding FreeView video captures to XviD. AviSynth Trim and/or Dissolve snips out the ads, VirtualDubMod+DeLogo removes the logo on, eg, More4 movies when required.

    In the past I've also cropped out letterboxing and pillaring (LB&P), and resized down to about 400 lines. Resizing makes some sense, throwing away resolution as a trade-off for better compression at any given bit-rate (resolution at the expense of compression artifacts is a rotten deal). But I've only just realised that cropping LB&P, specifically inserted by the TV broadcaster to present the correct AR when displayed on 16:9 or 4:3 TV screens, is a bit silly. If you take out the LB&P, then you MUST resize, and do so accurately in two different dimensions, in order to restore the AR. There is an argument that says removing all that black stuff is a great idea because you don't want to waste your bitrate compressing it. IME the black stuff compresses very nicely and doesn't normally represent a very significant overhead.

    So I dropped cropping -- and then realised that this made resizing optional. Shaving a PAL frame down from 576 lines to 400 lines can be an advantage in a movie with a lot of action if you want to keep the bitrate low. (Dropping below about 360 lines isn't a great idea if you're feeding the output into a 48 inch TV or a projector.) But I've been finding that at around 1MB/sec with sensible dual-pass encoding resizing really doesn't seem to make that much difference to the compression quality. So I've now dropped resizing as well.

    One of the reasons I stuck with resizing for so long was that many TV movie captures have an AR that looks completely wrong when you bang them up on the PC screen. This may be because your player software is forcing 16:9 on a 4:3 source, or vice versa. Or it may be because the source is anamorphic and your player doesn't know how to stretch it correctly. But as far as I can make out these problems go away when you pipe this stuff into the living room. Your TV or your projector has modes to deal with all these ARs. If you haven't messed with the LB&P, you don't need to resize, however it might look on a PC display.

    So as of now, I'm a no-crop, no-resize kind of a guy.

    If this sounds like a bold assertion rather than a question, you mistake my purpose. I'm setting this out here because I haven't seen these principles spelled out in forums like this before (OK, I may have missed it -- there's a lot of stuff in these forums). Cropping and resizing seem to be a standard part of the routine (as they have been mostly for me in the past), and smart people who know a lot more about this than I do are doing it. So all this is really a question. What am I overlooking? What's the downside?

    --
    voodle
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I'm happy you found something that works for you. Without knowing the details of your source captures, it is difficult to give specifics, however most of the issues that seemed to cause you pain appear to be ones that are easily resolved, and in fact could have been handled by using only one or two programs.

    Your AR issues are primarily a lack of knowledge and poor player choice. Cropping bars from a capture will not screw up AR if done properly. Something like AutoGK will easily crop, resize and encode to Xvid and give you the correct AR for playback on pretty much any device.
    Read my blog here.
    Quote Quote  
  3. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    Without knowing the details of your source captures, it is difficult to give specifics, however most of the issues that seemed to cause you pain appear to be ones that are easily resolved, and in fact could have been handled by using only one or two programs.[
    The source, as I say, is standard MPEG2 from various FreeView tuners, cards or USB devices. And I think you misunderstand me. Very little pain has been involved, and I do only use "one or two programs" for transcoding.
    Cropping bars from a capture will not screw up AR if done properly.
    Simply cropping LB&P from a capture that has had the LB&P added by the TV broadcaster to create the correct AR within a standard 16:9 or 4:3 frame will, of course, screw up the AR. Your rider "if done properly" manages to make your statement come true without, however, adding any useful information... :-)
    Something like AutoGK will easily crop, resize and encode to Xvid and give you the correct AR for playback on pretty much any device.
    Oddly enough, it was AGK that put me into my present frame of mind. By default it fails to deliver correct AR quite spectacularly when, as is fairly common, the opening titles of a CinemaScope movie are LBd and the body of the movie is edge-cropped to fill 16:9. The result is usually a deformed AR that standard living-room display equipment can't correct. That certainly constituted "a pain" in the sense you use the word.

    My initial solution was to adjust AGK so that it started its crop-sampling a couple of thousand frames into the movie, avoiding the misleading lead-in. But then it struck me the best thing would be to switch off AGK's autocropping altogether, and never use it for off-air FreeView captures. A .autocrop file enforcing that became a permanent feature of my FreeView capture directory.
    Your AR issues are primarily a lack of knowledge....
    I think you'd need to know more about me to make a judgement like that, guns1nger... :-) But I'm here in search of knowledge, obviously. Any you have to share would be very welcome. As to players, we're taking -- as I say -- standard living room equipment delivering 16:9 and/or 4:3. AR is seldom a problem with software players on a PC because player windows can usually be squeezed and pulled until the AR looks right.

    The issue is: cropping and resizing -- what does it really buy you? I'm sure someone here will be able to come back with some constructive suggestions.

    --
    voodle
    Quote Quote  
  4. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    the opening titles of a CinemaScope movie are LBd and the body of the movie is edge-cropped to fill 16:9.
    Nothing will automagically make up for the butchery of broadcasters. In the given example, I would not even try to compensate for the screwed up credits. If the rest is 16:9 then there is no cropping required anyway. Yes, the credits look odd, but I have even seen DVDs authored this way (sad to say). The only way to adjust for them is to actually edit the clip into parts, resize each section according to it's needs, and then join them. Not worth the effort, IMO.

    If the source has had letterboxing added, or even better, been broadcast in the OAR, then it is even easier. You can use the 16:9 source directly for authoring, or crop and resize with the PAR and encode to Divx. Either solution will play back correctly on any supporting player. If you take off the bars and encode the Xvid/Divx, the player will simply put them back when it displays the image. If the image is displayed in a distorted manner then the video has not had the correct PAR adjustments made.

    As to what does it actually buy you - better bitrate allocation where it's needed. And Divx/Xvid especially need all the bitrate you can spare to avoid obvious image problems.
    Read my blog here.
    Quote Quote  
  5. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    Nothing will automagically make up for the butchery of broadcasters.
    True, and of course that doesn't just cover AR and the colour gamut. Theatre movies on TV are routinely edited down to fit timeslots.
    In the given example, I would not even try to compensate for the screwed up credits.
    But here, of course, it isn't the opening credits that are screwed up. They're in the original CinemaScope AR, or something close to it. It's the rest of the movie that's had its AR doctored to fit the dreaded 16:9. The point I was making here is that if you're using AKG in its default mode you will get a very screwed up main movie, because the autocropper will start by taking out the black bars in the opening title sequence, and then go on to slice the main movie in the same way, ignorant of that fact that it's been edge-trimmed to 16:9 already. So you don't just screw the AR, you lose extra chunks of each frame too.
    If you take off the bars and encode the Xvid/Divx, the player will simply put them back when it displays the image.
    Which players do you have in mind here? In my experience hardware players tend to show what you feed them as full screen 4:3 or 16:9. So if you feed in, say, a letterboxed 16:9 original that you've deletterboxed, your AR is going to be horizontally challenged when it hits your TV or projector screen. It's true that several hardware players have options other than 4:3 and 16:9, labelled something like "Full Screen", "4:3 Letterboxed" or "Wide Screen", but whether any of these corrects the AR or just produces a differently weird AR seems to be a matter of luck. IMHO if the broadcaster has LBd or Pd to 16:9 or 4:3 its much better to stick to that.
    As to what does it actually buy you - better bitrate allocation where it's needed.
    That's the theory, but have you quantified this? Do you know how many extra K those black strips top and bottom consume in your average 1MB/sec XviD? I'm guessing it's a good deal less than 5 per cent -- a tiny price to pay for knowing you'll end up with the correct AR. I suspect similar remarks apply to squeezing down from 576 lines to 400 lines. If anyone has definite metrics on this, I'm here to learn.

    As I think I've said, XviD @ 1MB/sec dual-pass (and I use 1 consecutive B-VOP) seems to cope with unresized 576 line input very nicely and without evident artifacts for most movies. I have encountered one or two (eg, where heavy use of handheld cameras guarantees that no two adjacent frames are alike ) where resizing is absolutely essential to avoid vast XviDs. But they're distinctly the exception.

    --
    voodle
    Quote Quote  
  6. Member
    Join Date
    Jun 2003
    Location
    United Kingdom
    Search Comp PM
    At 1MB/s I should imagine all your XviDs are vast, seeing as a 1 hour video would be 3.6 GB.
    Quote Quote  
  7. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    At 1MB/s I should imagine all your XviDs are vast
    That would solve any artifact problems, wouldn't it... :-)

    My daftness -- I do mean bits per second. Shouldn't have shifted that B.

    --
    voodle
    Quote Quote  
  8. Originally Posted by voodle
    If you take off the bars and encode the Xvid/Divx, the player will simply put them back when it displays the image.
    Which players do you have in mind here? In my experience hardware players tend to show what you feed them as full screen 4:3 or 16:9. So if you feed in, say, a letterboxed 16:9 original that you've deletterboxed, your AR is going to be horizontally challenged when it hits your TV or projector screen. It's true that several hardware players have options other than 4:3 and 16:9, labelled something like "Full Screen", "4:3 Letterboxed" or "Wide Screen", but whether any of these corrects the AR or just produces a differently weird AR seems to be a matter of luck. IMHO if the broadcaster has LBd or Pd to 16:9 or 4:3 its much better to stick to that.
    I have a Liteon LDV-2002 and a Philips DVP-5960. The Liteon usually displays Divx/Xvid with square pixels. So a 640x360 Xvid file is displayed 16:9 letterboxed, exactly the same way a 16:9 DVD would be displayed on my 4:3 TV. If that isn't right I can adjust the DAR in small increments via the remote control. The Philips normally uses square pixels but it also responds to the MPEG4 PAR/DAR flags. So pretty much any frame size can be displayed with any aspect ratio. I've heard of some Divx/DVD players that always stretch to full screen but that seems to be the minority.
    Quote Quote  
  9. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    If that isn't right I can adjust the DAR in small increments via the remote control
    Thanks for the info, jagabo. OK, so it seems that your players don't just reinstate any removed LB&P, although you can manually adjust to make up for this. Yes, I do have here one livingroom device that can adjust the AR incrementally in either dimension (and several that can't). Of course if your kit works like that, you're not going to be too worried about the AR as stored on your hard drive, and can concentrate on quality. But even so, the question arises: does all this cropping and resizing repay in quality the time and trouble it takes to carry it out? Given that there will be kit (not yours perhaps) that won't be able to display the AR correctly.

    I'm contending from experience that for most TV movies cropping and resizing doesn't have a useful quality payback. But I'm happy to yield on this point to anyone with definitive figures.

    --
    voodle
    Quote Quote  
  10. What is the frame size of your MPEG files? I thought Freeview used sizes like 544x576 or 480x576. If your MPEG sources are square pixel then you don't need to crop and resize. In all other cases you should resize or use MPEG4 PAR flags.

    On the subject of black borders: black (or any color) borders that are completely unchanging (ie free of noise) compress down to almost nothing. But if there is some noise in the borders (like in an analog recording) they will eat up bitrate.

    It's easy to test for this. Use a single pass constant quantizer encode. In this mode you select the quality you want and the encoder uses whatever number of bits is needed at each and every frame to deliver that quality. Encode once with the borders, again without the borders, then compare the file sizes. If your borders are completely black there will be very little difference in the file sizes.
    Quote Quote  
  11. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I have an LG player for avi (Xvid/Divx etc) which will playback (correctly) videos encoded as 1:1, 16:9 or 4:3. No distortion. I know this works as I have had to, on several occasions, correct poor encoding by others using mpeg4modifier to alter aspect ratios.

    I should also add that for TV caps I only use OTA digital streams, which in this country are broadcast at full PAL resolution. Pay-TV in Australia is such a poor quality, over-priced farce that I have no interest in getting it. This means I don't have to content with these stupid, non-compliant resolutions that seem to be foisted on the rest of the world.
    Read my blog here.
    Quote Quote  
  12. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    @jagabo
    What is the frame size of your MPEG files? I thought Freeview used sizes like 544x576 or 480x576
    Good question. BBC seems to do 720x576, anamorphic for 16:9, as does Film4. Typically I can happily bung this through XviD at around one mega, er, bit per sec without resizing and get artifact-free compression with virtually no visible loss of detail when projected onto an 80 inch screen. You might get 704x576 from Channel4. More4, as you say, does 544x576, at a distinctly cut-price bandwidth of around 2Mbps. All these channels seem to slip in LB&P as required to match the OAR to 16:9 anamorphic or 4:3. As long as I don't mess with the LB&P or resize these all display correctly in the living room. In the past I used always to crop and resize, prodding away at a calculator to make sure I wasn't mishaping the frames. I never used to have much luck with PAR flags in the past -- many players seemed to ignore them, although that might have changed now.
    On the subject of black borders: black (or any color) borders that are completely unchanging (ie free of noise) compress down to almost nothing. But if there is some noise in the borders (like in an analog recording) they will eat up bitrate.
    Agreed. I think a lot of the conventional wisdom about the need to strip out LB&P may stem from those noisy analogue days. IME it's just not necessary with a clean digital feed.

    @guns1nger
    I should also add that for TV caps I only use OTA digital streams, which in this country are broadcast at full PAL resolution. Pay-TV in Australia is such a poor quality, over-priced farce that I have no interest in getting it. This means I don't have to content with these stupid, non-compliant resolutions that seem to be foisted on the rest of the world.
    Yup, I stick with Freeview, but (see above) the resolutions between different channels varies a lot. They're all 576 lines, but with some rather weird widths. At least BBC1 and Ch4 (see above) seem to stick to (different) PAL standards. But the good news is that they all seem to come out fine as long as I'm not tempted to "correct" them.

    --
    voodle
    Quote Quote  
  13. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    The other issue with avi playback is that there are no standards. You can see this even with PC playback software. Some players observe different flags and act accordingly, some don't. It is the same with standalone players. The closest to a standard is Divx certification, however this can be bypassed easily by going down the Xvid route instead. Until this is resolved (and it won't be for a while yet), avi playback support will continue to be inconsistent, at best.
    Read my blog here.
    Quote Quote  
  14. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    the closest to a standard is Divx certification, however this can be bypassed easily by going down the Xvid route instead. Until this is resolved (and it won't be for a while yet), avi playback support will continue to be inconsistent, at best.
    Absolutely. Which is why I don't rely on AR flags. Like you, I've also come across other people's reencodes to MP4 with a horrible AR, but I usually correct this by careful reencoding and resizing (adding LB&P as required) to the same or higher bitrate. It seems to me that this inconsistency of players might be another good reason for avoiding cropping and resizing valuable MPEG TV captures you want to keep.

    Come to that, it may also be an argument for not encoding it to XviD or DivX at all, retaining it as MPEG2. But although the price of hard drive space and DVD blanks is dropping all the time, I'm still enough of a miser to want to store four movies per DVD rather than just one. :-)

    --
    voodle
    Quote Quote  



Similar Threads

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