VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Hi, please can anyone help a Cat??

    please consider this 2 uncompressed video files:

    this is recognized from my NLE as progressive:
    https://www.dropbox.com/s/00dnango1nwn8h0/progressive.AVI?dl=0


    and this as interlaced:
    https://www.dropbox.com/s/06vvc4n5asr1iw9/interlaced.AVI?dl=0


    I wonder: in the .avi header where is locate exactly the flag that tell to the decoder if the videofile is interlaced or progressive. What is the hex values that signal if the video is interlaced or progressive?

    Click image for larger version

Name:	prog5.jpg
Views:	725
Size:	258.6 KB
ID:	36352
    Last edited by marcorocchini; 1st Apr 2016 at 14:13.
    Quote Quote  
  2. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    The AVI container does not have a flag or header information that indicates interlace or progressive. If the codec used in the AVI container supports interlace it would have to specified somewhere, usually in the bitstream or in the codec-specific data area "strd" chunk.

    Your screenshot shows the MJPEG codec. A MJPEG encoded video stores 2 images per frame for interlace and 1 image per frame for progressive. The NLE probably analyzes the bitstream and detects the 2 images per frame and displays it as interlace.
    Last edited by Vidd; 1st Apr 2016 at 12:33.
    Quote Quote  
  3. oh sorry cat, I have export in mjpeg instead of uncompress, however now I have correct the post

    please can you tell me if there exist a program that analyze the avi header of this files?

    progressive
    Click image for larger version

Name:	progr.jpg
Views:	273
Size:	127.7 KB
ID:	36353




    interlaced
    Click image for larger version

Name:	interl.jpg
Views:	299
Size:	111.2 KB
ID:	36354
    Quote Quote  
  4. You need to get that info with batch script, using mediainfo ... we discussed it before, then store it and apply appropriate avisynth line (or whatever you need). Then you switched to ffprobe, not sure how to get it there, I think I had problem to determine top or bottom field first there. MediaInfo privides that. You got script as well.

    So yet again it was discussed already together with scripts, and we are back at the begging

    To determine top or bottom in the video, after you loose that info or for whatever reason: http://avisynth.nl/index.php/Interlace_detection
    But it is kind of insane in your case, because you can have that info from original. We are not talking about unknown source. Your source is known and then you loose that info. ... You might even store that info into that uncompressed avi filename, not hacking hex values (using mediainfo and batch or whatever you use to get that uncompressed).
    Quote Quote  
  5. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Maybe I am having a senior moment but I thought that, generally, uncompressed video is always 'progressive'. Or to put it another way each frame is complete and contains all the information.

    I wasted some time downloading those samples and the one called 'progressive' is not as such.
    Last edited by DB83; 1st Apr 2016 at 17:23. Reason: just to confuse a cat :)
    Quote Quote  
  6. download mediainfo cli, not gui from Videohelp, direct link here, then use this to store field order into avi name, it is going to add suffix: _none, _bff or _tff into filename
    Code:
    SET Mediainfo="C:tools\Mediainfo CLI\Mediainfo.exe"
    call :run_mediainfo "%aviname%"
    for %%i in ("%aviname%") do set "aviname=%%~dpni_%field_order%%%~xi"
    .
    .
    
    
    :run_mediainfo
    %mediainfo% "%~1" > "mediainfo.txt"
    findstr /c:"Scan order                               : Bottom Field First"  "mediainfo.txt" >nul
      if %errorlevel%==0 SET field_order=bff& set scan_order=Bottom Field First
    findstr /c:"Scan order                               : Top Field First"     "mediainfo.txt" >nul
      if %errorlevel%==0 SET field_order=tff& set scan_order=Top Field First
    findstr /c:"Scan type                                : Progressive"         "mediainfo.txt" >nul
      if %errorlevel%==0 SET field_order=none& SET scan_type=progressive
    findstr /c:"Scan type                                : Interlaced"          "mediainfo.txt" >nul
      if %errorlevel%==0 SET scan_type=interlaced
    goto :eof
    then use this code to read that info:
    Code:
    for %%i in ("%aviname%") do set "just_name=%%~ni"
    for /f "tokens=2 delims=_" %%i in ("%just_name%") do  set "field_order=%%i"
    rem field_order is none or tff or bff
    so for whatever reason, you loose the track what that uncompressed is, you have that info written into filename itself
    Last edited by _Al_; 1st Apr 2016 at 17:20.
    Quote Quote  



Similar Threads

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