OMX Player showing in portrait instead of landscape
-
Is there any sort of way for me to force OMX to play videos at a certain resolution at boot? I think that would at least give me a workaround. Otherwise I'll have to disable intro videos and disable OMX Player in the main menu settings to get around this.
-
@AtTheArcade
omxplayer
is just a Bash script written as a wrapper around the real executable (omxplayer.bin
). You can modify the script and force certain parameters to be set when the binary is started, maybe force adding--orientation
would make the video display properly.
Unfortunately,omxplayer
does not have a configuration file you can store these settings, that's why 'hacking' the wrapper script seems to be the only solution to preset some parameters. -
@mitu Thanks for all the continued help! I really do appreciate it!
I started playing around with OMX Player in terminal and it looks like the issue is the aspect-mode. This page has three modes outlined:
Letterbox, fill, stretch. Default is stretch if win is specified, letterbox otherwise
I played around with each and found that the video I was testing only played right when I entered stretch mode. It looks like it's defaulting to Letterbox. Any idea how I can set this to only play in stretch going forward? I'm very much a novice at this so any help would be appreciated. I know you mentioned modifying the script but I'm not sure how to do that exactly.
-
I think I managed to find the script you were talking about by browsing to /usr/bin/omxplayer
Now the question is where do I add
--aspect-mode stretch
to the script?Here's a copy of the script I currently have: https://pastebin.com/rBrkm33x
-
I've checked how
omxplayer
is started from Emulationstation, but it looks like it's callingomxplayer.bin
directly, without the wrapper script. Indeed,letterbox
is default, but it's usingstretched
depending on how the theme has configured thevideo
component (somewhere here). I'm not familiar with the ES code, so I can't say how this can be fixed in the theme or if it's a bug somewhere in ES. -
Man...getting so close here!
I ended up finding another thread about editing the wrapper script and found that I needed to put my adjustments in between
$OMXPLAYER_BIN
and"$@"
on line 67. I put--aspect-mode stretch
in there and rebooted and the intro video finally played just fine but the video snaps still play the same. Of course you've already figured out why since the theme is calling the bin and not the wrapper script. I did try switching to the Carbon theme to see if it had something to do with BACK2BASICS but the problem persists there as well.So I guess I now have to figure out how to edit the theme somehow. If anyone has any input, I'm all ears!
-
@AtTheArcade I have an idea about modifying the theme.
Copy the theme folder from
/etc/emulationstation/themes
to/home/pi/.emulationstation/themes
(the 2nd folder does not exist by default, just create it) using the File Manager from the RetroPie system in ES. Rename the folder and add a suffix to is (like back2basics-mod) so you're sure the name of the theme to select it in ES.Modify the
theme.xml
inside the new created theme folder and replace themaxsize
node at line 225 and replace it withsize
so instead of<video name="md_video"> <origin>0.5 0.5</origin> <pos>0.747 0.631</pos> <maxSize>0.3292 0.4297</maxSize> <delay>1</delay> <showSnapshotNoVideo>true</showSnapshotNoVideo> <showSnapshotDelay>true</showSnapshotDelay> </video>
is
<video name="md_video"> <origin>0.5 0.5</origin> <pos>0.747 0.631</pos> <size>0.3292 0.4297</size> <delay>1</delay> <showSnapshotNoVideo>true</showSnapshotNoVideo> <showSnapshotDelay>true</showSnapshotDelay> </video>
You can edit the file from the File Manager (press F2 when the file is selected) or use
nano
to edit it (nano
<path to file>). If it's easier, you can edit the file from your PC over file shares, it should be in\\retropie\configs\all\emulationstation\themes\back2basics-mod
.Restart Emulationstation, then select your new theme and see if anything is different for the video snaps.
-
@mitu to the rescue again!
That fixed my video snap problem! But it created an issue with boxart. Haha. Now the boxart is massive. Any ideas?
-
@AtTheArcade said in OMX Player showing in portrait instead of landscape:
Any ideas?
I'm going to suggest adding both
size
andmaxSize
, but I bet that's going to make the videos look bad again. -
@mitu Like this? https://pastebin.com/6Ab4pxDU
Sorry, I tried posting that as a code block but it was flagged as spam for some reason.
-
@AtTheArcade said in OMX Player showing in portrait instead of landscape:
Like this? https://pastebin.com/6Ab4pxDU
Yes, that's the idea.
-
@mitu Tried that but nothing changed. Videos still look good but boxart is huge.
-
My workaround (not ideal by any means) was to download every piece of boxart I had on the build and resize it to fit the media window for this theme. It was exhausting but I think this build is a wrap now.
I am curious about how to go about rotating ES and the emulators themselves as opposed to rotating the whole screen through the config.txt file though. I clicked the link you originally posted on that @mitu but I didn't see where the solution was for that.
-
@AtTheArcade hi! Sorry for the delay here. I believe that in the Dev branch of EmulationStation there was some work on rotating omx player videos. Could you start with that and see if it works?
If not out of the box, you may be able to start the Dev EmulationStation in rotated mode as that may be the trick for the omx rotation to trigger.
Just a thought, though then maybe the emulators will be an issue...
-
@pjft I managed to figure out how to rotate just ES finally and I removed rotation from the config.txt. You're right, it does mess with the emulators but I imagine I can get that fixed since I'm using RetroArch for everything. The problem now is that (1) I have zero sound in ES now (no sound in video snaps or menu navigation) and (2) The videos are messed up again (this time they are stretched horizontally instead of vertically.
You mentioned rotating OMX videos but I think I really need to change the aspect mode. Either way, where would I access the config file or whatever I need to work on for that in the dev branch of ES which I now have installed? And any ideas as to why my sound no longer works in ES? It works in the emulators, background music, and intro videos.
-
@AtTheArcade Open the ES config and choose the audio settings, set the output device to
PCM
and see if that fixes it. You can install thedev
branch of Emulationstation from the RetroPie-Setup script, it's theemulationstatio-dev
package located in the experimental packages section. -
@mitu I already am running the dev branch of ES. I installed that a couple of hours ago and that's when my audio issues and video issues came back.
What do you mean by ES config? I'm assuming you mean the start menu? If so, it was already set as PCM but when I exited that page I was kicked out of ES and taken back to the terminal for some reason. Looks like I have an issue somewhere?
-
For now I've decided to go back to the normal version of ES and rotate my screen through config.txt. Everything works that way with all the changes I made yesterday so I'm just going to leave well enough alone. I appreciate all the help today though!
-
@AtTheArcade you don't have audio and it crashes because the audio settings changed. You need to go to the settings (start menu), audio settings and you'll see an option that's empty, with just the arrows. You'll need to select something there.
I probably should look into a small upgrade path for that change.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.