-
Notifications
You must be signed in to change notification settings - Fork 378
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature request: Add side_data attribute to Stream #1150
Comments
I made this PR on my own fork. It only fetch the DISPLAYMATRIX but would be happy to implement more and submit a PR to this repo if anyone is interested |
@hyenal I'd be really interested in having this functionality upstreamed to @jlaine or @WyattBlue are probably in a better position to judge how this should be implemented best to make it consistent with the way frame side data is handled. I'm happy to help out and write some test cases if that would be helpful. |
Thanks @lgeiger, so happy to see this getting momentum! It looks like it's been merged in @WyattBlue repository and will be available in PyAv soon? I am also happy to write some tests if this helps :) |
Yes, it's already available on pypi though this causes dependency conflicts for me as I am relying on a different package that requires |
I see thanks for the explanation! Let's wait for an answer from maintainers then, I am hopeful this could be merged 🙏 |
Sure, @hyenal Make a new PR for this repo. |
@lgeiger do you have some tests in mind ? As far as I understood we rely on FATE to get video samples, I hope those have a sample with a non zero display matrix so that we could write a test easily. I intend to do this next week so if you it's a blocker for you I d be happy to invite you as a contributor to my PR :) |
Not really. I probably could share some example videos but I guess it would be better to get them from FATE.
That's great, thanks for working on it. It's not a blocker for me anymore. For reference, we ended up using pymediainfo to read the rotation information from the video files and handle them accordingly via Numpy which works well for our use case but it would still be great if this would be natively supported in av. |
We're planning to remove Stream.side_data (#1570) in PyAV 14 since FFmpeg doesn't even document I think there will be some alternative API, but we're waiting for FFmpeg 8 to be released. |
@WyattBlue thanks for the heads up. What's the recommended way of checking whether the video content needs to be rotated with PyAV? As far as I can tell without Of course this can be checked via As far as I can tell correct handling of rotation is the reason why some upstream packages still rely on av < 10 (see #1045). |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Overview
Sometimes a stream encodes side data in the entire stream (in side_data). Some of those side data are quite essential to read the video correctly.
For instance
displaymatrix
sometimes encode whether the video is rotated or not.From the AV documentation it seems like we could know easily if there is side data with the attribute
nb_side_data
.I would like to know if this is an interesting feature for this library ? I started a fork there with, for now, a simple skeleton of how it would look like
Desired Behavior
When reading a video (or any other stream) you would get the side data as a dictionary:
The text was updated successfully, but these errors were encountered: