VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Hi, please can you help a c*t?

    I have 2 video .avi files:

    one is an uncompressed interlaced video file https://dl.dropboxusercontent.com/u/39871584/INTERLACE.AVI

    and one is uncompressed progressive video file https://dl.dropboxusercontent.com/u/39871584/PROGRESSIVE.AVI

    MediaInfo correctly recognize the interlaced one as interlaced, and the progressive one as progressive.

    But now I wonder: using the HEX editor, can I modify a flag of the progressive one so that it is recognized as interlaced?

    Thanks
    Quote Quote  
  2. See the ODML extensions, the vprp chunk.

    http://abcavi.kibi.ru/docs/odml1.pdf

    Example analysis from your interlaced file:

    Code:
    76 70 72 70 header fourcc          "vprp"
    64 00 00 00 size                   100 bytes
    
    00 00 00 00 VideoFormatToken       0=UNKNOW
    01 00 00 00 VideoStandard          1=STANDARD_PAL
    32 00 00 00 dwVerticalRefreshRate  50
    80 07 00 00 dwHTotalInT            1920
    38 04 00 00 dwVTotalInLines        1080
    03 00 04 00 dwFrameAspectRatio     3:4 ???
    80 07 00 00 dwFrameWidthInPixels   1920
    38 04 00 00 dwFrameHeightInLines   1080
    02 00 00 00 nbFieldPerFrame        2
    
    FieldInfo[0]
    20 02 00 00 CompressedBMHeight     544
    80 07 00 00 CompressedBMWidth      1920
    1c 02 00 00 ValidBMHeight          540
    80 07 00 00 ValidBMWidth           1920
    00 00 00 00 ValidBMXOffset         0
    00 00 00 00 ValidBMYOffset         0
    7a 00 00 00 VideoXOffsetInT        122
    18 00 00 00 VideoYValidStartLine   24
    
    FieldInfo[1]
    20 02 00 00 CompressedBMHeight     544
    80 07 00 00 CompressedBMWidth      1920
    1c 02 00 00 ValidBMHeight          540
    80 07 00 00 ValidBMWidth           1920
    00 00 00 00 ValidBMXOffset         0
    00 00 00 00 ValidBMYOffset         0
    7a 00 00 00 VideoXOffsetInT        122
    50 01 00 00 VideoYValidStartLine   336
    You can make MediaInfo report the progressive video as interlaced simply by changing the nbFieldPerFrame from 1 to 2. But that doesn't make the video interlaced and the video data will be laid out wrong (not over/under format). Any program that really uses the vprop information will get confused. To do it properly you'll need to change other values in the vprp header and separate the fields within the video chunks.
    Last edited by jagabo; 8th Mar 2017 at 18:27.
    Quote Quote  
  3. Originally Posted by jagabo View Post

    Code:
    76 70 72 70 header fourcc          "vprp"
    64 00 00 00 size                   100 bytes
    
    00 00 00 00 VideoFormatToken       0=UNKNOW
    01 00 00 00 VideoStandard          1=STANDARD_PAL
    32 00 00 00 dwVerticalRefreshRate  50
    80 07 00 00 dwHTotalInT            1920
    38 04 00 00 dwVTotalInLines        1080
    03 00 04 00 dwFrameAspectRatio     3:4 ???
    80 07 00 00 dwFrameWidthInPixels   1920
    38 04 00 00 dwFrameHeightInLines   1080
    02 00 00 00 nbFieldPerFrame        2
    
    FieldInfo[0]
    20 02 00 00 CompressedBMHeight     544
    80 07 00 00 CompressedBMWidth      1920
    1c 02 00 00 ValidBMHeight          540
    80 07 00 00 ValidBMWidth           1920
    00 00 00 00 ValidBMXOffset         0
    00 00 00 00 ValidBMYOffset         0
    7a 00 00 00 VideoXOffsetInT        122
    18 00 00 00 VideoYValidStartLine   24
    
    FieldInfo[1]
    20 02 00 00 CompressedBMHeight     544
    80 07 00 00 CompressedBMWidth      1920
    1c 02 00 00 ValidBMHeight          540
    80 07 00 00 ValidBMWidth           1920
    00 00 00 00 ValidBMXOffset         0
    00 00 00 00 ValidBMYOffset         0
    7a 00 00 00 VideoXOffsetInT        122
    50 01 00 00 VideoYValidStartLine   336
    please jagabo wich program are you using to achieve this informations?
    Last edited by marcorocchini; 9th Mar 2017 at 04:48.
    Quote Quote  
  4. I did a simple hex dump and made the notes myself in Notepad.
    Quote Quote  
  5. but I need to understand:

    for example the string "544" is traduced is 20 02 00 00 ?
    the string "1920" is "80 07 00 00" ?

    but for example 80 07 00 00 is a hexadecimal value?

    and for example 720 and 576 what correspond to?
    Quote Quote  
  6. Originally Posted by marcorocchini View Post
    the string "1920" is "80 07 00 00" ?
    Intel processors are little endian. So you need to reverse the order of the bytes. 80 07 00 00 --> 00 00 07 80 --> 00000780 --> 780. Use a hex calculator to convert from hex to decimal. Windows' built in calculator has a Programmer mode that has hex/decimal conversion. 780 hex is 1920 decimal.
    Quote Quote  
  7. Code:
    03 00 04 00 dwFrameAspectRatio     3:4 ???

    please jagabo I would set this aspect ratio to 16:9 (par 16:9?) in this case what is the values correct to put in place of 03 00 04 00?
    Quote Quote  
  8. Use a hex calculator or table.

    Code:
    dec hex
    --- ---
     0   0
     1   1
     2   2
     3   3
     4   4
     5   5
     6   6
     7   7
     8   8
     9   9
    10   A
    11   B
    12   C
    13   D
    14   E
    15   F
    Quote Quote  
  9. Why don't you just read the documentation, experiment, and figure it out for yourself. Here's a hint:

    word = 2 byte value
    dword = 4 byte value

    Since AVI is a native Microsoft format, Microsoft has usually used Intel processors, and Intel processors are always little endian, multibyte values are stored least significant byte first, most significant byte last. So the two byte (word) hex value 1234 is stored in memory as 34 12. The four byte (dword) hex value 12345678 is stored in memory as 78 56 34 12.

    http://www.ascii.cl/conversion.htm
    Quote Quote  
  10. oh my cat
    Quote Quote  
  11. my pow cannot press key in the numpad
    Quote Quote  
  12. please help a c**
    Quote Quote  
  13. Just put in different numbers and see how it effect playback of the video.
    Quote Quote  
  14. * my paw
    Quote Quote  
  15. Then even if I give you the numbers you won't be able to type them in.
    Quote Quote  
  16. mmm but I'm able with mouse and copy and paste
    Quote Quote  
  17. Then copy and paste from the hex chart I linked to.
    Quote Quote  
  18. Jagabo please help me: considerting this mjpeg interlace video file:
    https://dl.dropboxusercontent.com/u/39871584/mjpegInterlace.avi


    And this mjpeg progressive video file:
    https://dl.dropboxusercontent.com/u/39871584/mjpegProgressive.avi

    can you tell me where is the flags internally the files that tell to mediainfo that they are interlaced/progressive?

    this mjpeg .avi don't have the vprp section

    thanks
    Quote Quote  
  19. It's in Mainconcept's private AVI1 chunk, the first byte is a 01 instead of 00. Each frame has an AVI1 chunk. Changing the first one (at address FE12) will cause MediaInfo to report the video as interlaced. But it may not be decoded properly, depending on what MJPG decoder is used (ffmpeg and lsmash return a picture that looks ok, PicVideo's MJPEG decoder doesn't). And, of course, even if the decoder decompresses the video, it will not be interlaced.
    Quote Quote  
  20. Ah interesting, Jagabo please help me cat:

    this time consider this small avi from FFMPEG in mjpeg:
    https://dl.dropboxusercontent.com/u/39871584/mjpegFFmpeg.avi

    mediainfo see it as progressive, is there a way to "force" it to see as interlaced?
    Quote Quote  
  21. That has a vprp chunk but it only has one FieldInfo structure in that chunk. Changing the nbFieldPerFrame value to 2 doesn't cause MediaInfo to report it as interlaced -- though it doesn't report progressive either. Presumably because there is now a discrepancy between the the nbFieldPerFrame value and the number of FieldInfo structures.
    Quote Quote  



Similar Threads

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