[Ffmpeg-devel] [Ffmpeg-devel-old] x264: AVI index broken

David Liontooth liontooth
Fri Feb 17 01:34:13 CET 2006


After encoding a file with this command:

ffmpeg -i $1 -f avi -vcodec h264 -b $VBITRATE -s 640x480 -acodec mp3
$OUTFILE

I get this file:

$ tcprobe -i ffmpeg-715.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 29.970 fps, codec=H264, frames=3446, width=640, height=480
[avilib] A: 32000 Hz, format=0x55, bits=0, channels=2, bitrate=64 kbps,
[avilib]    3196 chunks, 920448 bytes, VBR
[tcprobe] summary for ffmpeg-715.avi, (*) = not default, 0 = not detected
import frame size: -g 640x480 [720x576] (*)
       frame rate: -f 29.970 [25.000] frc=4 (*)
      audio track: -a 0 [0] -e 32000,0,2 [48000,16,2] -n 0x55 [0x2000] (*)
                   bitrate=64 kbps
           length: 3446 frames, frame_time=33 msec, duration=0:01:54.981

When I start VLC (nightly build amd64 0.8.5-svn20060212-0), I get this
error:

"This AVI file is broken. Seeking will not work correctly. Do you want
to try to repair it (it might take a long time)?"

If I say yes, I get this:

[00000290] avi demuxer debug: Fixing AVI index
[00000290] avi demuxer warning: creating index from LIST-movi, will take
time !

The file repairs and plays fine -- though I should mention the file
plays just as well if I respond no. Alternatively, I can read it into
avidemux and save it straight; that fixes the problem permanently.
Resulting files stream great with VLC.

Questions:

Am I leaving out a command parameter?
Is this a bug I should report?
Is there a workaround that can be scripted -- rebuilding the avi index? 

This looks like a minor issue in a system that is basically working
extremely well -- fantastic work!

Dave


$ vlc -vvv ffmpeg-715.avi
VLC media player 0.8.5-svn Janus
[00000001] main vlc debug: opening config file /home/steen/.vlc/vlcrc
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file
/home/steen/.vlc/cache/plugins-04081e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 214 modules
[00000001] main vlc debug: opening config file /home/steen/.vlc/vlcrc
[00000001] main vlc debug: CPU has capabilities 486 586 MMX 3DNow!
MMXEXT SSE SSE2 FPU
[00000001] main vlc debug: looking for memcpy module: 4 candidates
[00000001] main vlc debug: using memcpy module "memcpymmxext"
[00000269] main playlist debug: waiting for thread completion
[00000269] main playlist debug: thread 1082132832 (playlist) created at
priority 0 (src/playlist/playlist.c:184)
[00000270] main private debug: waiting for thread completion
[00000270] main private debug: thread 1090525536 (preparser) created at
priority 0 (src/playlist/playlist.c:210)
[00000271] main interface debug: looking for interface module: 1 candidate
[00000271] main interface debug: using interface module "hotkeys"
[00000271] main interface debug: thread 1098918240 (interface) created
at priority 0 (src/interface/interface.c:229)
[00000273] main interface debug: looking for interface module: 6 candidates
[00000273] main interface debug: using interface module "screensaver"
[00000273] main interface debug: thread 1107310944 (interface) created
at priority 0 (src/interface/interface.c:229)
[00000269] main playlist debug: adding playlist item `ffmpeg-715.avi' (
ffmpeg-715.avi )
[00000275] main interface debug: looking for interface module: 5 candidates
[00000275] main interface debug: using interface module "wxwidgets"
[00000275] main interface debug: thread 1115703648 (manager) created at
priority 0 (src/interface/interface.c:214)
[00000275] wxwidgets interface debug: Using last windows config
'(-1,0,0,2048,768)(0,1024,0,640,599)(6,0,0,-1,150)'
[00000275] wxwidgets interface debug: id=0 p=(1024,0) s=(640,599)
[00000275] wxwidgets interface debug: id=6 p=(0,0) s=(-1,150)
[00000275] wxwidgets interface debug: last windows config is invalid
(ignored)
[00000269] main playlist debug: nothing requested, starting
[00000269] main playlist debug: creating new input thread
[00000278] main input debug: waiting for thread completion
[00000278] main input debug: creating statistics handler
[00000278] main input debug: `ffmpeg-715.avi' gives access `' demux `'
path `ffmpeg-715.avi'
[00000278] main input debug: creating demux: access='' demux=''
path='ffmpeg-715.avi'
[00000280] main demuxer debug: looking for access_demux module: 2 candidates
[00000278] main input debug: thread 1124096352 (input) created at
priority 0 (src/input/input.c:260)
[00000278] main input debug: creating access '' path='ffmpeg-715.avi'
[00000283] main access debug: looking for access2 module: 5 candidates
[00000283] vcd access debug: trying .cue file: ffmpeg-715.cue
[00000283] access_file access debug: opening file `ffmpeg-715.avi'
[00000283] main access debug: using access2 module "access_file"
[00000289] main private debug: pre buffering
[00000289] main private debug: received first data for our buffer
[00000289] main private debug: prebuffering done 1408981 bytes in 0s -
288460 kbytes/s
[00000278] main input debug: creating demux: access='' demux=''
path='ffmpeg-715.avi'
[00000290] main demuxer debug: looking for demux2 module: 42 candidates
[00000289] avi private debug: found Chunk fourcc:46464952 (RIFF)
size:11371314 pos:0
[00000289] avi private debug: found LIST chunk: 'AVI '
[00000289] avi private debug: <list 'AVI '>
[00000289] avi private debug: found Chunk fourcc:5453494c (LIST)
size:8822 pos:12
[00000289] avi private debug: found LIST chunk: 'hdrl'
[00000289] avi private debug: <list 'hdrl'>
[00000289] avi private debug: found Chunk fourcc:68697661 (avih) size:56
pos:24
[00000289] avi private debug: avih: streams:2 flags: HAS_INDEX
IS_INTERLEAVED TRUST_CKTYPE 640x480
[00000289] avi private debug: found Chunk fourcc:5453494c (LIST)
size:4240 pos:88
[00000289] avi private debug: found LIST chunk: 'strl'
[00000289] avi private debug: <list 'strl'>
[00000289] avi private debug: found Chunk fourcc:68727473 (strh) size:56
pos:100
[00000289] avi private debug: strh: type:vids handler:0x34363248
samplesize:0 29.97fps
[00000289] avi private debug: found Chunk fourcc:66727473 (strf) size:40
pos:164
[00000289] avi private debug: strf: video:H264 640x480 planes:1 24bpp
[00000289] avi private debug: found Chunk fourcc:4b4e554a (JUNK)
size:4116 pos:212
[00000289] avi private debug: </list 'strl'>
[00000289] avi private debug: found Chunk fourcc:5453494c (LIST)
size:4230 pos:4336
[00000289] avi private debug: found LIST chunk: 'strl'
[00000289] avi private debug: <list 'strl'>
[00000289] avi private debug: found Chunk fourcc:68727473 (strh) size:56
pos:4348
[00000289] avi private debug: strh: type:auds handler:0x00000001
samplesize:0 27.78fps
[00000289] avi private debug: found Chunk fourcc:66727473 (strf) size:30
pos:4412
[00000289] avi private debug: strf: audio:0x0055 channels:2 32000Hz
0bits/sample 62kb/s
[00000289] avi private debug: found Chunk fourcc:4b4e554a (JUNK)
size:4116 pos:4450
[00000289] avi private debug: </list 'strl'>
[00000289] avi private debug: found Chunk fourcc:4b4e554a (JUNK)
size:260 pos:8574
[00000289] avi private debug: </list 'hdrl'>
[00000289] avi private debug: found Chunk fourcc:5453494c (LIST)
size:11256192 pos:8842
[00000289] avi private debug: skipping movi chunk
[00000289] avi private debug: found Chunk fourcc:31786469 (idx1)
size:106272 pos:11265042
[00000289] avi private debug: idx1: index entry:6642
[00000289] avi private debug: </list 'AVI '>
[00000289] avi private debug: * LIST-root size:11371322 pos:0
[00000289] avi private debug:      + RIFF-AVI  size:11371314 pos:0
[00000289] avi private debug:      |    + LIST-hdrl size:8822 pos:12
[00000289] avi private debug:      |    |    + avih size:56 pos:24
[00000289] avi private debug:      |    |    + LIST-strl size:4240 pos:88
[00000289] avi private debug:      |    |    |    + strh size:56 pos:100
[00000289] avi private debug:      |    |    |    + strf size:40 pos:164
[00000289] avi private debug:      |    |    |    + JUNK size:4116 pos:212
[00000289] avi private debug:      |    |    + LIST-strl size:4230 pos:4336
[00000289] avi private debug:      |    |    |    + strh size:56 pos:4348
[00000289] avi private debug:      |    |    |    + strf size:30 pos:4412
[00000289] avi private debug:      |    |    |    + JUNK size:4116 pos:4450
[00000289] avi private debug:      |    |    + JUNK size:260 pos:8574
[00000289] avi private debug:      |    + LIST-movi size:11256192 pos:8842
[00000289] avi private debug:      |    + idx1 size:106272 pos:11265042
[00000290] avi demuxer debug: AVIH: 2 stream, flags  HAS_INDEX
IS_INTERLEAVED TRUST_CKTYPE
[00000290] avi demuxer debug: stream[0] rate:30000 scale:1001 samplesize:0
[00000290] avi demuxer debug: stream[0] video(H264) 640x480 24bpp
29.970030fps
[00000278] main input debug: selecting program id=0
[00000290] avi demuxer debug: stream[1] rate:250 scale:9 samplesize:0
[00000290] avi demuxer debug: stream[1] audio(0x55) 2 channels 32000Hz 0bits
[00000290] avi demuxer debug: stream[0] created 3446 index entries
[00000290] avi demuxer debug: stream[1] created 3196 index entries
[00000290] avi demuxer debug: stream[0] length:114 (based on index)
[00000290] avi demuxer debug: stream[1] length:115 (based on index)
[00000290] avi demuxer warning: broken or missing index, 'seek' will be
axproximative or will have strange behaviour
[00000269] main playlist debug: initializing interaction system
[00000290] avi demuxer debug: Fixing AVI index
[00000290] avi demuxer warning: creating index from LIST-movi, will take
time !
[00000290] avi demuxer debug: stream[0] creating 3446 index entries
[00000290] avi demuxer debug: stream[1] creating 3196 index entries
[00000290] avi demuxer debug: stream[0] length:114 (based on index)
[00000290] avi demuxer debug: stream[1] length:115 (based on index)
[00000290] avi demuxer warning: broken or missing index, 'seek' will be
axproximative or will have strange behaviour
[00000290] main demuxer debug: using demux2 module "avi"
[00000278] main input debug: looking for a subtitle file in
/mnt/ssa/TV/scripts/testing/clips/
[00000293] main decoder debug: looking for decoder module: 22 candidates
[00000293] ffmpeg decoder debug: libavcodec initialized (interface 3276800 )
[00000293] ffmpeg decoder debug: postprocessing disabled
[00000293] ffmpeg decoder debug: ffmpeg codec (h264) started
[00000293] main decoder debug: using decoder module "ffmpeg"
[00000293] main decoder debug: thread 1132489056 (decoder) created at
priority 0 (src/input/decoder.c:159)
[00000320] main decoder debug: looking for decoder module: 22 candidates
[00000320] main decoder debug: using decoder module "mpeg_audio"
[00000320] main decoder debug: thread 1140881760 (decoder) created at
priority 0 (src/input/decoder.c:159)
[00000278] main input debug: meta information:
[00000278] main input debug:   - 'Setting' = ' HAS_INDEX IS_INTERLEAVED
TRUST_CKTYPE'
[00000278] main input debug: `ffmpeg-715.avi' successfully opened
[00000290] avi demuxer debug: old:0 < new 0
[00000290] avi demuxer debug: old:0 < new 0
[00000293] main decoder debug: no usable vout present, spawning one
[00000321] main video output debug: window size: 640x480
[00000321] main video output debug: looking for video output module: 6
candidates
[00000320] mpeg_audio decoder debug: MPGA channels:2 samplerate:32000
bitrate:64
[00000320] main decoder debug: no aout present, spawning one
[00000324] main audio output debug: looking for audio output module: 2
candidates
[00000324] main audio output debug: thread 1149274464 (aout) created at
priority 0 (oss.c:520)
[00000324] main audio output debug: using audio output module "oss"
[00000324] main audio output debug: output 's16l' 32000 Hz Stereo
frame=1 samples/4 bytes
[00000324] main audio output debug: mixer 'fl32' 32000 Hz Stereo frame=1
samples/8 bytes
[00000324] main audio output debug: filter(s) 'fl32'->'s16l' 32000
Hz->32000 Hz Stereo->Stereo
[00000325] main private debug: looking for audio filter module: 24
candidates
[00000325] main private debug: using audio filter module "float32tos16"
[00000324] main audio output debug: found a filter for the whole conversion
[00000324] main audio output debug: looking for audio mixer module: 3
candidates
[00000324] main audio output debug: using audio mixer module "trivial_mixer"
[00000324] main audio output debug: input 'mpga' 32000 Hz Stereo
frame=1152 samples/1449 bytes
[00000324] main audio output debug: filter(s) 'mpga'->'fl32' 32000
Hz->32000 Hz Stereo->Stereo
[00000346] main private debug: looking for audio filter module: 24
candidates
[00000346] main private debug: using audio filter module "mpgatofixed32"
[00000324] main audio output debug: found a filter for the whole conversion
[00000324] main audio output debug: filter(s) 'fl32'->'fl32' 35200
Hz->32000 Hz Stereo->Stereo
[00000347] main private debug: looking for audio filter module: 24
candidates
[00000347] main private debug: using audio filter module
"bandlimited_resampler"
[00000324] main audio output debug: found a filter for the whole conversion
[00000321] xvideo video output debug: adaptor 0, port 244, format
0x32315659 (YV12) planar
[00000322] main private debug: Registering subpicture channel, ID: 2
[00000322] main private debug: Registering subpicture channel, ID: 3
[00000322] main private debug: Registering subpicture channel, ID: 4
[00000322] main private debug: Registering subpicture channel, ID: 5
[00000321] xvideo video output debug: Window manager supports NetWM
[00000321] xvideo video output debug: Window manager supports
_NET_WM_STATE_FULLSCREEN
[00000321] xvideo video output debug: Window manager supports
_NET_WM_STATE_ABOVE
[00000321] xvideo video output debug: Window manager supports
_NET_WM_STATE_BELOW
[00000321] xvideo video output debug: Window manager supports
_NET_WM_STATE_STAYS_ON_TOP
[00000321] main video output debug: using video output module "xvideo"
[00000321] main video output debug: waiting for thread completion
[00000321] main video output debug: got 8 direct buffer(s)
[00000321] main video output debug: picture in 640x480 (0,0,640x480),
chroma I420, ar 4:3, sar 1:1
[00000321] main video output debug: picture user 640x480 (0,0,640x480),
chroma I420, ar 4:3, sar 1:1
[00000321] main video output debug: picture out 640x480 (0,0,640x480),
chroma I420, ar 4:3, sar 1:1
[00000321] main video output debug: direct render, mapping render
pictures 0-6 to system pictures 1-7
[00000321] main video output debug: thread 1157667168 (video output)
created at priority 0 (src/video_output/video_output.c:421)
[00000321] main video output warning: late picture skipped (165531)
[00000321] main video output warning: late picture skipped (132327)
[00000321] main video output warning: late picture skipped (98995)
[00000321] main video output warning: late picture skipped (65660)
[00000321] main video output warning: late picture skipped (32323)
[00000321] main video output warning: late picture skipped (10997)
[00000321] main video output warning: late picture skipped (17015)
[00000001] main vlc debug: removing all interfaces
[00000275] main interface debug: thread 1115703648 joined
(src/interface/interface.c:256)
[00000275] main interface debug: removing module "wxwidgets"
[00000273] main interface debug: thread 1107310944 joined
(src/interface/interface.c:256)
[00000273] main interface debug: removing module "screensaver"
[00000271] main interface debug: thread 1098918240 joined
(src/interface/interface.c:256)
[00000271] main interface debug: removing module "hotkeys"
[00000001] main vlc debug: removing playlist handler
[00000270] main private debug: thread 1090525536 joined
(src/playlist/playlist.c:247)
[00000278] main input debug: control type=0
[00000278] main input debug: control: stopping input
[00000278] main input debug: closing input
[00000289] avi private debug: free chunk avih
[00000289] avi private debug: free chunk strh
[00000289] avi private debug: free chunk strf
[00000289] avi private debug: free chunk JUNK
[00000289] avi private debug: free chunk LIST
[00000289] avi private debug: free chunk strh
[00000289] avi private debug: free chunk strf
[00000289] avi private debug: free chunk JUNK
[00000289] avi private debug: free chunk LIST
[00000289] avi private debug: free chunk JUNK
[00000289] avi private debug: free chunk LIST
[00000289] avi private debug: free chunk LIST
[00000289] avi private debug: free chunk idx1
[00000289] avi private debug: free chunk RIFF
[00000289] avi private debug: free chunk LIST
[00000290] main demuxer debug: removing module "avi"
[00000283] main access debug: removing module "access_file"
[00000293] ffmpeg decoder debug: ffmpeg codec (h264) stopped
[00000293] main decoder debug: removing module "ffmpeg"
[00000293] main decoder debug: thread 1132489056 joined
(src/input/decoder.c:191)
[00000293] main decoder debug: killing decoder fourcc `H264', 3 PES in FIFO
[00000293] main decoder debug: cannot find playlist, destroying vout
[00000321] main video output debug: removing module "xvideo"
[00000321] main video output debug: thread 1157667168 joined
(src/video_output/video_output.c:461)
[00000320] main decoder debug: removing module "mpeg_audio"
[00000320] main decoder debug: thread 1140881760 joined
(src/input/decoder.c:191)
[00000320] main decoder debug: killing decoder fourcc `mpga', 0 PES in FIFO
[00000346] main private debug: removing module "mpgatofixed32"
[00000347] main private debug: removing module "bandlimited_resampler"
[00000324] main audio output debug: thread 1149274464 joined (oss.c:547)
[00000324] main audio output debug: removing module "oss"
[00000325] main private debug: removing module "float32tos16"
[00000324] main audio output debug: removing module "trivial_mixer"
[00000278] main input debug: thread 1124096352 joined
(src/input/input.c:402)
[00000269] main playlist debug: thread 1082132832 joined
(src/playlist/playlist.c:248)
[00000269] main playlist: stopping playback
[00000269] main playlist debug: deleting playlist item `ffmpeg-715.avi'
[00000001] main vlc debug: removing all video outputs
[00000001] main vlc debug: removing all audio outputs
[00000001] main vlc debug: removing module "memcpymmxext"
[00000001] main vlc debug: opening config file /home/steen/.vlc/vlcrc
[00000001] main vlc debug: saving plugins cache file
/home/steen/.vlc/cache/plugins-04081e.dat




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Ffmpeg-devel mailing list
Ffmpeg-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ffmpeg-devel





More information about the ffmpeg-devel mailing list