Radiokot / photoprism-android-client

📸 A convenient Android gallery for your PhotoPrism library with plenty of useful features
https://radiokot.com.ua/p/photoprism-android-gallery
GNU General Public License v3.0
391 stars 30 forks source link

Videos taken in portrait mode are not rotated properly on Android TV #70

Open linosgian opened 1 year ago

linosgian commented 1 year ago

What is wrong? Any video on an Android TV, plays back stretched and not rotated to fit on the screen. The same videos work fine on several android phones I've tried.

To Reproduce Steps to reproduce the behavior:

  1. Sideload the apk on an Android TV
  2. Play any video taken in portrait

Expected behavior The video plays as it was taken, same way it does on an android phone.

Screenshots IMG20230802163940

Device (please complete the following information):

Radiokot commented 1 year ago

Hi. Could you please send me the example file?

linosgian commented 1 year ago

I've looked into this a little more, and it looks like that if I try to play any video taken in portrait, it becomes streched as shown in the screenshot. If I then press the back button and retry to view, the video plays back as it's supposed to (in the correct orientation). Then same can be done by moving to another video/photo and back to the video I'm trying to play.

An email should be coming your way with a sample (used WeTransfer so the link will remain valid for a week)

Radiokot commented 1 year ago

Thanks, I've received your sample.

Radiokot commented 1 year ago

So far, I have not been able to reproduce the issue on my devices, but I'll keep it in mind.

linosgian commented 1 year ago

Quick update: I've recently got my hands on a Nvidia Shield, which is more powerful than my TV, and I can't reproduce this issue on it.

Radiokot commented 1 year ago

When I searched for a potential cause of the issue, other developers blamed device-specific video codecs that can't handle rotation metadata properly. Maybe modern codecs on phones and NVIDIA SHIELD have the proper handling.

Was it easy to install the app on this device?

linosgian commented 1 year ago

I see, that makes sense.

Yeah, as easy as any android TV, I sideloaded it just fine with a USB stick.

YoranSys commented 1 year ago

Hello, I have the same issue with a Sony Bravia 2023 TV.

Radiokot commented 8 months ago

Hey @YoranSys and @linosgian, the latest release has the player library updated, which may fix the issue. Consider checking it out.

isaranghi commented 7 months ago

I just tried that on Fire TV stick and same issue... portrait video not getting rotated properly..... I tried browsing my photoprism library on Web on FireTV and that is working fine....

Radiokot commented 7 months ago

Sad :(

langyxxl commented 6 months ago

Hello, I have the same issue with a Sony 65X91J XR TV. I find something different, I use scrcpy from my mac to remote control tv, the scrcpy's screen on mac rotation is correct, at the samtime the screen on tv show rotation is wrong. Maybe tv problem?

langyxxl commented 4 months ago

This problem can be fixed use a external player like mpv-android