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

Add Rotation, Width, Height, to MediaInfo #633

Open
2 of 5 tasks
kgreen opened this issue Nov 3, 2022 · 0 comments
Open
2 of 5 tasks

Add Rotation, Width, Height, to MediaInfo #633

kgreen opened this issue Nov 3, 2022 · 0 comments

Comments

@kgreen
Copy link

kgreen commented Nov 3, 2022

Issue Title (Add Rotation, Width, Height, to MediaInfo)

When attempting to get the Width and Height of a video before it is loaded, it would be nice to have those values as public properties on the MediaInfo object returned from Library.RetrieveMediaInfo. I can get PixelWidth and PixelHeight from the StreamInfo object found in MediaInfo.BestStreams, but even then if the video is portrait (rotation -90 for .mov files for instance), PixelWidth and PixelHeight do not reflect this. Rotation is not exposed and at this point I am using metadataextractor to get this information.

Issue Categories

  • Bug
  • Feature Request
  • Question
  • Not sure

Version Information

  • NuGet Package 4.4.350

Expected Results

-MediaInfo will have public properties for Width, Height, and Rotation

Sample Code

--Would love something like this:

C#

MediaInfo info = Library.RetrieveMediaInfo(MediaItem.FilePath);
int height = info.PixelWidth//if its a 1080 x 1920 portrait video this value would be 1920
int width = info.PixelHeight//if its a 1080 x 1920 portrait video this value would be 1080
int rotation = info.Rotation //for example -90 for a portait .mov file from an iphone
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

1 participant