-
Notifications
You must be signed in to change notification settings - Fork 161
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
Exact Seek #78
Exact Seek #78
Conversation
Signed-off-by: lixuanyi <[email protected]>
Signed-off-by: lixuanyi <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lixuanyi <[email protected]>
Signed-off-by: lixuanyi <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lixuanyi <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lixuanyi <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lizz <[email protected]>
Signed-off-by: lixuanyi <[email protected]>
This PR improves the Previously, the Based on this fact, this PR modifies the
This modification is tested on 4 different datasets with 500 videos each. We randomly sample 3 frames and decode these frames using Edit:
|
The speed of the second row looks strange. May need to find out the reason of slowness. Edit: solved. see the above edited post |
Signed-off-by: lizz <[email protected]>
awesome, first of all, thanks for putting efforts on this issue, I will dig into the solution and get back to you.
|
Edit: I will post the resize script later Edit: ffmpeg -hide_banner -loglevel panic -i 'original/$f' -vf mpdecimate,scale=-2:256 -vsync vfr -c:v libx264 -g 16 -an 'resized/$f' -y
|
@innerlee thanks, let me benchmark it first |
Thanks. If it works properly, then it might be good to fix the GPU version also. Here 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.
See comments.
Besides, I've tested with cuda build and it's fine as the changes are on higher level seeking. So if the comments are addressed I think the PR is good to go!
src/video/video_reader.cc
Outdated
@@ -281,6 +286,20 @@ bool VideoReader::Seek(int64_t pos) { | |||
return ret >= 0; | |||
} | |||
|
|||
bool VideoReader::SeekStart() { |
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.
can we merge this into a special case of Seek(0) in Seek
?
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.
Good suggestion! I have substituted the SeekStart() by Seek(0) and the decoding speed remains similar.
@innerlee @JoannaLXY Much appreciated for the awesome job in fixing this, now this PR is merged! 😸 |
This pr implements exact seeking. Details see the post below.
Note that this is tested only for the cpu version.
GPU is not checked since it is hard to compile successfully.