[MPlayer-users] How to grab exactly each frame from one movie file, such as one avi file?

晓伟 dawnsong.tsinghua at gmail.com
Sun Dec 17 02:01:02 CET 2006


How to grab exactly each frame from one movie file, such as one avi file?

I search the man.htm and many help docs in mplayerhq.hu, but I have not
found my answer. I have tried the following command line:
Z:\>mplayer -msglevel all=6 -noframedrop -ao null -vo
jpeg:outdir=".\Temp\Grab"  .\Temp\Task_video.avi
but it didn't meet my exact want.
The above avi movie file lose one frame(the 5807th frame) which may be lost
during encoding. But the 00005807.jpg file is found when I extract frame. I
think the 00005807.jpg should be 00005808.jpg actually. I checked all the
messages mplayer gave and found one warning :

Found movie at 0x800 - 0x3CA652A
Reading INDEX block, 9294 chunks for 9294 frames (fpos=63595826).
stream_seek: WARNING! Can't seek to 0x3CCC448 !

I guess this may indicate the 5807th frame was lost. So I want mplayer do as
the fact is. It should not give the 00005807.jpg file name to the 5808th
frame, but remains the 00005807.jpg not existed according to the fact.

Any methods can make mplayer do this task exactly? Any answers would be
appreciated, thank you.

The lines below are the output messages of mplayer when executing the
command line I gave.

======= AVI Header =======
us/frame: 50000  (fps=20.000)
max bytes/sec: 165918
padding: 0
MainAVIHeader.dwFlags: (2064) HAS_INDEX TRUST_CKTYPE
frames  total: 9294   initial: 0
streams: 1
Suggested BufferSize: 21573
Size:  790 x 406
==========================
list_end=0xD4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: tscc (63637374)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 20/1 = 20.000
Start: 0   Len: 9294
Suggested BufferSize: 21573
Quality 0
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 790
  biHeight 406
  biPlanes 1
  biBitCount 32
  biCompression 1667462004='tscc'
  biSizeImage 2565920
===========================
list_end=0x3CA652A
Found movie at 0x800 - 0x3CA652A
Reading INDEX block, 9294 chunks for 9294 frames (fpos=63595826).
stream_seek: WARNING! Can't seek to 0x3CCC448 !
AVI index offset: 0x7FC (movi=0x800 idx0=0x4 idx1=0x4D66)
Auto-selected AVI video ID = 0
AVI_NI: No audio stream found -> no sound.
AVI: Searching for audio stream (id:-1)
AVI: No audio stream found -> no sound.
AVI video size=63514947 (9294) audio size=0 (0)
VIDEO:  [tscc]  790x406  32bpp  20.000 fps  1093.4 kbps (133.5 kbyte/s)
[V] filefmt:3  fourcc:0x63637374  size:790x406  fps:20.00  ftime:=0.0500
-- 
dawnsong



More information about the MPlayer-users mailing list