-
Notifications
You must be signed in to change notification settings - Fork 692
Fallback to best_effort_timestamp in case of invalid PTS #2916
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
Conversation
Thanks for making the change. it looks good to me, happy to approve once its ready |
@jdsgomes Do you know where the video "RATRACE_wave_f_nm_np1_fr_goo_37.avi" come from? |
@bjuncek do you know? |
@mthrok You can see where it comes from in this readme: https://github.com/pytorch/vision/blob/main/test/assets/videos/README and seems like the video |
@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
If the input video has invalid PTS, the current precise seek fails except when seeking into t=0. This commit updates the discard mechanism to fallback to `best_effort_timestamp` in such cases. `best_effort_timestamp` is just the number of frames went through decoder starting from the beginning of the file. This means if the input file is very long, but seeking towards the end of the file, the StreamReader still decodes all the frames. For videos with valid PTS, `best_effort_timestamp` should be same as `pts`.
@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hey @mthrok. |
If the input video has invalid PTS, the current precise seek fails except when seeking into t=0.
This commit updates the discard mechanism to fallback to
best_effort_timestamp
in such cases.best_effort_timestamp
is just the number of frames went through decoder starting from the beginning of the file.This means if the input file is very long, but seeking towards the end of the file, the StreamReader still decodes all the frames.
For videos with valid PTS,
best_effort_timestamp
should be same aspts
. [src]