constant frame rate impossible?

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.
uibkdigi
Blank Cone
Blank Cone
Posts: 14
Joined: 25 May 2011 09:17

constant frame rate impossible?

Postby uibkdigi » 20 Jun 2012 09:35

Hi,

does anyone know how to force a constant frame rate on VLC (2.0.1)? I am trying to transcode raw avi files with VLC, wich works fine basically, but the problem is that I cannot seem to produce files with a constant frame rate of 25 fps. The original files DO have 25 fps. The transcoded ones have rates of 24.996, 25.523 etc., but never precisely 25, and mediainfo displays "framer rate mode: variable". This is a problem later on when I want to edit the files: audio goes out of sync when i cut the files. I have tried the fps parameter in any possible combination. Below is the line I use for transcoding. I have been fighting with this problem for months (using different versions of VLC, also nightly builds). Please help!

start "C:\VideoLAN\VLC\vlc.exe" -vvv inputfile.avi --sout=#transcode{vcodec=mp4v,vb=5600,fps=25,scale=1,acodec=mp4a,ab=192,samplerate=48000}:standard{access=file,mux=mp4,dst="Y:\Output\outputfile.mp4"} vlc://quit

PS: OS is windows 7 64 bit

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: constant frame rate impossible?

Postby VLC_help » 22 Jun 2012 18:54

Does that happen if you lossless codec like huffYUV and AVI output? (vcodec=HFYU)

uibkdigi
Blank Cone
Blank Cone
Posts: 14
Joined: 25 May 2011 09:17

Re: constant frame rate impossible?

Postby uibkdigi » 26 Jun 2012 16:41

No, with huffman, for which I have to change to the avi muxer, because obviously it isn't supported in mp4, it works: media info shows 25.000 fps (but no indication of the frame rate mode). One other detail that may be interesting: some of the files with mp4v codec in the mp4 container that VLC produces DO show 25 fps in the codec info of VLC, but media info still shows "frame rate mode: variable" and indicates a minimum and a maximum framerate, which, however, are NOT 25.000 but something like 24.892 or similar values. What do you think the problem is? The way I see it, the mp4 muxer does not set the frame rate mode correctly...

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: constant frame rate impossible?

Postby VLC_help » 30 Jun 2012 23:21

If you remux the MP4 file with mp4box, does it report different values?

SarasotaSlim
Blank Cone
Blank Cone
Posts: 42
Joined: 15 Jun 2010 01:56
VLC version: 2.0.5
Operating System: Windows / Mac OS
Location: New Hampshire, USA

Re: constant frame rate impossible?

Postby SarasotaSlim » 09 May 2016 17:46

I've been transcoding with VLC now for at least 4 years, and I too have tried and failed
to find a way to get a variable-framerate input file to convert to a fixed-frame rate.

[ I too use the cmd-line method in VLC to transcode. And I use the cmd-line pgm 'mediainfo'
to look at any given video-container to see all the meta-data values.]

Note: If VFR, then mediainfo shows a framerate 'mode' line and 3 value lines...a min and a
max and the nominal value, but if it's FFR, then
there's no specific 'mode' shown...just a single nominal floating-point value for the framerate.

Ok, there IS a VLC parameter of --sout-transcode-fps='<float>'
So, last nite I stumbled upon an answer.

The 'trick' is to choose a value DIFFERENT from what mediainfo
nominal value shows! So, if mediainfo shows fr=23.976, and max and min of
some slightly diff values, do NOT choose the value 23.976. If
you do, it still comes out variable. You gotta choose something
else! (As to how-much different...who knows! More damn trial-and-error
tests to figure that out. Sigh.)

[Fwiw, I've been choosing a somewhat higher value of 30.0 in my transcode
cmd-line, which of course will make the file-size somewhat larger, than
an input of only 23.976, but I got no problem there.]

The remaining PROBLEM is that there really needs to be an explicit way to
ask for either fixed or variable mode. The problem now is that you must
to LOOK at every input file (e.g. to be sure the variable nominal value is not
already your chosen 30.0). My input files can be of various container-types, codecs, and
framerates, and I'd much prefer to NOT have to even look at what 'mode' each
file is already in, and the value(s)...I just want to specify a fixed-framerate value
and a mode and transparently get the desired result.

Hope this is helpful...

Slim :geek:
HINT: My common VLC-usage is to transcode (via 'sout') to add on-screen 'Marquee' info,
and for that, I still use VLC v2.0.5, since marquee metadata-expansions ($-symbols) work there.

[ The VLC-version 2.x code beyond 2.0.5 remains 'broken' for that marquee functionality, tho there IS
an open and accepted bug-report on that...i.e. ticket #9514 ]


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests