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?
![]()
+ Reply to Thread
Results 1 to 6 of 6
-
Last edited by marcorocchini; 1st Apr 2016 at 14:13.
-
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.
-
-
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). -
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 :)
-
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
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
Last edited by _Al_; 1st Apr 2016 at 17:20.
Similar Threads
-
What should I do with dwPaddingGranularity in AVI header?
By Videogamer555 in forum ProgrammingReplies: 2Last Post: 9th Mar 2016, 04:03 -
Interlaced/progressive flag mix-up
By Mr Chris in forum Authoring (DVD)Replies: 9Last Post: 20th Dec 2014, 02:06 -
avisynth: when I resize where is the interlaced flag?
By marcorocchini in forum Newbie / General discussionsReplies: 28Last Post: 24th Sep 2014, 04:55 -
changing aspect ratio flag inside xvid avi's, flexibly
By vhelp in forum ProgrammingReplies: 5Last Post: 1st Feb 2012, 19:56 -
AVI broken header file
By magillagorilla in forum RestorationReplies: 3Last Post: 23rd Sep 2011, 09:01