-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add color_range to CodecContext/Frame #686
Conversation
@mikeboers I am not familiar with this, any thoughts? |
I like the idea. I'm intrigued by the method of passing the current range to the reformatter by respecting the frame. But we already have Casually looking at it, this block feels like it will have lots of weird state issues. I think it would be cool to:
|
By the way, could you rebase your changes, it should give you a clean CI baseline? |
4d9386c
to
79947d9
Compare
I think that it should be rebased now.
Your suggestion sound good, but I feel that I don't have a full grasp all the implications that might come from changing this section. I'll try to have look at it later (hopefully tomorrow) when I have a bit more time on my hands. |
Change-Id: I42451b3b84ea7ca4ae645566d1ef4709e0326f92
I've given your suggestion a shot. Have a look and let me know what you think! |
Should I do anything else here? |
@mikeboers as I really have no insights into this could you just let me know if this is good to merge? |
I wonder what's the status on this PR? really useful to me... |
Is this feature available in PyAv 8.0.3?
|
Unless @mikeboers objects, my only additional request here would be to have some unit tests which exercise:
|
I'm game. 👍 |
Curious on the status of this PR, as this functionality is almost mandatory on professional videos with colorspaces outside of the standard rec.709 assumptions. Thank you. |
@mikeboers @jlaine I would like to offer my services if there is anything else needed to get this PR across the finish line. I am very grateful for the existence of this library. It has helped immensely at my place of work in doing what we do. This PR would really allow add that extra polish to something I'm working on at work. You should let me help. What can I do? |
As an outsider (but also user of this library) I think that generally the norm in the open source community is to:
|
@WyattBlue I think something went badly wrong with your git manipulation, there are now ten of commits in this PR? |
@jlaine I think I reverted those dummy commits. Didn't know merging in a fork would edit the PR. |
b30b035
to
6b7747a
Compare
Hi!
I recently found PyAV, and I am very impressed with how flexible and powerful it is compared to my old go-to-solution, which was calling ffmpeg with a subprocess call! :)
I realized that the color_range option was not implemented so I gave it a shot. Specifically, this can be needed when the default color range for YUV (0-255 or 16-235) needs to be overridden for a codec.
Since I am not deeply familiar with PyAV or the FFmpeg source code, my approach might not be the way to go, and if so I'm happy to update it based on your suggestions. In particular, the change in reformatter.pyx doesn't seem like the right solution to me. As far as I can tell it works as intended, but it definitely has a smell to it...
Also, some tests should probably also be added for this. I don't know if it's enough to test that the color_range property is set as expected when provided as an option, or if some decoding with different color_ranges are preferable?