3

I use libvlc with vlc-qt to load, modify and show various streams and videos. It works well with all videos and streams which have top-left orientation. I have a video created with a smartglass, and it has top-right orientation.

When i opened this video with the vlc media player, it showed correctly, but when i loaded it to my program, it was upside down (because of the orientation).

How can i set it in vlc-qt/libvlc to automatically adjust the frames to the orientation? Based on the vlc media player, it must be possible somehow.

If it is not possible, i would be content with knowing how to get the video orientation from libvlc.

Hajdu Gábor
  • 329
  • 1
  • 12

1 Answers1

1

i would be content with knowing how to get the video orientation from libvlc.

libvlc_video_get_track returns a struct containing a field with orientation info.

Don't think you can rotate the video from libvlc API, you will need to provide CLI arguments to VLC through your wrapper/libvlc.

See https://wiki.videolan.org/VLC_command-line_help/

Video transformation filter (transform)
 Rotate or flip the video
      --transform-type={90,180,270,hflip,vflip,transpose,antitranspose} 
mfkl
  • 1,914
  • 1
  • 11
  • 21