Discussion:
[vlc] How to obtain the frame rate from a XviD (AVI) file?
Virgil Stokes
2013-12-29 21:28:17 UTC
Permalink
The following is a hex-ascii dump of the first 300 bytes of an AVI (XviD
format) file:

|52|49|46|46|8c|79|95|00|41|56|49|20|4c|49|53|54|94|6a|00|00 RIFF.y..AVI
LIST.j..
|68|64|72|6c|61|76|69|68|38|00|00|00|40|9c|00|00|00|ec|36|00
hdrlavih8... at .....6.
|00|00|00|00|10|00|00|00|81|01|00|00|00|00|00|00|01|00|00|00
....................
|df|9e|01|00|d0|02|00|00|40|02|00|00|00|00|00|00|00|00|00|00
........ at ...........
|00|00|00|00|00|00|00|00|4c|49|53|54|3c|69|00|00|73|74|72|6c
........LIST<i..strl
|73|74|72|68|38|00|00|00|76|69|64|73|78|76|69|64|00|00|00|00
strh8...vidsxvid....
|00|00|00|00|00|00|00|00|e8|03|00|00|a8|61|00|00|00|00|00|00
.............a......
|81|01|00|00|df|9e|01|00|10|27|00|00|00|00|00|00|00|00|00|00
.........'..........
|d0|02|40|02|73|74|72|66|28|00|00|00|28|00|00|00|d0|02|00|00
.. at .strf(...(.......
|40|02|00|00|01|00|18|00|58|56|49|44|00|f8|25|00|00|00|00|00
@.......XVID..%.....
|00|00|00|00|00|00|00|00|00|00|00|00|73|74|72|64|c0|28|00|00
............strd.(..
|00|00|00|00|bc|02|00|00|90|b2|08|00|2e|5c|76|69|64|65|6f|2e
.............\video.
|70|61|73|73|00|00|2e|00|70|00|61|00|73|00|73|00|00|00|00|00
pass....p.a.s.s.....
|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00
....................
|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00|00
....................

In this particular case I know that the video has a frame rate of 25
frames per second. How can I use this dump to obtain the frame rate?
Note, it is straightforward to obtain the frame rate for an avi msvc
(CRAM) video file since the data structure is well documented. However,
I have yet to find any document that defines the data structure for a
XviD (AVI) file --- if I had access to such a document, I probably would
not need help.

--V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20131229/5d3326ea/attachment.html>
Jean-Baptiste Kempf
2013-12-30 14:12:05 UTC
Permalink
In this particular case I know that the video has a frame rate of 25 frames
per second. How can I use this dump to obtain the frame rate? Note, it is
straightforward to obtain the frame rate for an avi msvc (CRAM) video file
since the data structure is well documented. However, I have yet to find any
document that defines the data structure for a XviD (AVI) file --- if I had
access to such a document, I probably would not need help.
Sorry, but the framerate is in the codec information, so you need to
parse this bitstream too.
I don't think this is the right mailing list for this topic.


With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Continue reading on narkive:
Loading...