[ogg-dev] Variable frame rate in ogg
Ralph Giles
giles at thaumas.net
Mon Jan 30 23:04:53 UTC 2017
On 2017-01-30 2:59 PM, YIRAN LI wrote:
> I'm trying to encode variable framerate video content by libtheora and
> mux them into ogg file format.
>
> Could any one let me know if ogg format can hold variable frame rate
> content?
The ogg format can handle it, but theora codec can not; it expects the
encoding application to convert the input to a fixed-framerate stream
before compression.
You can fake it by setting the framerate to something large like 1000
fps and calling th_enc_ctl(TH_ENCCTL_SET_DUP_COUNT, ...) to specify how
many of those frames the next input should span. Some decoders will
handle this poorly, however, so it's mostly interesting if you control
the playback application as well.
If you need read variable-framerate video, I would suggest the vp9 codec
in the webm container instead.
-r
More information about the ogg-dev
mailing list