1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

VirtualDub error, caused by non mod 16 resolution?

Discussion in 'DivX / XviD' started by Blighter, Jan 26, 2006.

  1. Blighter

    Blighter Regular member

    Joined:
    May 18, 2004
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    26
    Hey guys,

    My DVD to Avi's have been going ok recently, but i got a new problem today :

    I resized one of my videos in VirtualDubMod to 688x384, but there was a black border bit on the left hand edge, so i cropped it using the Null Transform filter, and consequently, that changed the resolution to 688x383. When i tried to start encoding with Xvid, i got an error : "Cannot start video compression : An unknown error occured (maybe corrupt data)..."

    I wasn't sure what was wrong at that point, however i decided to play around a bit and discovered that if i undo the crop (in other words, leave the resolution at mod16), it works fine. It's only when the resolution gets changed from 688x384 to 688x383 that the error happens. Strange thing is, i swear i've done the same crop on the video before and it's worked fine in the past? What's wrong now?

    Cheers guys,

    Blighter
     
  2. Blighter

    Blighter Regular member

    Joined:
    May 18, 2004
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    26
    Sorry, got that wrong, i cropped it to 683x384

    cheers

    Blighter
     
  3. Blighter

    Blighter Regular member

    Joined:
    May 18, 2004
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    26
    Got it wrong again!! It seems to dislike any odd number (eg 683x384, 685x384) but likes even numbers...is this supposed to happen? I assume it's to do with Xvid encoder rather than VirtualDub?

    So assuming i can't put in an odd number for resolution, is there any other way i can crop the video without cutting out any of the movie and leaving a black border on the video?

    Cheers guys,

    Blighter
     
  4. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    XviD like other MPEG-4 codes uses YV12 colourspace, when means mod2 for vertical and mod4 for horizontal. You really are better off sticking with mod16 though. RGB is the only way to get odd resolutions.

    So it is neither VDub or XviD, it is a simple matter of colourspaces.
     
  5. Blighter

    Blighter Regular member

    Joined:
    May 18, 2004
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    26
    Ah, fair enough. So cropping isn't really a good idea as it changes the resolution and therefore makes the video non mod16?

    Cheers,

    Blighter
     
  6. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    Well encoding black borders isn't a good idea either.
     
  7. Blighter

    Blighter Regular member

    Joined:
    May 18, 2004
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    26
    Lol ok, finally found the solution...

    I was being single minded. I kept resizing, then cropping - when infact the answer is to crop the video, then resize to the desired resolution. Just posting incase anyone else has similar problem...
     

Share This Page