Skip to content

Conversation

@michal-lightly
Copy link
Contributor

@michal-lightly michal-lightly commented Nov 24, 2025

What has changed and why?

Fix frame orientation issue.

We use two libraries to load videos:

  • PyAV when indexing the video
  • OpenCV when serving a single frame (due to its speed)

However, OpenCV does not read video metadata properly and can return frames in wrong orientation

Solution

During indexing, use PyAV to get frame orientation. Note that PyAV only makes this metadata available on the frame level, not on the video level.

Considered options

ffmpeg-python exposes ffmpeg.probe() function that returns the metadata. However, it calls ffmpeg in a subprocess and thus is not suitable for use with cloud storage.

How has it been tested?

Loaded a video dataset that was previously displayed wrong.

Did you update CHANGELOG.md?

  • Yes
  • Not needed (internal change)

Copy link
Contributor

@horatiualmasan horatiualmasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

4 participants