Skip to content

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.

Edited by Rafaël Carré
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information