-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix _get_frames() for PyAV version 10 #256
base: main
Are you sure you want to change the base?
Conversation
Hi @BlGene! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Hi, thanks for your contribution! You should be aware, your code may not handle all cases for the Ego4D videos. Specifically you need to take into account for the video stream's start time. What is the reason for it not working with more recent PyAV versions? I think a more robust solution would be to modify the seek's performed in the code (assuming this is the reason for it not working for more recent versions). You can seek on the container using the video or audio stream's timebase: https://pyav.org/docs/stable/api/container.html#av.container.InputContainer.seek, i.e. |
Hi Miguel, The reason for it not working with the new pyav version is that with the Yes, it looks like switching to Some more notes:
Explanation of seek time bases:This is just a bit more explanation based on how I got to my solution, that hopefully clarifies the different time bases used for the seek function. I tried to seek to the old After your question, I did some more quick debugging, and it looks like there is also potentially a units problem occurring. I did the debugging using a simple call, looking for frame 1000. With Error Message
|
The notebook
_get_frames
function was broken for PyAV 10 (the requirements.txt file lists PyAV 8).To have something compatible with both av version, a specific
_get_frames
function could be selected based onav.__version__
.Note: this is a partial replacement as it ignores audio.