You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, the fps gets rounded, which makes it hard to transform an existing video's frames while keeping the source fps in the resulting video (so that it e.g. doesn't lose sync when you add audio to it or subtitles or anything else).
Even the metadata['fps'] is rounded when checking the fps of an existing video since it gets parsed from ffmpeg output header.
The output fps could indeed be fixed, but I think for reading the exact fps, ffprobe is needed (the ffmpeg binary only prints the fps rounded to two decimals), but apparently that dependency is not part of this library, so it can't be done.
https://github.com/imageio/imageio-ffmpeg/blob/0585a7b5fa0ea0628712b319ff898ad6f537b03e/imageio_ffmpeg/_io.py#L528C4-L528C65
Here, the fps gets rounded, which makes it hard to transform an existing video's frames while keeping the source fps in the resulting video (so that it e.g. doesn't lose sync when you add audio to it or subtitles or anything else).
Even the metadata['fps'] is rounded when checking the fps of an existing video since it gets parsed from ffmpeg output header.
My workaround for getting the fps is:
And the workaround for specifying the fps is:
or
But it would be best if imageio handled exact frame rates out of the box without rounding.
The text was updated successfully, but these errors were encountered: