How do I rotate the screen to play portrait video 1080x1920? Raspberry Pi 3 B+ (Raspberry Pi OS Lite 64bit + Anthias v0.20.3)

@andreaSC, thanks for sharing the details on how you attempted to rotate the display. Let me check if automatic rotation is done on a software level on an x86 machine. If so, I’ll take a look on it and apply fixes.

@andreaSC, I tried changing the rotation setting (90 degress) via GRUB. I tried switching to terminal mode and it worked. I tried playing videos on host via ffplay (I installed ffmpeg) and it still plays in landscape.

I tried running ffplay -fs -loop 0 -vf “transpose=1” /path/to/video.mp4 and the video now plays in portrait.

I can confirm that this is a software-level issue. I’ll keep you posted for more details and updates.

Thank you for your patience.

thank you @nicomiguelino

Grazie mille, attendo anche io aggiornamenti.

@caimano, @andreaSC
I’m currently other relevant tasks on the side but I wanted to share the link to the pull request that I’m working on—feat: add support for rotating content (videos, images, web pages) by nicomiguelino · Pull Request #2568 · Screenly/Anthias · GitHub.

I’m planning to add support for rotating content via the web UI. This means that I have to make changes to the web interface and the web view.

If you have a GitHub account, feel free to add comments there as well. It doesn’t have to be low-level. It can be functional suggestions.

I’ll keep you posted.

@caimano, @andreaSC I played around with different configurations for video playback but it still plays the video in landscape. I haven’t fixed rotation issues for the images yet.

I’ll keep you posted.

Thanks for the update.

thanks a lot for your work @nicomiguelino

I have exact the same problems as caimano, installed Bullseye lite on a 4B, then installed Anthias via terminal, changed the config.txt the same way.

Anthias is now running portrait (anti-clockwise), but it does not play videos (1080x1920), does not display pictures neither URLs. It just shows the logo screen, occasionally the screen flickers black/white, then again the logo.

maybe i found something: in the folder /home/user/.screenly you will find the screenly.conf. It seems that there are stored the preferences you can option in the settings menu (Date format, Player name etc). But there is a setting you can’t option for named ‘resolution’. It is set to 1920x1080. I changed it to 1080x1920 and now the player is working at least its showing pictures! In correct portrait orientation! But still no videos displayed. And an URL, but not for 10 seconds, only very short, and only for one time. Hope this helps a bit, seems that basically the player runs after changing this setting. Now perhaps we should concentrate on the video player settings itself??

Keep up the good work, nicomiguelino ! Thank you very much !

Thanks, @piroer. I’ll take note of that.

Hi @nicomiguelino , Happy New Year!. Do you have any updates on this issue? Thanks.

informative, thanks for sharing . good one

@caimano, thank you for following up. I’m still jumping between tasks in Anthias but I’m still keeping an eye on this one.

@nicomiguelino. Hi, I replaced 25 of my older RPI 3 model B+ with new RPI 4 8GB. I’ve found the PI 4 (after testing one with Anthias for about 2 months) to be much faster than the older PI 3 model B+, both during setup and when playing content. I’d like to take full advantage of the device, but also with videos. Any news on the tests to resolve the vertical video issue? Thanks a lot, and keep up the good work.

@caimano, there aren’t any news yet, but feel free to share your thoughts here if something comes up. Thank you as well.

@nicomiguelino . Hi, I just tried the new version of Anthias v0.20.5 on a Raspberry Pi 3 B+ with Bookworm 64-bit Lite. The vertical video problem hasn’t been solved. The Raspberry keeps rebooting if I try to play a vertical MP4 video. At this point, I wanted to know two things from you. 1) What method do you recommend for rotating the video 90°? 2) Have you managed to solve this problem in this release? - I usually edited the \boot\firmware\config.txt file by putting a # in front of the line: dtoverlay=vc4-kms-v3d and then at the bottom of the file I inserted this command: display_hdmi_rotate=3 or display_rotate=3. Doing this causes the screen to rotate. However, if I try to remove the image and play a vertical video, Anthias has the same problem as the previous version, 0.20.4. What do you recommend trying?

@nicomiguelino . Hi, I just tried the new version of Anthias v0.20.5 on a Raspberry Pi 3 B+ with Trixie Pi OS Lite 64-bit too. Anthias has the same problem as the previous version, 0.20.4. What do you recommend trying?

Hi @caimano, thanks for testing and for your patience.

Before suggesting next steps, can you clarify: does the reboot happen with dtoverlay=vc4-kms-v3d commented out and display_hdmi_rotate=3 in place, or with a different config?

In the meantime, you can try pre-rotating your videos before uploading. If you’re comfortable with the CLI:

ffmpeg -i input.mp4 -vf "transpose=1" output.mp4

Otherwise, GUI tools like HandBrake or VLC (Media > Convert/Save) can do the same thing.

It would also be nice to capture the viewer logs while the issue happens (i.e., the unexpected reboot):

cd ~/screenly
docker compose logs -ft anthias-viewer

Hi, yes, the reboot happen with dtoverlay=vc4-kms-v3d commented out and display_hdmi_rotate=3 in place.

@nicomiguelino Hi, to test as you requested, I first tried VLC. Unfortunately, the process is lengthy, almost as long as the video itself, and the resulting file is much larger than the original. I tested three videos, and all three have different lengths; VLC seems to cut off several seconds at random. So I can’t use it for now.

Then I tried ffmpeg via PowerShell. This also takes a long time to convert, and the file becomes much larger than the original, but at least it’s intact, with no gaps or cuts.

This option, however, has three problems in my opinion:

  1. The video file needs to be prepared with considerable time if it’s very long.
  2. Unfortunately, I’m not always present, and the process is a bit difficult for a novice or an electrician who isn’t an IT professional.
  3. Almost all the monitors involved are already physically mounted vertically to the wall and set to play images, websites, and vertical slides in the config.txt file. If I receive a vertical video file, I first have to rotate it 90°, but it only plays correctly if I then load it onto a monitor set to horizontal. I can’t do this because I’d have to re-edit the config.txt file every time.

Until now, I’ve always set my monitors to horizontal or vertical so they stay that way forever. This way, the video I upload to the asset is already set for that type of monitor without doing anything.

The test worked, but in the end, we only played a video horizontally by physically rotating the TV. This video already worked fine in landscape mode before.