transcode h264 inaccurate frame rate
First, I post here in the hope that it will be useful, I am not an expert... It seems there is some kind of bug while transcoding to h264... I already posted in the VLC forum but without any answer...
http://forum.videolan.org/viewtopic.php?f=4&t=107536
http://forum.videolan.org/viewtopic.php?f=4&t=107619
I use this code to transcode from AVI to H264:
vlc.exe file.avi --sout=#transcode{venc=x264{profile=baseline},vcodec=h264,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=TEST_enc.mp4} -vvv
Doing so, the resulting file has a few missing frames at the end... Also the frame rate reported in VLC codec information is inaccurate...
Adding fps=25 does not help...
I also tried to append the same file twice (for testing purpose) using this code:
vlc.exe file_1.avi file_1.avi --sout-keep --sout=#gather:transcode{venc=x264{profile=baseline},vcodec=h264,fps=25,acodec=mp4a}:standard{access=file,mux=mp4,dst="file_out.mp4"} --sout-all -vvv
The resulting file has a length of 52s instead of 40s (and plays badly)...
It's a pitty, as VLC seems to have all the things I need to transcode to h264, + to append files, + add a logo (all this in one command line)... But I can not get a correct result...
Attached files that illustrate the above...
Thanks in advance for any help.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
I have uploaded the files using http://streams.videolan.org/upload/ Hope I do correctly.
- Owner
What happens in vlc-2.1.0-git-20130120-0002 ?
- Jean-Baptiste Kempf assigned to @ileoo
assigned to @ileoo
- Jean-Baptiste Kempf added Component::Stream output: Encoders + 1 deleted label
added Component::Stream output: Encoders + 1 deleted label
Hi ILEoo,
Thanks for looking...
vlc.exe file.avi --sout=#transcode{venc=x264{profile=baseline},vcodec=h264,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=TEST_enc.mp4} -vvv
It open VLC but does nothing...
If I replay from the GUI, the logs say:
main debug: processing request item: Original_File.avi, node: Lista de reproducción, skip: 0 main debug: resyncing on Original_File.avi main debug: Original_File.avi is at 0 main debug: starting playback of the new playlist item main debug: resyncing on Original_File.avi main debug: Original_File.avi is at 0 main debug: creating new input thread main debug: Creating an input for 'Original_File.avi' main debug: using sout chain=`transcode{venc=x264{profile=baseline},vcodec=h264,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=C:\Documents and Settings\m.lemarec\Escritorio\TEST_enc.mp4}' main debug: stream=`standard' main debug: looking for sout stream module matching "standard": 20 candidates main error: Option sout-standard-access is not supported anymore. main error: Option sout-standard-mux is not supported anymore. main error: Option sout-standard-dst is not supported anymore. stream_out_standard error: no access _and_ no muxer main debug: no sout stream modules matched main debug: destroying chain... (name=(null)) main debug: destroying chain done main error: stream chain failed for `transcode{venc=x264{profile=baseline},vcodec=h264,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=C:\Documents and Settings\m.lemarec\Escritorio\TEST_enc.mp4}' main error: cannot start stream output instance, aborting main debug: dead input main debug: Destroying the input for 'Original_File.avi' main debug: changing item without a request (current 0/1) main debug: nothing to play
Hope this help.
Hi,
Also I tried the last 2.0.6: vlc-2.0.6-20130121-0204
The result is the same than VLC 2.0.5
Here the logs:
main debug: processing request item: Original_File.avi, node: Lista de reproducción, skip: 0 main debug: resyncing on Original_File.avi main debug: Original_File.avi is at 0 main debug: starting playback of the new playlist item main debug: resyncing on Original_File.avi main debug: Original_File.avi is at 0 main debug: creating new input thread main debug: Creating an input for 'Original_File.avi' main debug: using sout chain=`transcode{venc=x264{profile=baseline},vcodec=h264,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=C:\Documents and Settings\m.lemarec\Escritorio\TEST_enc.mp4}' 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 mp4 main debug: set config option: sout-standard-dst to C:\Documents and Settings\m.lemarec\Escritorio\TEST_enc.mp4 main debug: looking for sout access module: 1 candidate qt4 debug: IM: Setting an input access_output_file debug: file access output opened (C:\Documents and Settings\m.lemarec\Escritorio\TEST_enc.mp4) main debug: using sout access module "access_output_file" main debug: TIMER module_need() : 23.755 ms - Total 23.755 ms / 1 intvls (Avg 23.755 ms) main debug: looking for sout mux module: 1 candidate mux_mp4 debug: Mp4 muxer opened main debug: using sout mux module "mux_mp4" main debug: TIMER module_need() : 0.436 ms - Total 0.436 ms / 1 intvls (Avg 0.436 ms) stream_out_standard debug: using `file/mp4://C:\Documents and Settings\m.lemarec\Escritorio\TEST_enc.mp4' main debug: using sout stream module "stream_out_standard" main debug: TIMER module_need() : 24.928 ms - Total 24.928 ms / 1 intvls (Avg 24.928 ms) main debug: stream=`transcode' main debug: looking for sout stream module: 1 candidate main debug: set config option: sout-transcode-venc to x264{profile=baseline} main debug: set config option: sout-transcode-vcodec to h264 main debug: set config option: sout-transcode-vb to 800 main debug: set config option: sout-transcode-acodec to mp4a main debug: set config option: sout-transcode-ab to 128 stream_out_transcode debug: codec audio=mp4a 0Hz 0 channels 128Kb/s stream_out_transcode debug: codec video=h264 0x0 scaling: 0.000000 800kb/s main debug: using sout stream module "stream_out_transcode" main debug: TIMER module_need() : 0.775 ms - Total 0.775 ms / 1 intvls (Avg 0.775 ms) main debug: using timeshift granularity of 50 MiB, in path 'C:\DOCUME~1\MAEB8~1.LEM\CONFIG~1\Temp' main debug: `file:///C:/Documents%20and%20Settings/m.lemarec/Escritorio/Original_File.avi' gives access `file' demux `' path `/C:/Documents%20and%20Settings/m.lemarec/Escritorio/Original_File.avi' main debug: creating demux: access='file' demux='' location='/C:/Documents%20and%20Settings/m.lemarec/Escritorio/Original_File.avi' file='C:\Documents and Settings\m.lemarec\Escritorio\Original_File.avi' main debug: looking for access_demux module: 3 candidates main debug: no access_demux module matching "file" could be loaded main debug: TIMER module_need() : 0.499 ms - Total 0.499 ms / 1 intvls (Avg 0.499 ms) main debug: creating access 'file' location='/C:/Documents%20and%20Settings/m.lemarec/Escritorio/Original_File.avi', path='C:\Documents and Settings\m.lemarec\Escritorio\Original_File.avi' main debug: looking for access module: 3 candidates filesystem debug: opening file `C:\Documents and Settings\m.lemarec\Escritorio\Original_File.avi' main debug: using access module "filesystem" main debug: TIMER module_need() : 0.466 ms - Total 0.466 ms / 1 intvls (Avg 0.466 ms) main debug: Using stream method for AStream* main debug: starting pre-buffering main debug: received first data after 0 ms main debug: pre-buffering done 1024 bytes in 0s - 11904 KiB/s main debug: looking for stream_filter module: 4 candidates main debug: no stream_filter module matching "any" could be loaded main debug: TIMER module_need() : 0.245 ms - Total 0.245 ms / 1 intvls (Avg 0.245 ms) main debug: looking for stream_filter module: 1 candidate main debug: using stream_filter module "stream_filter_record" main debug: TIMER module_need() : 0.229 ms - Total 0.229 ms / 1 intvls (Avg 0.229 ms) main debug: creating demux: access='file' demux='' location='/C:/Documents%20and%20Settings/m.lemarec/Escritorio/Original_File.avi' file='C:\Documents and Settings\m.lemarec\Escritorio\Original_File.avi' main debug: looking for demux module: 55 candidates avi debug: found Chunk fourcc:46464952 (RIFF) size:76210168 pos:0 avi debug: found LIST chunk: 'AVI ' avi debug: <list 'AVI '> avi debug: found Chunk fourcc:5453494c (LIST) size:65084 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:2 flags: HAS_INDEX TRUST_CKTYPE 720x576 avi debug: found Chunk fourcc:5453494c (LIST) size:32372 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:0x64737664 samplesize:0 25.00fps avi debug: found Chunk fourcc:66727473 (strf) size:40 pos:164 avi debug: strf: video:dvsd 720x576 planes:1 24bpp avi debug: found Chunk fourcc:78646e69 (indx) size:32248 pos:212 avi debug: indx: type=0 subtype=0 entry=1 avi debug: </list 'strl'> avi debug: found Chunk fourcc:5453494c (LIST) size:32360 pos:32468 avi debug: found LIST chunk: 'strl' avi debug: <list 'strl'> avi debug: found Chunk fourcc:68727473 (strh) size:56 pos:32480 avi debug: strh: type:auds handler:0x00000000 samplesize:4 48000.00fps avi debug: found Chunk fourcc:66727473 (strf) size:18 pos:32544 avi debug: strf: audio:0x0001 channels:2 48000Hz 16bits/sample 1500kb/s avi debug: found Chunk fourcc:4b4e554a (JUNK) size:2 pos:32570 avi debug: found Chunk fourcc:78646e69 (indx) size:32248 pos:32580 avi debug: indx: type=0 subtype=0 entry=1 avi debug: </list 'strl'> avi debug: found Chunk fourcc:5453494c (LIST) size:260 pos:64836 avi debug: found LIST chunk: 'odml' avi debug: <list 'odml'> avi debug: found Chunk fourcc:686c6d64 (dmlh) size:248 pos:64848 avi warning: unknown chunk (not loaded) avi debug: </list 'odml'> avi debug: </list 'hdrl'> avi debug: found Chunk fourcc:4b4e554a (JUNK) size:520 pos:65104 avi debug: found Chunk fourcc:5453494c (LIST) size:32 pos:65632 avi debug: found LIST chunk: 'VDEX' avi debug: <list 'VDEX'> avi debug: found Chunk fourcc:4543414c (LACE) size:2 pos:65644 avi warning: unknown chunk (not loaded) avi debug: found Chunk fourcc:20524150 (PAR ) size:10 pos:65654 avi warning: unknown chunk (not loaded) avi debug: </list 'VDEX'> avi debug: found Chunk fourcc:5453494c (LIST) size:32 pos:65672 avi debug: found LIST chunk: 'INFO' avi debug: <list 'INFO'> avi debug: found Chunk fourcc:444f4354 (TCOD) size:2 pos:65684 avi warning: unknown chunk (not loaded) avi debug: found Chunk fourcc:4f444354 (TCDO) size:10 pos:65694 avi warning: unknown chunk (not loaded) avi debug: </list 'INFO'> avi debug: found Chunk fourcc:4b4e554a (JUNK) size:1852 pos:65712 avi debug: found Chunk fourcc:5453494c (LIST) size:76133380 pos:67572 avi debug: skipping movi chunk avi debug: found Chunk fourcc:31786469 (idx1) size:9168 pos:76200960 avi debug: idx1: index entry:573 avi debug: found Chunk fourcc:4b4e554a (JUNK) size:32 pos:76210136 avi debug: </list 'AVI '> avi debug: * LIST-root size:76210176 pos:0 avi debug: + RIFF-AVI size:76210168 pos:0 avi debug: | + LIST-hdrl size:65084 pos:12 avi debug: | | + avih size:56 pos:24 avi debug: | | + LIST-strl size:32372 pos:88 avi debug: | | | + strh size:56 pos:100 avi debug: | | | + strf size:40 pos:164 avi debug: | | | + indx size:32248 pos:212 avi debug: | | + LIST-strl size:32360 pos:32468 avi debug: | | | + strh size:56 pos:32480 avi debug: | | | + strf size:18 pos:32544 avi debug: | | | + JUNK size:2 pos:32570 avi debug: | | | + indx size:32248 pos:32580 avi debug: | | + LIST-odml size:260 pos:64836 avi debug: | | | + dmlh size:248 pos:64848 avi debug: | + JUNK size:520 pos:65104 avi debug: | + LIST-VDEX size:32 pos:65632 avi debug: | | + LACE size:2 pos:65644 avi debug: | | + PAR size:10 pos:65654 avi debug: | + LIST-INFO size:32 pos:65672 avi debug: | | + TCOD size:2 pos:65684 avi debug: | | + TCDO size:10 pos:65694 avi debug: | + JUNK size:1852 pos:65712 avi debug: | + LIST-movi size:76133380 pos:67572 avi debug: | + idx1 size:9168 pos:76200960 avi debug: | + JUNK size:32 pos:76210136 avi debug: AVIH: 2 stream, flags HAS_INDEX TRUST_CKTYPE avi debug: stream[0] rate:25 scale:1 samplesize:0 avi debug: stream[0] video(dvsd) 720x576 24bpp 25.000000fps main debug: selecting program id=0 avi debug: stream[1] rate:192000 scale:4 samplesize:4 avi debug: stream[1] audio(0x1 - ) 2 channels 48000Hz 16bits avi debug: found Chunk fourcc:30307869 (ix00) size:32248 pos:67584 avi debug: indx: type=1 subtype=0 entry=500 avi debug: loading subindex(0x1) 500 entries avi debug: free chunk indx avi debug: found Chunk fourcc:31307869 (ix01) size:32248 pos:99840 avi debug: indx: type=1 subtype=0 entry=72 avi debug: loading subindex(0x1) 72 entries avi debug: free chunk indx avi debug: selected standard index for stream[0] avi debug: selected standard index for stream[1] avi debug: stream[0] created 500 index entries avi error: no key frame set for track 1 avi debug: stream[1] created 72 index entries avi debug: stream[0] length:20 (based on index) avi debug: stream[1] length:20 (based on index) main debug: using demux module "avi" main debug: TIMER module_need() : 6.417 ms - Total 6.417 ms / 1 intvls (Avg 6.417 ms) main debug: looking for a subtitle file in C:\Documents and Settings\m.lemarec\Escritorio\ main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "packetizer_copy" main debug: TIMER module_need() : 0.287 ms - Total 0.287 ms / 1 intvls (Avg 0.287 ms) main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "packetizer_copy" main debug: TIMER module_need() : 0.279 ms - Total 0.279 ms / 1 intvls (Avg 0.279 ms) main debug: starting in sync mode main debug: looking for meta reader module: 2 candidates lua debug: Trying Lua scripts in C:\Documents and Settings\m.lemarec\Datos de programa\vlc\lua\meta\reader lua debug: Trying Lua scripts in C:\Archivos de programa\VideoLAN\VLC\lua\meta\reader lua debug: Trying Lua playlist script C:\Archivos de programa\VideoLAN\VLC\lua\meta\reader\filename.luac main debug: no meta reader module matching "any" could be loaded main debug: TIMER module_need() : 1.668 ms - Total 1.668 ms / 1 intvls (Avg 1.668 ms) main debug: `file:///C:/Documents%20and%20Settings/m.lemarec/Escritorio/Original_File.avi' successfully opened main debug: Buffering 0% main debug: switching to async mode main debug: Buffering 8% main debug: Buffering 16% main debug: adding a new sout input (sout_input:00e7e158) main debug: Buffering 25% stream_out_transcode debug: creating audio transcoding from fcc=`s16l' to fcc=`mp4a' main debug: looking for decoder module: 30 candidates araw debug: samplerate:48000Hz channels:2 bits/sample:16 main debug: using decoder module "araw" main debug: TIMER module_need() : 0.353 ms - Total 0.353 ms / 1 intvls (Avg 0.353 ms) main debug: adding a new sout input (sout_input:07fff7d0) main debug: Buffering 33% main debug: looking for encoder module: 13 candidates avcodec debug: libavcodec already initialized main debug: Buffering 41% main debug: Buffering 50% main debug: Buffering 58% main debug: Buffering 66% main debug: Buffering 75% main debug: Buffering 83% main debug: Buffering 91% main debug: Buffering 100% main debug: Stream buffering done (325 ms in 5 ms) avcodec debug: found encoder MPEG AAC Audio main debug: using encoder module "avcodec" main debug: TIMER module_need() : 5.107 ms - Total 5.107 ms / 1 intvls (Avg 5.107 ms) stream_out_transcode debug: Looking for filter (s16l->f32l, channels 2->2, rate 48000->48000) main debug: looking for audio filter module: 13 candidates audio_format debug: s16l->f32l, bits per sample: 16->32 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.305 ms - Total 0.305 ms / 1 intvls (Avg 0.305 ms) main debug: Filter 'audio_format' (01d5b668) appended to chain stream_out_transcode debug: Got complete audio filter chain main debug: adding a new input mux_mp4 debug: adding input stream_out_transcode debug: creating video transcoding from fcc=`dv ' to fcc=`h264' main debug: looking for decoder module: 30 candidates avcodec debug: libavcodec already initialized avcodec debug: trying to use direct rendering avcodec debug: allowing 1 thread(s) for decoding avcodec debug: ffmpeg codec (DV Video) started main debug: using decoder module "avcodec" main debug: TIMER module_need() : 1.257 ms - Total 1.257 ms / 1 intvls (Avg 1.257 ms) main debug: looking for encoder module: 1 candidate x264 debug: version x264 0.122.X main debug: set config option: sout-x264-profile to baseline x264 debug: Limiting to baseline profile main debug: using encoder module "x264" main debug: TIMER module_need() : 16.813 ms - Total 16.813 ms / 1 intvls (Avg 16.813 ms) main debug: removing module "x264" x264 debug: framecount still in libx264 buffer: 0 main debug: Decoder buffering done in 102 ms avcodec debug: using direct rendering stream_out_transcode debug: decoder aspect is 1.777778:1 stream_out_transcode debug: source pixel aspect is 1.422222:1 stream_out_transcode debug: scaled pixel aspect is 1.422222:1 stream_out_transcode debug: source 720x576, destination 720x576 stream_out_transcode debug: encoder aspect is 46080:25920 stream_out_transcode debug: destination (after video filters) 720x576 main debug: looking for encoder module: 1 candidate x264 debug: version x264 0.122.X main debug: set config option: sout-x264-profile to baseline x264 debug: Limiting to baseline profile main debug: using encoder module "x264" main debug: TIMER module_need() : 16.622 ms - Total 16.622 ms / 1 intvls (Avg 16.622 ms) main debug: adding a new input mux_mp4 debug: adding input avi warning: cannot get packet header, track disabled main debug: EOF reached main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: removing module "packetizer_copy" main debug: killing decoder fourcc `dv ', 0 PES in FIFO main debug: removing a sout input (sout_input:07fff7d0) main debug: finished input main debug: TIMER encoding video frame : 0.003 ms - Total 13741.612 ms / 543 intvls (Avg 25.307 ms) main debug: removing module "avcodec" avcodec debug: ffmpeg codec (DV Video) stopped main debug: removing module "x264" x264 debug: framecount still in libx264 buffer: 0 mux_mp4 debug: removing input main debug: removing module "packetizer_copy" main debug: killing decoder fourcc `s16l', 0 PES in FIFO main debug: removing a sout input (sout_input:00e7e158) main debug: TIMER encoding audio frame : 0.003 ms - Total 1803.332 ms / 1168 intvls (Avg 1.544 ms) main debug: removing module "araw" main debug: removing module "avcodec" main debug: Filter 01d5b668 removed from chain main debug: removing module "audio_format" mux_mp4 debug: removing input main warning: no more input streams for this mux main debug: removing module "avi" avi debug: free chunk avih avi debug: free chunk strh avi debug: free chunk strf avi debug: free chunk indx avi debug: free chunk LIST avi debug: free chunk strh avi debug: free chunk strf avi debug: free chunk JUNK avi debug: free chunk indx avi debug: free chunk LIST avi warning: unknown chunk (not unloaded) avi debug: free chunk LIST avi debug: free chunk LIST avi debug: free chunk JUNK avi warning: unknown chunk (not unloaded) avi warning: unknown chunk (not unloaded) avi debug: free chunk LIST avi warning: unknown chunk (not unloaded) avi warning: unknown chunk (not unloaded) avi debug: free chunk LIST avi debug: free chunk JUNK avi debug: free chunk LIST avi debug: free chunk idx1 avi debug: free chunk JUNK avi debug: free chunk RIFF avi debug: free chunk LIST main debug: removing module "stream_filter_record" main debug: removing module "filesystem" main debug: Program doesn't contain anymore ES main debug: dead input main debug: destroying useless sout main debug: destroying chain... (name=transcode) main debug: removing module "stream_out_transcode" main debug: destroying chain done main debug: destroying chain... (name=standard) main debug: removing module "stream_out_standard" main debug: removing module "mux_mp4" mux_mp4 debug: Close mux_mp4 debug: movie duration 19s mux_mp4 debug: created 497 chunks (stco) mux_mp4 debug: created 497 chunks (stco) main debug: removing module "access_output_file" access_output_file debug: file access output closed main debug: destroying chain done main debug: changing item without a request (current 0/1) main debug: nothing to play qt4 debug: IM: Deleting the input main debug: Destroying the input for 'Original_File.avi' main debug: TIMER input launching for 'Original_File.avi' : 63.987 ms - Total 63.987 ms / 1 intvls (Avg 63.987 ms)
- Developer
Are you using the win64 version? If yes please try with the win32 one.
- Owner
See #8072 (closed)
- Developer
Could you try 2.2 nightlies with this bug?
- Rafaël Carré changed title from transcode h264 missing frames at end + inaccurate frame rate to transcode h264 inaccurate frame rate
changed title from transcode h264 missing frames at end + inaccurate frame rate to transcode h264 inaccurate frame rate
- Developer
frames missing at the end are a duplicate of #3178 (closed)
- Developer
2.2 nightlies should give accurate fps output
- Ilkka Ollakka added Status::fixed label
added Status::fixed label
- Ilkka Ollakka closed
closed
- MLM mentioned in issue #8072 (closed)
mentioned in issue #8072 (closed)