feat: add support for rotating content (videos, images, web pages)#2568
feat: add support for rotating content (videos, images, web pages)#2568nicomiguelino wants to merge 6 commits intoScreenly:masterfrom
Conversation
- Refactor FFMPEGMediaPlayer to use rotation settings instead of hardcoded values - Add __get_rotation_filter() to map rotation angles to ffplay filters - Update VLCMediaPlayer to use rotation settings with proper angle mapping - Supports 0°, 90°, 180°, and 270° rotation angles
|
|
Thank you for looking into this! I run Anthias on a few vertically mounted displays and have been wanting this feature for a while. The displays are all powered by Raspberry Pi 4B's (4GB RAM), so I'll share what I've learnt from experimenting with solutions for this hardware. WebViewI found this patch for QT5 which adds a This gist contains a recreation of the patch I made for QT 5.15.14. I've been applying it from the So far this patch has been working flawlessly with web page and images. VideosI hadn't looked into rotating videos prior to now, but this feature request got me playing around with VLC options. Using your code I couldn't get the rotate filter to work, however I found a suggestion that some filters had better support when hardware decoding was disabled with the Success! As for why it won't work with In def set_asset(self, uri, duration):
media = self.instance.media_new(uri)
media.add_option(':avcodec-hw=none')
self.player.set_media(media)
...The video-filter must still be passed with the Instance options: def __get_options(self):
...
return [
f'--alsa-audio-device={self.get_alsa_audio_device()}',
f'--video-filter=transform{{type={angle}}}',
]I have also tested with |
|
re: videos. Apprently exiftool can get the job done since Anthias player seems to respect the rotation flag. I haven't tested it on images yet. I'm gonna see if I can update the settings page to "Auto detect and rotate 9:16 content" [disabled|90|-90]. I want to add another settings option which rejects aspect ratios that are not 16:9 or 9:16 as well (for the OCD among us). Also one which rejects videos that are larger than full HD since noticed that UHD stresses the mini PC I am running it on. IDK. We will see. |



Issues Fixed
Description
Checklist