Skip to content
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] initial version of simple video decoder #42

Closed
wants to merge 1 commit into from

Conversation

scotts
Copy link
Contributor

@scotts scotts commented Jun 18, 2024

Summary:
Initial version of SimpleVideoDecoder. This diff supports:

  1. Creating a simple decoder from file or tensor.
  2. Accessing frames through random access: decoder[i]. Internally, this gets a frame by index.
  3. Iterating over all available frames: for frame in decoder. Internally, this calls the core library function to get the next frame.

I did not implement slice semantics for random access yet. I think that in order to support that best we'll need to add new capabilities in the core API to support getting a batch of frames from a range. We could use get_frames_by_indices, but we would end up creating very large lists.

This is a partial implementation of the design: https://fburl.com/gdoc/hxotv2by

Reviewed By: NicolasHug, ahmadsharif1

Differential Revision: D58605628

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

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

Summary:
Pull Request resolved: #42

Initial version of `SimpleVideoDecoder`. This diff supports:
1. Creating a simple decoder from file or tensor.
2. Accessing frames through random access: `decoder[i]`. Internally, this gets a frame by index.
3. Iterating over all available frames: `for frame in decoder`. Internally, this calls the core library function to get the next frame.

I did not implement slice semantics for random access yet. I think that in order to support that best we'll need to add new capabilities in the core API to support getting a batch of frames from a range. We *could* use `get_frames_by_indices`, but we would end up creating very large lists.

This is a partial implementation of the design: https://fburl.com/gdoc/hxotv2by

Reviewed By: NicolasHug, ahmadsharif1

Differential Revision: D58605628
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d4b0111.

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 Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants