-
Notifications
You must be signed in to change notification settings - Fork 68
[torchcodec] Return subsequent frame if FFMPEG seeks past end of the frame #178
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
[torchcodec] Return subsequent frame if FFMPEG seeks past end of the frame #178
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
066f137 to
c9bb63a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
c9bb63a to
1a36dea
Compare
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
1a36dea to
87350b9
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
87350b9 to
a8335aa
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
a8335aa to
317d32a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
317d32a to
9cf11fc
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
9cf11fc to
10577b2
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Differential Revision: D61139386
10577b2 to
f4b70b1
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Reviewed By: NicolasHug Differential Revision: D61139386
f4b70b1 to
d6d70ad
Compare
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Reviewed By: NicolasHug Differential Revision: D61139386
d6d70ad to
d64946a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Reviewed By: NicolasHug Differential Revision: D61139386
d64946a to
31adc68
Compare
…frame (meta-pytorch#178) Summary: Pull Request resolved: meta-pytorch#178 The way get_frame_displayed_at works is as follows: We call avformat_seek_file with: `min_ts=-inf ts=timestamp max_ts=timestamp` https://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30 This should in theory never seek past our timestamp. However for some videos ffmpeg does seek past our timestamp. And that causes us to never return a valid frame in that case. The fix is to warn the user and return the first frame after the timestamp if this ever happens. Reviewed By: NicolasHug Differential Revision: D61139386
31adc68 to
b1d4996
Compare
|
This pull request was exported from Phabricator. Differential Revision: D61139386 |
Summary:
The way get_frame_displayed_at works is as follows:
We call avformat_seek_file with:
min_ts=-inf ts=timestamp max_ts=timestamphttps://ffmpeg.org/doxygen/7.0/group__lavf__decoding.html#ga3b40fc8d2fda6992ae6ea2567d71ba30
This should in theory never seek past our timestamp.
However for some videos ffmpeg does seek past our timestamp.
And that causes us to never return a valid frame in that case.
The fix is to warn the user and return the first frame after the timestamp if this ever happens.
Differential Revision: D61139386