OMX Player showing in portrait instead of landscape
-
What would cause OMX Player to show videos in the wrong orientation? When I start up ES, the intro videos show in portrait instead of landscape and all the video snaps for each system do as well. If I turn off OMX Player in Main Menu -> Other Settings the video snaps show correctly (but the intro video still shows in the wrong orientation). Nothing else seems to be effected but the intro videos and the video snaps which leads me to believe one of my settings is interfering with OMX.
-
Sorry I didn't include this the first time:
Pi Model or other hardware: 3 B+
Power Supply used: 5V 3A
RetroPie Version Used: 4.4
Built From: Pre-existing image
USB Devices connected: Controller
Controller used: Generic USB SNES style controller
Error messages received: None -
I think the issue has something to do with my config.txt file that was supplied by the original creator of this build. Here's what's in that file: https://pastebin.com/pSMfMBHt
I'm assuming it's something to do with that file because I removed the SD card I had in there and put another one that has a working image from another build I just finished and the problem persists when I put in the config.txt that was on the original SD card. Not sure which setting could be affecting OMX Player. Anyone have any ideas?
-
I've been at this for hours but I can't seem to figure this out. I've pulled apart the build so I can get information off the monitor and it's this one: https://www.waveshare.com/product/4inch-hdmi-lcd.htm
I tried redoing my config.txt from scratch with the bits of code they mention on their wiki: https://www.waveshare.com/wiki/4inch_HDMI_LCD
hdmi_group=2 hdmi_mode=87 hdmi_cvt 480 800 60 6 0 0 0 dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900 display_rotate=3
But the problem still persists. I'm not really sure what else to check at this point. It only seems to affect the intro videos and my video snaps. My theme loads fine, screensaver slideshow images show fine, games show fine. So I keep coming back to it's something to do with OMX Player but the Pi image I'm on now is identical to one I just did on another build where everything works fine. The only difference is that build didn't use a connected screen like this and so the config.txt is untouched. So it must have something to do with my config.txt file. Here's a copy of that file again: https://pastebin.com/pSMfMBHt
Any help would be much appreciated. I just finished three Pi builds and this is the very last thing I need to sort out before I can call this a wrap. After weeks of learning how to set all of this stuff up I'm finally ready to play some games. Just need to get this sorted first.
-
I think the culprit here is the rotation of the screen. Note that it has an impact on performance. One thing you can do is leave the screen alone and then rotate Emulationstation (see this topic here ) and then configure display rotation in RetroArch so emulators would also be rotated.
That would alleviate the performance hit, although I'm not sure it would help with the video problems. What theme are you using ? -
@mitu I tried replicating this issue on my working console build that's connected to a normal lcd TV and I can't. I put in those same lines in my config.txt (but I changed display_rotate to 2 so the display would be rotated but I could see it) and everything still plays fine. I'm using the same theme on both builds which is BACK2BASICS by Hursty.
I also tried changing my theme to Carbon on the build that's not working right and the video snap problem persists.
I also tried commenting out the rotate display bit and I switched to Hursty's vertical arcade theme and the video snaps were still all messed up. So I'm not so sure that it has something to do with rotating the display. I'm really stumped here.
-
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...
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.