VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. problem with Xvid conversion. I have converted many from same source and type of vid, but this has me buffaloed. The frame looks like its been cut diagonally and shifted down. Could any one tell whats up and/or how to fix.

    Here is a link ( http://home.insightbb.com/~wolfhere/ ) with a couple of images to help out. The top one is info of what the vid is and the other is what its doing in virtualdub

    thanks
    Quote Quote  
  2. Member teegee420's Avatar
    Join Date
    Dec 2003
    Location
    Southern California
    Search Comp PM
    That's one cool effect! You might want to try installing the latest xvid codec. The one you have installed now might be causing the problem.
    Quote Quote  
  3. I tryed installing the new codec and no dice. still does the same thing. thanks though
    Quote Quote  
  4. Member Roderz's Avatar
    Join Date
    Jul 2003
    Location
    the armpit ofthe Midlands
    Search Comp PM
    tryed installing the new codec and no dice
    but did you uninstall the old one first? (dxman is very usefull at this)
    and what other codecs are installed.
    Quote Quote  
  5. Sorry it took me a while to get back. I did uninstall the old codec before installing the new one. as for the other codecs I have, just the usuall suspects: Divx 3,4,5 Mpeg4 +v3, Mpeg 2, and a couple for capping. as well as a few audio ones.

    But after all said and done other xvid's are converting ok so going to discard this one as a bad one. and btw the ffdshow only caused me to have a audio video sync problem.

    thanks for the time you'all have given
    Quote Quote  
  6. Having written video and image processing software before I'm pretty sure I know what the problem is:

    When the file was created it was saved with an invalid frame width for XVID. The codec then padded or cropped to a proper width while compressing. So the header says it's maybe 700 pixels, but the actual data is 704 pixels.

    You might try editing the header with a hex editor or AVI header editor and changing the frame width. If that sample image is 1:1, it looks like you are 4 pixels off. Try increasing or decreasing the with by 4.
    Quote Quote  
  7. Member teegee420's Avatar
    Join Date
    Dec 2003
    Location
    Southern California
    Search Comp PM
    Originally Posted by junkmalle
    When the file was created it was saved with an invalid frame width for XVID. The codec then padded or cropped to a proper width while compressing. So the header says it's maybe 700 pixels, but the actual data is 704 pixels.
    I'm not trying to discount your theory but I was taught that Xvid didn't have frame size limitations. Virtualdub states this as well. Divx on the other hand requires a multiple of 4 for the width and a multiple of 2 for the height.
    Quote Quote  
  8. Originally Posted by teegee420
    I'm not trying to discount your theory but I was taught that Xvid didn't have frame size limitations. Virtualdub states this as well.
    Thanks for the correction on Xvid non-limitations! I assumed xvid had similar frame size limitations as most other codecs. Even so, the problem is almost certainly related to my description.

    It could be that the program used to create the file had such a limitation. Or maybe the programs he's using to read the file have the limitation. If the former is the case the file may be corrupt beyond fixing (at least not without some custom programming). If the latter, he'll just have to find a program that can handle the file.
    Quote Quote  
  9. As an experiment I took one of my xvid files and changed the image width in the header with a hex editor. I saw the same diagonal skew to the image when I opened it in VirtualDub. It played OK with Media Player and Real Player though. So jeff1701 may be able to fix the problem by playing with the AVI header.
    Quote Quote  
  10. ok not to sound funny, but you'all are going to a place I have never been. how would I go about editing the avi in a hex edit or. I opened it up and don't know where to start.

    sorry
    Quote Quote  
  11. Originally Posted by jeff1701
    you'all are going to a place I have never been
    I have to take back what I said. After looking again at your sample image, it's not exactly the same as the problem I described. The problem I described would have resulted in a shift for every single scanline of the image. Your image doesn't have the problem over the first 50 lines or so. But you might try this fix anyway and see if it helps:

    A hex editor lets you examine the "raw" contents of any file. It just gives you a byte-for-byte view without any knowledge of what the file represents. Here's a free hex editing program, HexEditor: http://www.hhdsoftware.com/hexeditor.html

    When you open your XVID file (use a backup copy!) with HexEditor you will see something like:



    The bytes you want to change are the first ones on the lines beginning with 00000040:, 000000a0:, and 000000b0:. Notice they are all the same value here, 40. That's hex, not decimal (more on that below). The locations of the latter two may not be the same in all AVI files, but they were the same in a dozen different xvid and divx files that I looked at.

    The file displayed above was a 576 pixel wide xvid video, hence the value 40 at the indicated locations (and the value 02 immediatly after -- 0240 hex is 576 decimal). AVICODEC indicated your file was 636 pixels wide so you should see 7C (027C hex is 636 decimal). You can use Windows' Calculator (in "scientific" mode) to convert decimal to hex and back.

    In Hexadecimal you count using 16 diffferent digits rather than 10. Since we don't have symbols to represent the decimal values 10 to 15, hexadecimal uses the letters A to F. So counting in hexadecimal goes:

    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
    20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
    30...
    40...
    50...
    60...
    70...
    80...
    90...
    A0...
    B0...
    C0...
    D0...
    E0...
    F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF

    In HexEditor you can change a byte by clicking on it and typing in a new value. Try changing the the indicated bytes from 7C to one of the following: 78, 79, 7A, 7B, 7D, 7E, 7F, 80. Then save the file and close it (other programs won't be able to access the file while HexEditor has it open). Finally, open the file it VirtualDub and see if the problem is fixed. If not try another value.

    A word of warning: since you are manually changing the image width in the header of the AVI file, any video program (even windows itslelf) that's reading the file may get confused and crash when you open the file. Be sure you're not running anything critical while running these experiments.
    Quote Quote  
  12. nope that didn't get it either. I thinks it time to kick this one. thanks for your efforts though.
    Quote Quote  



Similar Threads

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