+ Reply to Thread
Results 1 to 22 of 22

Thread: DV PAL Resolution is stretching when transcoding??

  1. #1
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    DV PAL Resolution is stretching when transcoding??

    I'm digitising PAL VHS using a Canopus ADVC-100 & iMovie, and MediaInfo reports the resulting DV files to be:

    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 4:3



    When I transcode to DivX using ffmpegx, I set the frame size to be the same, 720 x 576, but MediaInfo reports the exported AVI as:

    Width : 720 pixels
    Height : 576 pixels
    Display aspect ratio : 5:4


    And when I flick between the two files in VLC, the AVI is stretched vertically.


    If I compare them in QuickTime the DV is much wider, and actually has two dimensions listed:
    Format: DV, 720 x 576 (768 x 576), Millions

    Whereas the AVI has one dimension:
    Format: DivX 6.0, 720 x 576, Millions


    Can someone explain what is happening? How can the DV have two values? Is it some kind of embedded exif info?

    How can I make the DivX behave the same as the DV within media players? I basically want an exact same size transfer from DV to AVI, and I can't tell if I've got it!
    Last edited by Gibson's Squares; 6th Jun 2012 at 15:09.
    Quote Quote  

  2. #2
    Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Posts
    14,699

    Re: DV PAL Resolution is stretching when transcoding??

    I'm probably wrong but....shouldn't DV be 640 x 480?
    Quote Quote  

  3. #3
    Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    10,081

    Re: DV PAL Resolution is stretching when transcoding??

    DV has a capture ratio for PAL at 720*576 pixels. But it has the display flag set at 4:3. That means AFAIK it adjusts to 768*576 when displayed.

    A pixel for pixel copy at 720*576 Divx would give you a 5:4 aspect ratio. So you either reencode to 768 to 576 or, more commonly, 720*544(or 540)

    And if you want a simple 4:3 DIVX you encode at 640*480
    Quote Quote  

  4. #4
    Member
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    28,714

    Re: DV PAL Resolution is stretching when transcoding??

    Not sure of the equivalent programs on a mac but you can use mpeg4modifier on a windows machine to set the DAR flag for xvid/divx encodes . The xvid vfw interface also has this ability.

    I think in ffmpeg CLI you can set -aspect 4:3 , not sure how to do it with ffmpegx

    Or you can do as DB83 suggests and use square pixels (resize to 640x480)
    Quote Quote  

  5. #5
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    Ahh.. that's exactly what I want to do - change the display flag without re-encoding or changing the physical dimensions of the file.

    There must be some program on the mac that does this??

    I tried setting the display dropdown to 4:3 in ffmpegx and then putting the dimensions to 720*576, but it ignored the aspect ratio and set it to 5:4. I think that dropdown is to auto calculate a 4:3 ratio rather than set it.

    If I ever manage to use ffmpeg from the command line, can you specify a 4:3 flag with it even though you might be exporting a non 4:3 file?
    Last edited by Gibson's Squares; 1st Jun 2012 at 14:02.
    Quote Quote  

  6. #6
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    Anyone got any more suggestions how I can do this on a Mac?
    Quote Quote  

  7. #7
    Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    10,081

    Re: DV PAL Resolution is stretching when transcoding??

    I would ask a moderator to move this topic to the dedicated Mac forum (when I first replied I did not appreciate it was Mac related).

    You are likely to get more answers there then in this general/Windows area.
    Quote Quote  

  8. #8
    Member
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    28,714

    Re: DV PAL Resolution is stretching when transcoding??

    Avidemux allows you to set PAR for xvid encoding, and it works

    But there are differences between the PC version and Mac version, but you can give it a try

    "AVI" is a windows format, designed by Microsoft. So proper support on a Mac is "dicey" at best

    Are you encoding interlaced xvid? (since you have VHS source, and using DV)
    Quote Quote  

  9. #9
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    Good idea DB83.

    Yes, am transcoding the DV to xvid. Still undecided on whether to keep the interlacing, but probably will in this instance.
    Quote Quote  

  10. #10
    I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    43,712

    Re: DV PAL Resolution is stretching when transcoding??

    Moving you to our mac section.
    Quote Quote  

  11. #11
    Member Herve's Avatar
    Join Date
    Nov 2006
    Location
    France
    Posts
    419

    Re: DV PAL Resolution is stretching when transcoding??

    Quote Originally Posted by Gibson's Squares View Post
    Ahh.. that's exactly what I want to do - change the display flag without re-encoding or changing the physical dimensions of the file.

    There must be some program on the mac that does this??
    use my soft : launch it > menu item "Windows" > "Studio…" : "Modify"
    PS: the app is a shareware but your don't have to register to use this module

    PPS: 5:4 is the "native pixels contents" ratio (whitout any aspect flag, nor 4:3 nor 16:9). So -during encoding- you forget to specify the aspect…

    PPPPPPPPs: gimme some news about the modify module, I wrote it to handle 4:3<->16:9, not to handle from noting to something (so I didn't tested your exact need )

    bye
    For DVD, iPad, HD, connected TV, … iMovie & FCPX? MovieConverter-Studio 3 (01/24/2015) - Handle your camcorder's videos? even in 60p or 60i? do a slow-motion? MovieCam.
    Quote Quote  

  12. #12
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    Thanks Herve, will give it a try.

    In the install assistant, what is the difference between selecting 'Broadcasting' and 'Editing'?

    What will each option do to my files?
    Quote Quote  

  13. #13
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    Just seen neither Herve's MovieConverter-Studio nor the earlier suggested Avidemux support DV, which is my input format. Bahhh!

    Can anyone confirm that using ffmpeg within Terminal to set '-aspect 4:3' (even if the video isn't truly 4:3) will result in the output XviD file playing as 4:3 in media players?
    Quote Quote  

  14. #14
    Member
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    28,714

    Re: DV PAL Resolution is stretching when transcoding??

    No, I tested it and ffmpeg's -aspect switch seems broken with xvid

    avidemux supports dv-avi (.avi container), but you probably have .dv . You might be able to rewrap it to dv-avi with mpegstreamclip (or ffmpeg can for sure)



    ...even if the video isn't truly 4:3
    The DAR is truly 4:3 . The Frame Aspect Ratio is 5:4 (because 720 / 576 = 5:4)
    Quote Quote  

  15. #15
    Member
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    28,714

    Re: DV PAL Resolution is stretching when transcoding??

    Supposedly you can run mpeg4modifier (even the GUI version) on linux or mac with mono
    http://www.mono-project.com/Main_Page

    See details here
    http://forum.doom9.org/showthread.php?t=117553
    Quote Quote  

  16. #16
    Member Herve's Avatar
    Join Date
    Nov 2006
    Location
    France
    Posts
    419

    Re: DV PAL Resolution is stretching when transcoding??

    Quote Originally Posted by Gibson's Squares View Post
    In the install assistant, what is the difference between selecting 'Broadcasting' and 'Editing'?
    you don't mind, assistant if for "the whole stuff", not for your specific use
    For DVD, iPad, HD, connected TV, … iMovie & FCPX? MovieConverter-Studio 3 (01/24/2015) - Handle your camcorder's videos? even in 60p or 60i? do a slow-motion? MovieCam.
    Quote Quote  

  17. #17
    Member Herve's Avatar
    Join Date
    Nov 2006
    Location
    France
    Posts
    419

    Re: DV PAL Resolution is stretching when transcoding??

    oops (seems I mistaook your needs)
    Quote Originally Posted by Gibson's Squares View Post
    Can anyone confirm that using ffmpeg within Terminal to set '-aspect 4:3' (even if the video isn't truly 4:3) will result in the output XviD file playing as 4:3 in media players?
    "no", …not really
    official AVI specifications do not support anamorphous files (aka DisplayAspectRatio = a forced display). Some players do, but it's not compliant with the norm, so avoid it to obtain a reliable result.
    So, you have to manually convert anamorphous pixels to square pixels, during encoding to Xvid
    eg:
    - your input file is "an anamorphous file that have to be displayed as 4:3", just make a real 4:3 file: eg: force/scale pixels weight to 640 and height to 480
    - your input file is "an anamorphous file that have to be displayed as 16:9", just make a real 16:9 file: eg: force/scale pixels weight to 640 and height to 360

    An encoding step is the most reliable way to do (forget the "flag change step", here, it's not really a good feature for your need)
    bye
    For DVD, iPad, HD, connected TV, … iMovie & FCPX? MovieConverter-Studio 3 (01/24/2015) - Handle your camcorder's videos? even in 60p or 60i? do a slow-motion? MovieCam.
    Quote Quote  

  18. #18
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    Quote Originally Posted by poisondeathray View Post
    No, I tested it and ffmpeg's -aspect switch seems broken with xvid

    Quote Originally Posted by Herve View Post
    official AVI specifications do not support anamorphous files (aka DisplayAspectRatio = a forced display). Some players do, but it's not compliant with the norm, so avoid it to obtain a reliable result.
    Is this why Poisondeathray's test in ffmpeg failed? It's perhaps not that ffmpeg was broken, but that XviD/AVI doesn't support it?

    Maybe I'll have to choose another end format. What formats support ratio flags?

    I know I could force the video into a square pixel/4:3 size, but I really wanted to keep it as it was.
    Quote Quote  

  19. #19
    Member
    Join Date
    Aug 2003
    Posts
    18,919

    Re: DV PAL Resolution is stretching when transcoding??

    Quote Originally Posted by Gibson's Squares View Post

    I know I could force the video into a square pixel/4:3 size, but I really wanted to keep it as it was.
    Bah. You'll never be able to tell the difference. Don't forget your source is a crummy VHS tape.
    Quote Quote  

  20. #20
    Member
    Join Date
    Sep 2007
    Location
    Canada
    Posts
    28,714

    Re: DV PAL Resolution is stretching when transcoding??

    Quote Originally Posted by Gibson's Squares View Post
    Quote Originally Posted by poisondeathray View Post
    No, I tested it and ffmpeg's -aspect switch seems broken with xvid

    Quote Originally Posted by Herve View Post
    official AVI specifications do not support anamorphous files (aka DisplayAspectRatio = a forced display). Some players do, but it's not compliant with the norm, so avoid it to obtain a reliable result.
    Is this why Poisondeathray's test in ffmpeg failed? It's perhaps not that ffmpeg was broken, but that XviD/AVI doesn't support it?

    Maybe I'll have to choose another end format. What formats support ratio flags?

    I know I could force the video into a square pixel/4:3 size, but I really wanted to keep it as it was.


    That's true about the spec, but it's definitely limited to ffmpeg implementation. It works with mpeg4modifier encoding through offical xvid/vfw encoding (as well as avidemux). I can post some examples if you want.

    If you read that thread linked, some mac user on older osx version used mpeg4modifer through mono and reported it working

    Most hardware players seem to be fine with it (In fact I haven't seen any DivX DVD player that doesn't, and most software players seem fine with it as well)


    Having said that, you can use h.264 (Better quality and compression than xvid anyway) with mp4 or mkv container which officially support "non square pixels" both in the stream information, and container flags. It depends on how you intend to view it and what devices. Many newer devices support mp4, mkv containers and h.264 compression. Some only support mp4.
    Quote Quote  

  21. #21
    Member Herve's Avatar
    Join Date
    Nov 2006
    Location
    France
    Posts
    419

    Re: DV PAL Resolution is stretching when transcoding??

    (about DAR)[QUOTE=poisondeathray;2166832]
    Quote Originally Posted by Gibson's Squares View Post
    Most hardware players seem to be fine with it
    I didn't say it does not work, I just said is not reliable (for .AVI/"Divx", it's safer to always use square pixels )

    bye

    Edit: typo
    Last edited by Herve; 10th Jun 2012 at 10:22.
    For DVD, iPad, HD, connected TV, … iMovie & FCPX? MovieConverter-Studio 3 (01/24/2015) - Handle your camcorder's videos? even in 60p or 60i? do a slow-motion? MovieCam.
    Quote Quote  

  22. #22
    Member Gibson's Squares's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    122

    Re: DV PAL Resolution is stretching when transcoding??

    I've been giving h.264 a whirl since reading up on its superior compression, and wrapping it in MP4.

    By chance I then found a mac tool called MP4tools which does change the ratio flag of an MP4 to 4:3.
    I can't work out yet if it's re-encoding the video to do this, but it's very quick so I suspect not.
    Quote Quote  

+ Reply to Thread

Similar Threads

  1. PAL - what is its resolution in 16:9 broadcasts?
    By snadge in forum DVB / IPTV
    Replies: 19
    Last Post: 22nd Oct 2013, 06:01
  2. Transcoding PAL v/s NTSC?
    By wulf109 in forum DVD Ripping
    Replies: 1
    Last Post: 12th Sep 2008, 23:11
  3. MKVtoolnix stretching and delaying vs. BeSweet transcoding
    By bonanza in forum Video Conversion
    Replies: 1
    Last Post: 2nd May 2008, 18:54
  4. PAL is bigger resolution than NTSC....?
    By snadge in forum Newbie / General discussions
    Replies: 17
    Last Post: 19th Jan 2008, 12:18
  5. stretching video resolution
    By Enforcer83 in forum Video Conversion
    Replies: 5
    Last Post: 1st Jan 2008, 14:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts