transcode to h264 mp4 always results on lost frames

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
MLM
Blank Cone
Blank Cone
Posts: 23
Joined: 03 Jan 2013 20:28
VLC version: 2.0.5
Operating System: Windows
Location: Andorra

transcode to h264 mp4 always results on lost frames

Postby MLM » 04 Jan 2013 15:22

Hi all,

After many tries transcoding to mp4, I never managed to get a file that plays without lost frames... The statistics of VLC player always shows a few lost frames...
When I re-transcode the same file, I have the same exact resulting lost frames... I have searched the forum for an explanation but I found nothing pointing to this behaviour... Surely I am doing something wrong but I do not know what (I can believe that is normal)... I used the VLC 2.0.4 and the VLC 2.0.5 version with same result on different PCs...
The code I use:

Code: Select all

vlc.exe Video_file.avi --sout=#transcode{vcodec=h264,vb=1024,acodec=mpga,ab=192,}:standard{access=file,mux=mp4,dst=TEST_enc.mp4} -vvv
Any help would be really apreciated. Thanks in advance.

SAlut, Michel.
Last edited by MLM on 04 Jan 2013 19:43, edited 1 time in total.

MLM
Blank Cone
Blank Cone
Posts: 23
Joined: 03 Jan 2013 20:28
VLC version: 2.0.5
Operating System: Windows
Location: Andorra

Re: transcode to mp4 always results on lost frames

Postby MLM » 04 Jan 2013 16:58

Hi all,

As a test, I have created on Vegas a 30 seconds file that consist of a Test Pattern Colour Bars as an AVI Pal DV rendered file...
Then, I used the VLC convert/save option to convert the file to mp4...
The resulting file played on VLC, has 2 frames lost (the first one at aprox. 10'' and the 2 at aprox. 20'')...
So, it seems that I am not able to convert a file to mp4 that plays without lost frames...
Please, if there is a procedure that I can follows to make sure that the resulting mp4 file should be correct, let me know... :-|
If it can be of help, here the verbose while converting the Test file:

Code: Select all

main debug: processing request item: Emitiendo, node: Lista de reproducción, skip: 0 main debug: resyncing on Emitiendo main debug: Emitiendo is at 0 main debug: starting playback of the new playlist item main debug: resyncing on Emitiendo main debug: Emitiendo is at 0 main debug: creating new input thread main debug: Creating an input for 'Emitiendo' main debug: using sout chain=`transcode{vcodec=h264,vb=0,scale=0,acodec=mpga,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst='C:\Documents and Settings\Administrador\Escritorio\BARRAS.mp4'}' main debug: stream=`std' 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\Administrador\Escritorio\BARRAS.mp4 main debug: looking for sout access module: 1 candidate access_output_file debug: file access output opened (C:\Documents and Settings\Administrador\Escritorio\BARRAS.mp4) main debug: using sout access module "access_output_file" main debug: TIMER module_need() : 0.828 ms - Total 0.828 ms / 1 intvls (Avg 0.828 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.346 ms - Total 0.346 ms / 1 intvls (Avg 0.346 ms) stream_out_standard debug: using `file/mp4://C:\Documents and Settings\Administrador\Escritorio\BARRAS.mp4' main debug: using sout stream module "stream_out_standard" main debug: TIMER module_need() : 1.623 ms - Total 1.623 ms / 1 intvls (Avg 1.623 ms) main debug: stream=`transcode' main debug: looking for sout stream module: 1 candidate main debug: set config option: sout-transcode-vcodec to h264 main debug: set config option: sout-transcode-vb to 0 main debug: set config option: sout-transcode-scale to 0 main debug: set config option: sout-transcode-acodec to mpga main debug: set config option: sout-transcode-ab to 128 main debug: set config option: sout-transcode-channels to 2 main debug: set config option: sout-transcode-samplerate to 44100 stream_out_transcode debug: codec audio=mpga 44100Hz 2 channels 128Kb/s stream_out_transcode debug: codec video=h264 0x0 scaling: 0.000000 0kb/s main debug: using sout stream module "stream_out_transcode" main debug: TIMER module_need() : 0.500 ms - Total 0.500 ms / 1 intvls (Avg 0.500 ms) main debug: using timeshift granularity of 50 MiB, in path 'C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp' main debug: `file:///C:/Documents%20and%20Settings/Administrador/Escritorio/BARRAS.avi' gives access `file' demux `' path `/C:/Documents%20and%20Settings/Administrador/Escritorio/BARRAS.avi' main debug: creating demux: access='file' demux='' location='/C:/Documents%20and%20Settings/Administrador/Escritorio/BARRAS.avi' file='C:\Documents and Settings\Administrador\Escritorio\BARRAS.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.417 ms - Total 0.417 ms / 1 intvls (Avg 0.417 ms) main debug: creating access 'file' location='/C:/Documents%20and%20Settings/Administrador/Escritorio/BARRAS.avi', path='C:\Documents and Settings\Administrador\Escritorio\BARRAS.avi' main debug: looking for access module: 3 candidates filesystem debug: opening file `C:\Documents and Settings\Administrador\Escritorio\BARRAS.avi' main debug: using access module "filesystem" main debug: TIMER module_need() : 0.465 ms - Total 0.465 ms / 1 intvls (Avg 0.465 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 - 15873 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.179 ms - Total 0.179 ms / 1 intvls (Avg 0.179 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.110 ms - Total 0.110 ms / 1 intvls (Avg 0.110 ms) main debug: creating demux: access='file' demux='' location='/C:/Documents%20and%20Settings/Administrador/Escritorio/BARRAS.avi' file='C:\Documents and Settings\Administrador\Escritorio\BARRAS.avi' main debug: looking for demux module: 55 candidates avi debug: <list 'AVI '> avi debug: <list 'hdrl'> avi debug: <list 'strl'> avi debug: </list 'strl'> avi debug: <list 'strl'> avi debug: </list 'strl'> avi debug: <list 'odml'> avi warning: unknown chunk (not loaded) avi debug: </list 'odml'> avi debug: </list 'hdrl'> avi debug: skipping movi chunk avi debug: </list 'AVI '> avi debug: * LIST-root size:114249216 pos:0 avi debug: + RIFF-AVI size:114249208 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 qt4 debug: IM: Setting an input avi debug: | | + LIST-odml size:260 pos:64836 avi debug: | | | + dmlh size:248 pos:64848 avi debug: | + JUNK size:2460 pos:65104 avi debug: | + LIST-movi size:114167812 pos:67572 avi debug: | + idx1 size:13744 pos:114235392 avi debug: | + JUNK size:64 pos:114249144 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: loading subindex(0x1) 750 entries avi debug: loading subindex(0x1) 108 entries avi debug: selected standard index for stream[0] avi debug: selected standard index for stream[1] avi debug: stream[0] created 750 index entries avi error: no key frame set for track 1 avi debug: stream[1] created 108 index entries avi debug: stream[0] length:30 (based on index) avi debug: stream[1] length:30 (based on index) main debug: using demux module "avi" main debug: TIMER module_need() : 2.345 ms - Total 2.345 ms / 1 intvls (Avg 2.345 ms) main debug: looking for a subtitle file in C:\Documents and Settings\Administrador\Escritorio\ main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "packetizer_copy" main debug: TIMER module_need() : 0.217 ms - Total 0.217 ms / 1 intvls (Avg 0.217 ms) main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "packetizer_copy" main debug: TIMER module_need() : 0.194 ms - Total 0.194 ms / 1 intvls (Avg 0.194 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\Administrador\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.487 ms - Total 1.487 ms / 1 intvls (Avg 1.487 ms) main debug: `file:///C:/Documents%20and%20Settings/Administrador/Escritorio/BARRAS.avi' successfully opened main debug: Buffering 0% main debug: switching to async mode main debug: Buffering 8% main debug: adding a new sout input (sout_input:04d81228) stream_out_transcode debug: creating audio transcoding from fcc=`s16l' to fcc=`mpga' main debug: looking for decoder module: 32 candidates araw debug: samplerate:48000Hz channels:2 bits/sample:16 main debug: using decoder module "araw" main debug: TIMER module_need() : 0.619 ms - Total 0.619 ms / 1 intvls (Avg 0.619 ms) main debug: looking for encoder module: 13 candidates main debug: using encoder module "twolame" main debug: TIMER module_need() : 0.358 ms - Total 0.358 ms / 1 intvls (Avg 0.358 ms) stream_out_transcode debug: Looking for filter (s16l->s16l, channels 2->2, rate 48000->44100) 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.165 ms - Total 0.165 ms / 1 intvls (Avg 0.165 ms) main debug: Filter 'audio_format' (09af1158) appended to chain main debug: looking for audio filter module: 13 candidates main debug: using audio filter module "samplerate" main debug: TIMER module_need() : 0.227 ms - Total 0.227 ms / 1 intvls (Avg 0.227 ms) main debug: Filter 'SRC resampler' (01f421e0) appended to chain main debug: looking for audio filter module: 13 candidates audio_format debug: f32l->s16l, bits per sample: 32->16 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.173 ms - Total 0.173 ms / 1 intvls (Avg 0.173 ms) main debug: Filter 'audio_format' (07271068) appended to chain stream_out_transcode debug: Got complete audio filter chain main debug: adding a new input mux_mp4 debug: adding input main debug: Buffering 16% main debug: Buffering 25% main debug: Buffering 33% 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 8 ms) main debug: adding a new sout input (sout_input:01fbb948) stream_out_transcode debug: creating video transcoding from fcc=`dv ' to fcc=`h264' main debug: looking for decoder module: 32 candidates avcodec debug: libavcodec already initialized avcodec debug: trying to use direct rendering avcodec debug: allowing 3 thread(s) for decoding avcodec debug: ffmpeg codec (DV Video) started avcodec debug: using slice thread mode with 3 threads main debug: using decoder module "avcodec" main debug: TIMER module_need() : 2.364 ms - Total 2.364 ms / 1 intvls (Avg 2.364 ms) main debug: looking for encoder module: 13 candidates x264 debug: version x264 0.125.X main debug: using encoder module "x264" main debug: TIMER module_need() : 9.543 ms - Total 9.543 ms / 1 intvls (Avg 9.543 ms) main debug: removing module "x264" x264 debug: framecount still in libx264 buffer: 0 main debug: Decoder buffering done in 18 ms avcodec debug: using direct rendering stream_out_transcode debug: decoder aspect is 1.333333:1 stream_out_transcode debug: source pixel aspect is 1.066667:1 stream_out_transcode debug: scaled pixel aspect is 1.066667:1 stream_out_transcode debug: source 720x576, destination 720x576 stream_out_transcode debug: encoder aspect is 11520:8640 stream_out_transcode debug: destination (after video filters) 720x576 main debug: looking for encoder module: 13 candidates x264 debug: version x264 0.125.X main debug: using encoder module "x264" main debug: TIMER module_need() : 7.870 ms - Total 7.870 ms / 1 intvls (Avg 7.870 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: finished input main debug: removing module "packetizer_copy" main debug: killing decoder fourcc `dv ', 0 PES in FIFO main debug: removing a sout input (sout_input:01fbb948) main debug: TIMER encoding video frame : 0.001 ms - Total 5835.447 ms / 796 intvls (Avg 7.331 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:04d81228) main debug: TIMER encoding audio frame : 0.863 ms - Total 997.721 ms / 1755 intvls (Avg 0.569 ms) main debug: removing module "araw" main debug: removing module "twolame" main debug: Filter 09af1158 removed from chain main debug: removing module "audio_format" main debug: Filter 01f421e0 removed from chain main debug: removing module "samplerate" main debug: Filter 07271068 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 warning: unknown chunk (not unloaded) 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=std) main debug: removing module "stream_out_standard" main debug: removing module "mux_mp4" mux_mp4 debug: Close mux_mp4 debug: movie duration 29s mux_mp4 debug: created 745 chunks (stco) mux_mp4 debug: created 746 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: TIMER input launching for 'Emitiendo' : 10.726 ms - Total 10.726 ms / 1 intvls (Avg 10.726 ms)
Hope someone can point me to the right direction. Thanks in advance.

SAlut, Michel.

MLM
Blank Cone
Blank Cone
Posts: 23
Joined: 03 Jan 2013 20:28
VLC version: 2.0.5
Operating System: Windows
Location: Andorra

Re: transcode to h264 mp4 always results on lost frames

Postby MLM » 05 Jan 2013 13:47

Hi all,

In trying to solve my lost frames problem, I was thinking, perhaps transcoding with 2 pass will help but I can't found how to set this pass option in the command line... I have tried adding pass=2 in the command line, like this:

Code: Select all

vlc.exe Video_file.avi --sout=#transcode{vcodec=h264,vb=1024,pass=2,acodec=mp4a,ab=192,}:standard{access=file,mux=mp4,dst=TEST_enc.mp4} -vvv
But the verbose log returns:

Code: Select all

main warning: option pass is unknown
So, how to do multi pass from the command line?
Should multi pass helps solving my issue?

As a resume:
- I can read an existing mp4 encoded file without problems with VLC...
- if I re-encode this file to mp4 (or any other file), the resulting file has always lost frames (Statistics info from VLC)...
- so, it seems that VLC can read mp4 files without problems, but not the one I encode using it...

I am out of ideas... :roll: Any help would be appreciated.

SAlut, Michel.

MLM
Blank Cone
Blank Cone
Posts: 23
Joined: 03 Jan 2013 20:28
VLC version: 2.0.5
Operating System: Windows
Location: Andorra

Re: transcode to h264 mp4 always results on lost frames

Postby MLM » 08 Jan 2013 16:12

I realize that I posted this topic in the wrong place... Sorry for that... :oops:

MLM
Blank Cone
Blank Cone
Posts: 23
Joined: 03 Jan 2013 20:28
VLC version: 2.0.5
Operating System: Windows
Location: Andorra

Re: transcode to h264 mp4 always results on lost frames

Postby MLM » 10 Jan 2013 02:06

Hi all,

In one of my trying, by error I used vcodec=mp4v instead of h264...

Code: Select all

vlc.exe Video_file.avi --sout=#transcode{vcodec=mp4v,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=TEST_enc.mp4} -vvv
the resulting file played nicely without any lost frames....

So, is It a bug of the h264 codec or?
Please, can some one try to transcode a file using this command line:

Code: Select all

vlc.exe Video_file.avi --sout=#transcode{vcodec=h264,vb=800,acodec=mp4a,ab=128,}:standard{access=file,mux=mp4,dst=TEST_enc.mp4} -vvv
and tell me if the resulting file plays with or without lost frames?

I can't find the way to solve this problem...
Give me a hand please :-|

SAlut, Michel.

MLM
Blank Cone
Blank Cone
Posts: 23
Joined: 03 Jan 2013 20:28
VLC version: 2.0.5
Operating System: Windows
Location: Andorra

Re: transcode to h264 mp4 always results on lost frames

Postby MLM » 10 Jan 2013 19:38

Hi all,

It seems I finally found something... Despite I continued not to understand what is behind it all ...

I have tried adding profile=baseline:

Code: Select all

vlc.exe Video_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
Now, the resulting file plays without lost frames... It seems that any other profile makes the resulting files to plays with lost frames (at least that is my experience)... Is it a bug, or?

SAlut, Michel.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 47 guests