-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Timecode APIs #168
Comments
This is correct. Adding support for variable frame rate videos will really drive a lot of underlying API changes, which I am willing to do, but will require to rethink how timestamps are stored within PySceneDetect internally to achieve this in an efficient matter. I'll try to come up with a good design, |
I think I have a good initial design, will post here when there are some unit tests showing how timecodes will be stored in v1.0. The idea is to store both a frame number, time in seconds, framerate, and a tag if the framerate is variable or not. Unit tests should make this much more clear, so will post an update here when they are ready in the 1.0 branch. |
Timecodes as of v0.6 are now obtained directly from the underlying VideoStream (via OpenCV VideoCapture or PyAV), but timecode calculations still assume a constant frame rate. This should improve accuracy for the majority of use cases, but there still remains a significant amount of work to be done for supporting VFR material. Anyone willing to share samples for testing is encouraged to upload them here to this issue for analysis. |
I have a better idea, that is, first transcode the vfr video into a smaller size cfr video, then perform scene detection on the cfr video, and then apply the cfr timeline information to the vfr video. I have tested, is completely no problem. |
I glanced at the code, it seems to be assuming constant frame rate.
The text was updated successfully, but these errors were encountered: