VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    May 2007
    Location
    United States
    Search Comp PM
    Is there any way using AVISynth to detect whether an HD video stream is really pillarboxed 4:3 content?

    I have an MPEG-2 transport stream that I am trying to split up using the Haali splitter, decode, and re-encode, but sometimes the content is really just pillarbox'd 4:3 content, and I need a way to programmatically determine whether it should be cropped.

    Is there any way to do this with AVISynth?

    Many thanks,
    jack

    (p.s. - my apologies if this happens to be a dupe, I searched in the forums and couldn't find what i was looking for)
    Quote Quote  
  2. Hi-

    I need a way to programmatically determine whether it should be cropped.

    The AutoCrop filter?

    http://avisynth.org/warpenterprises/

    From the accompanying text file:
    AutoCrop is an AVISynth filter that automatically crops the black borders from a clip.
    Perhaps not what you had in mind, though.
    Quote Quote  
  3. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    I could be wrong, but I don't think so. All of the filters that I have used require manually setting the options and viewing the results to see if they are correct. You can easily remove pillarbox in AviSynth, but I don't think there's a way to automate the process if it's not told it's pillarboxed content.

    Edit: Just read manono's reply. Never heard of it, but if it works...
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  4. Yeah, gadgetguy, the Autocrop crops all black. That's why I'm not sure that's what GoneToTheDogs is looking for. I think he's looking for some automatic solution that detects only pillarbars and crops them, so the video can be reencoded as 4:3.
    Quote Quote  
  5. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    However, if the clip is 4:3 delivered in a 16:9 stream, not only does it have to be cropped, but it also has to be resized back to 4:3 resolution. Not sure that it is worth the effort, or image degradation, personally.
    Read my blog here.
    Quote Quote  
  6. Maybe I'm jumping to conclusions without any evidence, but I assumed he's reencoding for DVD, or maybe something else he wants in a lower resolution (AVI?). If so, he'll be resizing anyway. If not, then I agree there's no point to the exercise.

    Of course, he could just look at it and tell if it's from a 4:3 source.
    Quote Quote  
  7. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    Starting from an HD stream the degradation might be acceptable if going to another format like DVD.
    I just looked at the autocrop feature and read the txt file. It might work, although the creator doesn't seem to have much confidence in it.
    From the txt file:
    I strongly suggest using the preview mode before committing to a particular crop.
    But it also assumes the pillar box is encoded into the stream. I don't have any experience with HD transport streams, but is that normal? or are there A/R flags like for DVD content and the pillar boxes are added by the player?
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  8. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I know that Australian digital broadcasts are all 16:9, so 4:3 material is pillarboxed. Most digital players have a 4:3 (or fullscreen) mode that zooms for you (and does a much better job than any DVD player I have seen), but if you cap the stream you get the full 16:9, pillarboxed image.
    Read my blog here.
    Quote Quote  
  9. Member
    Join Date
    May 2007
    Location
    United States
    Search Comp PM
    I am in fact re-encoding (and will adjust the aspect ratio to 4:3), and a small loss of quality is acceptable -- if that autocrop filter can automatically detect and crop the black pillars then it is truly a god-sent!!! Thank you all for your help, I'll give that filter a try and post back with my results.
    Quote Quote  
  10. Member
    Join Date
    May 2007
    Location
    United States
    Search Comp PM
    AutoCrop did the trick, thanks so much! I am very grateful for your kindness and expertise!
    Quote Quote  



Similar Threads

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