1
  • I wish to change just the framerate of a VP9 encoded webm file.
  • The source file has a framerate of 1000 FPS, and I'd like to change it to 30 FPS, without affecting the video/audio in any other way.
  • I'm a completely blank slate at video encoding/editing. No prior experience/knowledge
  • Google had no answers for me

Questions:

  1. Is there a way to do it? I'm using Ubuntu 14.04
  2. Will lowering the framerate mean lowered CPU usage?
1

This has come up before for other codecs / containers.

This DOESN'T work in ffmpeg without transcoding, since ffmpeg unfortunately isn't set up for messing with timestamps on non-decoded frames.

I think you should be able to do it with this (untested):
mkvmerge --default-duration 0:30fps in.webm -o out.webm

Where 0 is the track-id of the video track. Check the man page for mkvmerge for more details. Note that it says that --fix-bitstream-timing-information is only implemented for h.264 currently, so your output will have a vp9 stream that probably still says it's 1000 fps, but the container will have frame timestamps at 30fps. Players almost always use container presentation-timestamps, though.

If there is audio with the video, I assume it's the right length for the video being 30fps? Otherwise that's a big stretch needed...

  • I did not know that it was possible for a video's metadata to show 1000 fps but be 30 fps instead. Maybe that's what is happening in my source video? Is there a way to check? – user9239 Jan 29 '15 at 16:45
  • Well some video codecs can store an FPS in the bitstream, separate from the timestamps in the container. A quick google found this link that might help explain why there are multiple layers of things. pitivi.org/manual/codecscontainers.html. edit: and here's a link that looks better, in more detail. library.rice.edu/services/dmc/guides/video/… – Peter Cordes Jan 29 '15 at 23:37
  • There must be a good FAQ for stuff like this somewhere? Anyone have a link that makes a good boilerplate answer to give to confused beginners? – Peter Cordes Jan 29 '15 at 23:42
  • To answer your question: you could say that the ACTUAL fps of your video was the real time interval between the frames that the camera recorded. If you play it back at a different FPS, time in the displayed video will be sped up or slowed down. – Peter Cordes Jan 29 '15 at 23:43
  • oh, and also, how did you determine it was 1000fps? mplayer shows 1000fps for some variable-frame-rate files, just as a placeholder. Unless you did something weird, or there's a bug in something you used (certainly possible since VP9 is still new), it's highly unlikely you really have a video that will play at 1000fps. – Peter Cordes Jan 29 '15 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy