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

Option to choose output color format #516

Open
jc211 opened this issue Feb 20, 2025 · 2 comments
Open

Option to choose output color format #516

jc211 opened this issue Feb 20, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@jc211
Copy link

jc211 commented Feb 20, 2025

🚀 The feature

Hi is it possible to stop the decoder from converting a video from bgr to rgb?

Motivation, pitch

Sometimes it is better to keep the images in bgr especially if running a live system at fast speed because cameras usually output frames in bgr. I would like the decoder to replicate that behaviour.

@NicolasHug
Copy link
Member

Hi @jc211 , videos are usually stored in YUV or some kind of chroma-subsampling format, so it's neither natively RGB or BGR.

We don't allow to convert the RGB to BGR, but you can do so very easily by calling e.g. permute() on the output tensor.

@jc211
Copy link
Author

jc211 commented Feb 22, 2025

Ah ofcourse, I guess what I was asking is to choose the format it converts to to avoid double processing.

@jc211 jc211 changed the title Option to keep original format of video Option to choose output color format Feb 22, 2025
@scotts scotts added the enhancement New feature or request label Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants