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

Does VideoDecoder supports customized filter graph descriptors? #495

Open
YANG-H opened this issue Feb 4, 2025 · 1 comment
Open

Does VideoDecoder supports customized filter graph descriptors? #495

YANG-H opened this issue Feb 4, 2025 · 1 comment

Comments

@YANG-H
Copy link

YANG-H commented Feb 4, 2025

🚀 The feature

For example, I'd like to resize the video frames before actually decoding them. The best way might be using a filter graph string in ffmpeg. What is the best practice for torchcodec? Does torchcodec supports customized filter graph strings in python?

Motivation, pitch

No response

@YANG-H YANG-H changed the title Does VideoReader supports customized filter graph descriptors? Does VideoDecoder supports customized filter graph descriptors? Feb 4, 2025
@NicolasHug
Copy link
Member

Hi @YANG-H , we don't support custom filters or resizing at the moment. We may support those in the future, but we'll want to be careful because models tend to be sensitive to resizing algorithm, i.e. it's very important for the resizing strat to be consistent between training and inference, and there many different resizing strategies: bilinear, bicubic, with/without antialiasing, on float/uint8, etc.

We'll want to make sure the resizing exposed by ffmpeg is/can be consistent with the ones we have in pytorch.

For now, the recommended solution is to rely on torchvision's transforms, which can natively handle NHWC videos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants