Phone video orientation issue
#1
*posted initially on osmc forum but they suggested posting over here. Using OSMc on Raspberry pi.

Sorry if this has an answer elsewhere - There’s a few topics I’ve found related to this but none with an answer my simple mind understands as to whether it’s fixable.

I have a load of home videos taken on phones - some of which are portrait or wrong orientation. Kodi used to sort this out (i guess it recognised the ‘tag’ from the phone somewhere) and they’d play the correct orientation but at some point (assume with an update) this stopped working. Portrait videos play flipped and squashed and rotating within Kodi doesn’t fix it. Landscape videos, if taken on the phone upside down, will play upside down. For what it’s worth the thumbnail extracted from the video displays correctly so it must know the orientation somewhere!

Is there a way to resolve this or did something change with the way it handles ‘incorrectly’ filmed videos from phones that is now unfixable?
Reply
#2
The Kodi DRM renderer doesn't support rotation of video. I suspect it will work if you disable DRMPRIME decoder in settings/video, but performance may be worse.
Reply
#3
I know it’s been a long time since this but I’ve still not found a resolution that works for me.

Correct - if I disable DRMPrime the rotation is OK but videos unwatchable.l in terms of performance.

Any ideas if any way to resolve or am I stuck and need to go elsewhere from Kodi to play home videos? They all used to work fine on previous Kodi versions.
Reply
#4
I have the same problem. Works with DRMPrime off, but too slow on an RPi4. Interestingly when I manually select a rotation, the video is not warped and rotated but just rotated wrongly.

The video is rotated by 90° to the left and scaled down that it fits hight. After rotating it by 90°, it is just rotated by 90° to the left and scaled up that it fits width.
Log file:
Quote:2023-02-22 16:21:05.312 T:26563    INFO <general>: Creating InputStream
2023-02-22 16:21:05.340 T:26563    INFO <general>: Creating Demuxer
2023-02-22 16:21:05.346 T:26563    INFO <general>: Opening stream: 0 source: 256
2023-02-22 16:21:05.346 T:26563    INFO <general>: [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 29.970, 3D: false
2023-02-22 16:21:05.346 T:26563    INFO <general>: Display resolution ADJUST : 1920x1080 @ 59.940063 Hz (20) (weight: 0.000)
2023-02-22 16:21:05.387 T:26157    INFO <general>: VideoPlayer: OnLostDisplay received
2023-02-22 16:21:05.387 T:26157    INFO <general>: GLES: Maximum texture width: 4096
2023-02-22 16:21:05.388 T:26563    INFO <general>: Creating video codec with codec id: 173
2023-02-22 16:21:05.388 T:26563    INFO <general>: CDVDVideoCodecDRMPRIME::Open - using decoder HEVC (High Efficiency Video Coding)
2023-02-22 16:21:05.391 T:26563    INFO <general>: Opening stream: 1 source: 256
2023-02-22 16:21:05.391 T:26563    INFO <general>: Finding audio codec for: 86018
2023-02-22 16:21:05.392 T:26563    INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2023-02-22 16:21:05.430 T:26157    INFO <general>: VideoPlayer: OnResetDisplay received
2023-02-22 16:21:05.451 T:26569    INFO <general>: CVideoPlayerAudio: display reset occurred, checking for passthrough
2023-02-22 16:21:05.452 T:26569    INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2023-02-22 16:21:05.481 T:26157    INFO <general>: [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 29.970, 3D: false
2023-02-22 16:21:05.482 T:26157    INFO <general>: Display resolution ADJUST : 1920x1080 @ 59.940063 Hz (20) (weight: 1080.000)
2023-02-22 16:21:05.531 T:26157    INFO <general>: [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 29.970, 3D: false
2023-02-22 16:21:05.532 T:26157    INFO <general>: Display resolution ADJUST : 1920x1080 @ 59.940063 Hz (20) (weight: 0.000)
2023-02-22 16:21:16.153 T:26569    INFO <general>: CVideoPlayerAudio:Tonguerocess - stream stalled
2023-02-22 16:21:16.278 T:26563    INFO <general>: Process - eof reading from demuxer
2023-02-22 16:21:16.278 T:26563    INFO <general>: CVideoPlayer::OnExit()
2023-02-22 16:21:16.278 T:26563    INFO <general>: VideoPlayer: eof, waiting for queues to empty
2023-02-22 16:21:16.278 T:26563    INFO <general>: Closing stream player 1
Reply
#5
@scruffy123 
Quote:The Kodi DRM renderer doesn't support rotation of video.
your answer is already posted above you
any weird resolution or rotation is a result of your device, your device likely being a phone or tablet its support is implicit not explicit
Reply
#6
Try setting the rendering mode to EGL instead of direct-to-plane. For me it solved the problem.
Reply
#7
Appreciate the suggestion but it doesn’t work. Videos won’t play and get sad face icon on the screen.

Looks like home videos a no-go.
Reply

Logout Mark Read Team Forum Stats Members Help
Phone video orientation issue0