Skip to content

Conversation

@ahmadsharif1
Copy link
Contributor

Summary:
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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 12, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 12, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 12, 2024
…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
ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 12, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 12, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 12, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 12, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 13, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 13, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 13, 2024
…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
ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 13, 2024
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

ahmadsharif1 added a commit to ahmadsharif1/torchcodec that referenced this pull request Aug 13, 2024
…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
…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
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61139386

@facebook-github-bot facebook-github-bot merged commit 9fb4035 into meta-pytorch:main Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants