minimp4.rs
minimp4.rs copied to clipboard
Support variable framerate videos
Hi, first of all thanks for maintaining this crate, it helped me a lot!
One feature was missing for me, namely muxing video samples with variable duration. For use cases where the framerate isn't constant, eg. live video feeds, we want to show some frames for longer and other for a shorter period of time – sometimes frames come at rate 1 every couple of seconds (when nothing happens on the screen), sometimes they come at 60 FPS (when there's lot of movement).
This PR introduces write_video_with_duration, which allows to write video frames with specific duration for such use cases.