ATV4K Video Rotated

Hello, new channels user here, very very nice work :clap:, goodbye tivo.

I wanted to report that with the default video driver some of my videos exported from iPhone are playing back rotated 90/180/270 degrees. Setting the video driver to the legacy one fixed it. Let me know what you need from me to debug/fix.

Some other observations with ATV4K, homepod mini stereo pair set as default audio out, in case it helps anyone.

  • Had to select the experimental audio driver otherwise I was getting audio artifacts and stuttering every 10 seconds or so.
  • Picture in picture for all video feeds (library, OTA, TVE) was missing audio and stopping after a few seconds, until I selected the legacy video driver.

Devs, any idea on this rotated video issue? I'm no longer observing the PIP issue, in fact PIP works much smoother now with the default video driver than the legacy one (which I'm using to work around this) which is why I'd like to get to the bottom of this..

To reproduce:

  1. take a video with any iPhone in portrait (non-rotated) orientation at any frame rate or resolution
  2. export it with Photos on Mac as unmodified original
  3. add it to channels as a video source
  4. play back in channels (I've tried both iOS and tvOS client) with default video driver

I noticed the raw video data of video files captured on iPhone doesn't actually have orientation coded in; they're all landscape but video streams captured in portrait orientation include "Side data" with a "displaymatrix" rotation. From ffprobe:

  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 3840x2160, 88465 kb/s, 59.88 fps, 60 tbr, 600 tbn (default)
    Metadata:
      creation_time   : 2020-07-20T01:26:37.000000Z
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
      encoder         : HEVC
    Side data:
      displaymatrix: rotation of -90.00 degrees

almost seems like the default video driver is ignoring this side data?