Rotated iPhone videos (HEVC, 90/180/270 in the tkhd matrix) play sideways or upside down on my Vero V with amcodec enabled. H.264 rotated videos play fine. Disabling amcodec fixes the orientation but stutters. Same issue as this thread and this one.
Setup: Vero V, vero5-mediacenter-osmc 21.3.0-7, kernel 4.9.269-93-osmc.
Cause
setVideoRect only writes the manual orientation (m_orientation) to /sys/class/ppmgr/orientation, never video_rotation_degree. The rotation only reaches the decoder via gcodec.param, which the H.264 decoder honours and the HEVC one ignores.
HEVC frames come out compressed (amvdec_h265 mmu_enable=1), and ppmgr does not rotate them.
With double_write_mode=1 on amvdec_h265 and the stream rotation (0-3) written to ppmgr/orientation, the video plays upright and smooth. Tested with 90, 180 and 270 clips.
Possible fix in the vero5 patch
Write (m_orientation + video_rotation_degree) % 4 to ppmgr/orientation.
Enable double write for HEVC streams with a rotation.
The rotation does now work for me for some DJI OSMO Action videos that I have but it seems a bit pixelated or moire or something, not really sure how to explain it. Good effort getting it working though.