VideoHelp Forum

+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Taking a 5.1 surround .mkv file and converting it to stereo mp4 using ffmpeg. My code looks like this

    ffmpeg -i input.mkv -vcodec copy -acodec libmp3lame output.mp4
    Even though input.mkv is a constant frame rate 23.98p file, what Iím getting is a variable frame rate 23.98 output file. Why is this? Thanks.
    Quote Quote  
  2. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Recommend you create a new ticket over at https://trac.ffmpeg.org/

    You'll need to post the complete un-cut log output of the ffmpeg run, and post a link to the sample input file used.

    Cheers.
    Quote Quote  
  3. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Actually, no.

    MediaInfo may report this resulting MP4 container as VFR because the generated flavour of MP4 container is able to support VFR; that doesn't certainly mean the frame actually varies, because MediaInfo did not analyse a statistic over the whole play time. And even if, the variance is probably only in very few milliseconds, you won't notice.
    Quote Quote  
  4. Interesting. I was using MediaInfo, and I also checked via VirtualDub and Adobe Premiere Pro. All three reported it as VFR...but you're right, it may not actually be.

    the generated flavour of MP4 container is able to support VFR
    Is it possible, with ffmpeg, to generate a different "flavour" of MP4 that does not support VFR? Just to be safe.
    Quote Quote  
  5. And even if, the variance is probably only in very few milliseconds, you won't notice.
    But that's the kind of thing that can make a video unreadable by standalone players. I've had an issue once with a downloaded MKV file which my brother's LG BRD player couldn't play because of a "variable framerate" flag, if I remember correctly it was solved by setting the correct framerate with TSMuxer then re-muxing it as MKV (all other methods failed).
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Originally Posted by seanmcnally View Post
    Is it possible, with ffmpeg, to generate a different "flavour" of MP4 that does not support VFR? Just to be safe.
    According to the docs it should be creating a CFR file. Try using ffprobe -show_streams to see what it says.

    Also you could try the first method here: https://trac.ffmpeg.org/wiki/How to speed up / slow down a video to recreate the the timestamps.
    Quote Quote  
  7. This is a feature, not a bug. ffmpeg uses a time base of 1/90000 for MP4 files. 24000/1001 cannot be represented exactly as N/90000 where N is an integer. It works out to 7353.75/90000. Using either 7353/90000 or 7354/90000 would result in a slow drift from the true frame rate. So ffmpeg uses a variable frame rate alternating between 3753/90000 for 1 frame and 3754/90000 for 3 frames. So technically it's variable frame rate. But it's effectively a constant frame rate.
    Last edited by jagabo; 16th Sep 2021 at 21:44.
    Quote Quote  
  8. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by jagabo View Post
    This is a feature, not a bug.


    Cough ... I used to use that phrase reasonably often, back in the day when men were men and women were less conned by advertising into spending $$ on 3/4" thick makeup
    Quote Quote