Missing last frame avi->mp2v

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Sokrates
New Cone
New Cone
Posts: 1
Joined: 31 Mar 2009 11:48

Missing last frame avi->mp2v

Postby Sokrates » 31 Mar 2009 13:13

Hi,
I'm generating video signals in matlab in order to broadcast them through a signal generator. Out of the box Matlab only supports the avi file format, so I'm using VLC to encode the signal using the mp2v codec(the signal generators software only supports MPEG-2 encoded Elementary streams).
I noticed that VLC is always skipping the last frame of the avi file. For example, I put 250 Frames into the avi file and the mp2v output file only contains 249.

I'm using VLC 0.9.8a on Windows XP. This is the vlc call:
"D:\Program Files\VideoLAN\VLC\vlc" -I dummy -vvv video.avi --verbose 2 --extraintf logger --sout=#transcode{vcodec=mp2v,vb=4096}:standard{access=file,mux=raw,dst=video.m2v} vlc://quit

Log:
-- logger module started --
main debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
main debug: looking for memcpy module: 3 candidates
main debug: using memcpy module "memcpymmxext"
main debug: thread 4560 (Interaction control) created at priority 0 (interface/interaction.c:382)
main debug: thread started
main debug: Creating an input for 'Medienbibliothek'
main debug: Input is a meta file: disabling unneeded options
main debug: `file/xspf-open://C:\Documents and Settings\clenaka\Application Data\vlc\ml.xspf' gives access `file' demux `xspf-open' path `C:\Documents and Settings\clenaka\Application Data\vlc\ml.xspf'
main debug: creating access 'file' path='C:\Documents and Settings\clenaka\Application Data\vlc\ml.xspf'
main debug: looking for access module: 2 candidates
access_file debug: opening file `C:\Documents and Settings\clenaka\Application Data\vlc\ml.xspf'
main debug: using access module "access_file"
main debug: TIMER module_Need() : 4.000 ms - Total 4.000 ms / 1 intvls (Avg 4.000 ms)
main debug: Using AStream*Stream
main debug: pre-buffering...
main debug: received first data for our buffer
main debug: creating demux: access='file' demux='xspf-open' path='C:\Documents and Settings\clenaka\Application Data\vlc\ml.xspf'
main debug: looking for demux module: 1 candidate
playlist debug: using XSPF playlist reader
main debug: using demux module "playlist"
main debug: TIMER module_Need() : 3.000 ms - Total 3.000 ms / 1 intvls (Avg 3.000 ms)
main debug: `file/xspf-open://C:\Documents and Settings\clenaka\Application Data\vlc\ml.xspf' successfully opened
main debug: looking for xml module: 2 candidates
main debug: using xml module "xml"
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
playlist debug: parsed 0 tracks successfully
main debug: removing module "xml"
main debug: EOF reached
main debug: control type=1
main debug: removing module "playlist"
main debug: removing module "access_file"
main debug: TIMER input launching for 'Medienbibliothek' : 11.000 ms - Total 11.000 ms / 1 intvls (Avg 11.000 ms)
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 4636 (preparser) created at priority 0 (playlist/thread.c:79)
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 4648 (fetcher) created at priority 0 (playlist/thread.c:108)
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 4644 (playlist) created at priority 0 (playlist/thread.c:117)
main debug: looking for interface module: 1 candidate
main debug: rebuilding array of current - root Wiedergabeliste
main debug: rebuild done - 0 items, index -1
logger: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
logger:
Warnung: Wenn Sie auf das graphische Interface nicht mehr zugreifen können, öffnen Sie die Befehlszeile, gehen Sie in den Ordner von VLC und führen "vlc -I qt" aus.

logger: using logger...
logger warning: no log filename provided, using `vlc-log.txt'
logger debug: opening logfile `vlc-log.txt'
main debug: using interface module "logger"
main debug: TIMER module_Need() : 58.000 ms - Total 58.000 ms / 1 intvls (Avg 58.000 ms)
main debug: thread 4660 (interface) created at priority 0 (interface/interface.c:168)
main debug: looking for interface module: 1 candidate
main debug: using interface module "hotkeys"
main debug: TIMER module_Need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
main debug: thread 4684 (interface) created at priority 0 (interface/interface.c:168)
main debug: adding item `vlc://quit' ( vlc://quit )
main debug: thread started
main debug: adding item `video.avi' ( video.avi )
main debug: rebuilding array of current - root Wiedergabeliste
main debug: rebuild done - 1 items, index -1
main debug: looking for interface module: 15 candidates
main debug: thread started
dummy: VLC media player - version 0.9.8a Grishenko - (c) 1996-2008 the VideoLAN team
dummy:
Warnung: Wenn Sie auf das graphische Interface nicht mehr zugreifen können, öffnen Sie die Befehlszeile, gehen Sie in den Ordner von VLC und führen "vlc -I qt" aus.

dummy: using the dummy interface module...
main debug: using interface module "dummy"
main debug: TIMER module_Need() : 5.000 ms - Total 5.000 ms / 1 intvls (Avg 5.000 ms)
main debug: thread 4812 (interface) created at priority 0 (interface/interface.c:168)
main debug: starting new item
main debug: processing request item null node Wiedergabeliste skip 0
main debug: rebuilding array of current - root Wiedergabeliste
main debug: rebuild done - 2 items, index -1
main debug: creating new input thread
main debug: Creating an input for 'video.avi'
main debug: thread started
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 4752 (input) created at priority 1 (input/input.c:370)
main debug: stream=`transcode'
main debug: looking for sout stream module: 1 candidate
main debug: stream=`standard'
main debug: looking for sout stream module: 1 candidate
main debug: set config option: sout-standard-access to file
main debug: set config option: sout-standard-mux to raw
main debug: set config option: sout-standard-dst to video.m2v
stream_out_standard debug: creating `file/raw://video.m2v'
stream_out_standard debug: extension is m2v
stream_out_standard debug: extension -> mux=(null)
stream_out_standard debug: using `file/raw://video.m2v'
main debug: looking for sout access module: 1 candidate
access_output_file debug: file access output opened (video.m2v)
main debug: using sout access module "access_output_file"
main debug: TIMER module_Need() : 3.000 ms - Total 3.000 ms / 1 intvls (Avg 3.000 ms)
stream_out_standard debug: access opened
main debug: looking for sout mux module: 1 candidate
mux_dummy debug: Dummy/Raw muxer opened
mux_dummy: Open
main debug: using sout mux module "mux_dummy"
main debug: TIMER module_Need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
main debug: muxer support adding stream at any time
main debug: muxer prefers to wait for all ES before starting to mux
stream_out_standard debug: mux opened
main debug: using sout stream module "stream_out_standard"
main debug: TIMER module_Need() : 14.000 ms - Total 14.000 ms / 1 intvls (Avg 14.000 ms)
main debug: set config option: sout-transcode-vcodec to mp2v
main debug: set config option: sout-transcode-vb to 4096
stream_out_transcode debug: codec video=mp2v 0x0 scaling: 1.000000 4096kb/s
main debug: using sout stream module "stream_out_transcode"
main debug: TIMER module_Need() : 29.000 ms - Total 29.000 ms / 1 intvls (Avg 29.000 ms)
main debug: `video.avi' gives access `' demux `' path `video.avi'
main debug: creating demux: access='' demux='' path='video.avi'
main debug: looking for access_demux module: 1 candidate
main debug: TIMER module_Need() : 14.000 ms - Total 14.000 ms / 1 intvls (Avg 14.000 ms)
main debug: creating access '' path='video.avi'
main debug: looking for access module: 5 candidates
vcd debug: trying .cue file: video.cue
vcd debug: could not find .cue file
access_file debug: opening file `video.avi'
main debug: using access module "access_file"
main debug: TIMER module_Need() : 3.000 ms - Total 3.000 ms / 1 intvls (Avg 3.000 ms)
main debug: Using AStream*Stream
main debug: pre-buffering...
main debug: received first data for our buffer
main debug: pre-buffering done 688107 bytes in 0s - 6221 kbytes/s
main debug: creating demux: access='' demux='' path='video.avi'
main debug: looking for demux module: 59 candidates
avi debug: found Chunk fourcc:46464952 (RIFF) size:33595016 pos:0
avi debug: found LIST chunk: 'AVI '
avi debug: <list 'AVI '>
avi debug: found Chunk fourcc:5453494c (LIST) size:210 pos:12
avi debug: found LIST chunk: 'hdrl'
avi debug: <list 'hdrl'>
avi debug: found Chunk fourcc:68697661 (avih) size:56 pos:24
avi debug: avih: streams:1 flags: HAS_INDEX TRUST_CKTYPE 720x576
avi debug: found Chunk fourcc:5453494c (LIST) size:134 pos:88
avi debug: found LIST chunk: 'strl'
avi debug: <list 'strl'>
avi debug: found Chunk fourcc:68727473 (strh) size:56 pos:100
avi debug: strh: type:vids handler:0x00000000 samplesize:0 25.00fps
avi debug: found Chunk fourcc:66727473 (strf) size:40 pos:164
avi debug: strf: video: 720x576 planes:1 24bpp
avi debug: found Chunk fourcc:6e727473 (strn) size:10 pos:212
avi debug: strn: stream name : video.avi
avi debug: </list 'strl'>
avi debug: </list 'hdrl'>
avi debug: found Chunk fourcc:4b4e554a (JUNK) size:1798 pos:230
avi debug: found Chunk fourcc:5453494c (LIST) size:33592540 pos:2036
avi debug: skipping movi chunk
avi debug: found Chunk fourcc:31786469 (idx1) size:432 pos:33594584
avi debug: idx1: index entry:27
avi debug: </list 'AVI '>
avi debug: found Chunk fourcc:00000000 ( ) size:0 pos:33595024
avi warning: found null fourcc chunk (corrupted file?)
avi debug: * LIST-root size:311048192 pos:0
avi debug: + RIFF-AVI size:33595016 pos:0
avi debug: | + LIST-hdrl size:210 pos:12
avi debug: | | + avih size:56 pos:24
avi debug: | | + LIST-strl size:134 pos:88
avi debug: | | | + strh size:56 pos:100
avi debug: | | | + strf size:40 pos:164
avi debug: | | | + strn size:10 pos:212
avi debug: | + JUNK size:1798 pos:230
avi debug: | + LIST-movi size:33592540 pos:2036
avi debug: | + idx1 size:432 pos:33594584
avi debug: + size:0 pos:33595024
avi debug: AVIH: 1 stream, flags HAS_INDEX TRUST_CKTYPE
avi debug: stream[0] rate:2500 scale:100 samplesize:0
avi debug: stream[0] video( ) 720x576 24bpp 25.000000fps
main debug: selecting program id=0
avi debug: stream[0] created 27 index entries
avi debug: stream[0] length:1 (based on index)
main debug: using demux module "avi"
main debug: TIMER module_Need() : 19.000 ms - Total 19.000 ms / 1 intvls (Avg 19.000 ms)
main debug: looking for a subtitle file in D:\Matlab_Spielwiese\
main debug: looking for packetizer module: 18 candidates
main debug: using packetizer module "rawvideo"
main debug: TIMER module_Need() : 4.000 ms - Total 4.000 ms / 1 intvls (Avg 4.000 ms)
main debug: stream out mode -> no decoder thread
main debug: starting in sync mode
main debug: `video.avi' successfully opened
avi debug: old:0 < new 0
main debug: control type=1
main debug: adding a new sout input (sout_input:00C60C10)
stream_out_transcode debug: creating video transcoding from fcc=`RV24' to fcc=`mp2v'
main debug: looking for decoder module: 34 candidates
kate debug: kate: OpenDecoder
main debug: using decoder module "rawvideo"
main debug: TIMER module_Need() : 38.000 ms - Total 38.000 ms / 1 intvls (Avg 38.000 ms)
main debug: looking for encoder module: 11 candidates
avcodec debug: libavcodec initialized (interface 3408896 )
avcodec debug: removing common factors from framerate
(mpeg2video@00C4CA20)
avcodec debug: found encoder MPEG-2 Video
main debug: using encoder module "avcodec"
main debug: TIMER module_Need() : 14.000 ms - Total 14.000 ms / 1 intvls (Avg 14.000 ms)
main debug: removing module "avcodec"
stream_out_transcode debug: decoder aspect is 540000:432000
stream_out_transcode debug: source pixel aspect is 1.000000:1
stream_out_transcode debug: scaled pixel aspect is 1.000000:1
stream_out_transcode debug: source 720x576, destination 720x576
stream_out_transcode debug: encoder aspect is 540000:432000
main debug: looking for video filter2 module: 19 candidates
swscale debug: 720x576 chroma: RV24 -> 720x576 chroma: I420 with scaling using Bicubic (good quality)
main debug: using video filter2 module "swscale"
main debug: TIMER module_Need() : 8.000 ms - Total 8.000 ms / 1 intvls (Avg 8.000 ms)
main debug: Filter 'swscale' (00CEA290) appended to chain
stream_out_transcode debug: destination (after video filters) 720x576
main debug: looking for encoder module: 11 candidates
avcodec debug: libavcodec already initialized
avcodec debug: removing common factors from framerate
(mpeg2video@00C4CA20)
avcodec debug: found encoder MPEG-2 Video
main debug: using encoder module "avcodec"
main debug: TIMER module_Need() : 4.000 ms - Total 4.000 ms / 1 intvls (Avg 4.000 ms)
main debug: adding a new input
mux_dummy debug: adding input
main debug: switching to async mode
avcodec warning: rc buffer underflow
(mpeg2video@00C4CA20)
avcodec warning: rc buffer underflow
(mpeg2video@00C4CA20)
avcodec warning: rc buffer underflow
(mpeg2video@00C4CA20)
avcodec warning: rc buffer underflow
(mpeg2video@00C4CA20)
avcodec warning: rc buffer underflow
(mpeg2video@00C4CA20)
avcodec warning: rc buffer underflow
(mpeg2video@00C4CA20)
avi warning: cannot skip packet, track disabled
main debug: removing module "rawvideo"
main debug: killing decoder fourcc `RV24', 0 PES in FIFO
main debug: removing a sout input (sout_input:00C60C10)
main debug: TIMER encoding video frame : 8.000 ms - Total 5010.000 ms / 27 intvls (Avg 185.556 ms)
main debug: removing module "rawvideo"
main debug: removing module "avcodec"
main debug: Filter 'swscale' (00CEA290) removed from chain
main debug: removing module "swscale"
mux_dummy debug: removing input
main warning: no more input streams for this mux
main debug: EOF reached
main debug: finished input
main debug: dying input
main debug: dying input
avi debug: free chunk avih
avi debug: free chunk strh
avi debug: free chunk strf
avi debug: free chunk strn
avi debug: free chunk LIST
avi debug: free chunk LIST
avi debug: free chunk JUNK
avi debug: free chunk LIST
avi debug: free chunk idx1
avi debug: free chunk RIFF
avi warning: unknown chunk (not unloaded)
avi debug: free chunk LIST
main debug: removing module "avi"
main debug: dying input
main debug: removing module "access_file"
main debug: thread ended
main debug: dead input
main debug: thread times: real 0m7.639891s, kernel 0m0.140625s, user 0m5.359375s
main debug: thread 4752 joined (playlist/engine.c:244)
main debug: TIMER input launching for 'video.avi' : 189.000 ms - Total 189.000 ms / 1 intvls (Avg 189.000 ms)
main debug: destroying chain... (name=transcode)
main debug: destroying chain... (name=standard)
mux_dummy debug: Dummy/Raw muxer closed
main debug: removing module "mux_dummy"
access_output_file debug: file access output closed
main debug: removing module "access_output_file"
main debug: removing module "stream_out_standard"
main debug: destroying chain done
main debug: removing module "stream_out_transcode"
main debug: destroying chain done
main debug: starting new item
main debug: changing item without a request (current 0/2)
main debug: using item 1
main debug: creating new input thread
main debug: Creating an input for 'vlc://quit'
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 4764 (input) created at priority 1 (input/input.c:370)
main debug: `vlc://quit' gives access `vlc' demux `' path `quit'
main debug: creating demux: access='vlc' demux='' path='quit'
main debug: looking for access_demux module: 0 candidates
main warning: no access_demux module matched "vlc"
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: creating access 'vlc' path='quit'
main debug: looking for access module: 1 candidate
main debug: using access module "dummy"
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: Using AStream*Stream
main debug: pre-buffering...
main debug: received first data for our buffer
main debug: pre-buffering done 1408981 bytes in 0s - 687635 kbytes/s
main debug: creating demux: access='vlc' demux='vlc' path='quit'
main debug: looking for demux module: 1 candidate
dummy: command `quit'
main debug: using demux module "dummy"
main debug: TIMER module_Need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: looking for a subtitle file in D:\Matlab_Spielwiese\
main debug: `vlc://quit' successfully opened
main debug: EOF reached
main debug: removing all interfaces
main debug: control type=1
main debug: thread ended
main debug: thread times: real 0m7.733632s, kernel 0m0.000000s, user 0m0.000000s
main debug: thread 4812 joined (interface/interface.c:188)
main debug: removing module "dummy"
main debug: thread ended
main debug: thread times: real 0m7.749256s, kernel 0m0.000000s, user 0m0.031250s
main debug: thread 4684 joined (interface/interface.c:188)
main debug: removing module "hotkeys"
main debug: thread ended
main debug: thread times: real 0m7.780503s, kernel 0m0.000000s, user 0m0.000000s
main debug: thread 4660 joined (interface/interface.c:188)
-- logger module stopped --

This time I tried to encode 27 Frames and got 26. It would be nice know what I did wrong.

Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 86 guests