dukebw / lintel

A Python module to decode video frames directly, using the FFmpeg C API.
Apache License 2.0
261 stars 38 forks source link

Adds seeking to loadvid_frame_nums, and fixes a bug causing total_siz… #8

Closed dukebw closed 6 years ago

dukebw commented 6 years ago

…e_bytes to

be wrong in both ops.

Seeking in loadvid_frame_nums is only frame-accurate if the video has a fixed frame rate, otherwise the seeking approximates the frame number by the duration of the video (in video stream time_base units) divided by the average frame time.

Run the new test:

lintel_test --filename <filename> --height <height> --width <width> --frame-nums --should-seek --start-frame <start-frame>