-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Fast seek implementation #3179
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
Fast seek implementation #3179
Conversation
For some reason it's not allowing me to push it to fbsync, I've tried twice and it always sends me back to master? |
Codecov Report
@@ Coverage Diff @@
## master #3179 +/- ##
=======================================
Coverage 73.48% 73.48%
=======================================
Files 99 99
Lines 9230 9230
Branches 1476 1476
=======================================
Hits 6783 6783
Misses 1991 1991
Partials 456 456
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bjuncek, could you also resolve the merge conflicts?
test/test_video.py
Outdated
|
||
self.assertTrue(len(av_keyframes) == len(vr_keyframes)) | ||
# NOTE: this video gets different keyframe with different | ||
# loaders (0.333 pyav, 0.666 for us) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know the reason for this?
test/test_video.py
Outdated
vr_keyframes = [] | ||
if av_reader.streams.video: | ||
|
||
# get all keyframes using pyav. Then, seek randomly into video reader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should go before the if
statement as it describes the entire chunk of code from line 417 onwards, not just the if
block.
I can't import this PR internally to run tests due to merge conflicts. Could you please fix them? Thanks! |
@bjuncek Just wanted to clarify why the PR contains As far as I understand, please correct me if I'm wrong, this is a brand new PR you wrote (it doesn't come from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @bjuncek! One minor comment.
@datumbox sorry, my bad - Francisco told me that adding fbsync tag would import it into fbcode; removed now. |
Hey @prabhat00155! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Summary: * modify processPacket to support fast seek * add fastSeek to ProcessPacket decoder definition * add fastseek flag to DecoderParametersStruct * add fastseek flag to the process packet call * no default params in C++ implementation * enable flag in C++ implementation * make order of parameters more normal * register new seek with python api * [somewhat broken] test suite for keyframes using pyav * revert " changes * add type annotations to init * Adding tests * linter * Flake doesn't show up :| * Change from unitest to pytest syntax * add return type Reviewed By: kazhang Differential Revision: D32216689 fbshipit-source-id: 695975c2930cb663ea82c83e4bc924a09e124a7d Co-authored-by: Prabhat Roy <[email protected]>
* modify processPacket to support fast seek * add fastSeek to ProcessPacket decoder definition * add fastseek flag to DecoderParametersStruct * add fastseek flag to the process packet call * no default params in C++ implementation * enable flag in C++ implementation * make order of parameters more normal * register new seek with python api * [somewhat broken] test suite for keyframes using pyav * revert " changes * add type annotations to init * Adding tests * linter * Flake doesn't show up :| * Change from unitest to pytest syntax * add return type Co-authored-by: Prabhat Roy <[email protected]>
Implementation of the fast seek; rebase of the #3015
@fmassa can you please pull it in fbcode to check if ok?
rebased on the latest master
cc @pmeier