Please test: Using OMXPlayer as video renderer
-
@fieldofcows Only today have I managed to try out your latest release, and it doesn't seem to show any video in OMX mode, only in VLC.
I tried building it with the latest code, and still the same - only now it has the video screensaver, which is great!
Maybe something went awry with the refactoring? Any way I can debug it? Your initial OMX-only build worked perfectly. I was looking at the code changes, but they're just too many for me to be able to thoroughly revert on my own :(
Hope you're all doing well.
-
@pjft Where did you get 'the latest code'? I haven't had any time recently and haven't managed to look at this for a while. I use my dev branches in github as a convenient way to move my current working set between systems so you cannot rely on them to be working all the time.
I'm still not sure really where to go with this. I like the embedded omxplayer but having seen the (few) themes that are using video, they do mostly overlay images on top of the video. I don't want to break them.
I have been investigating shaders as I said in a previous post. However, ES uses OpenGL ES V1 so shaders aren't available without a bit of rework. I am playing around with this though just for fun.
-
@fieldofcows From your github video_process_dev branch - but even the one on the Releases, that's in the first topic of this thread, exhibits the same behavior.
It's fine, by all means - I was just going to test it out today as I had an hour or so.
I wasn't asking for any additional developments - even though, to be frank, your latest build with (theoretically) omxplayer and the screensaver would be ideal for me. Right now I'm running your latest VLC one with screensaver :)
Thanks anyway.
Do you have your new RPi3? :)
-
@pjft said in Please test: Using OMXPlayer as video renderer:
Do you have your new RPi3? :)
Yep. Up and running again. And in a case this time :)
-
@fieldofcows Great to hear! ;)
-
@fieldofcows Well, after digging a bit into the code and troubleshooting things, it turns out it's because there's a particular video profile that OMXPlayer still does not support:
https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142204
I noticed it when some videos actually worked where others didn't, and it stumped me.
I'm re-encoding my few videos that don't suit the profile, and should be good to go. I'm sticking to your latest OMX+Screensaver build for the time being :)
Thanks for everything here!
-
@fieldofcows I was going to submit a pull request for the OMXPlayer implementation, but in doing my changes I end up creating other problems. :)
Summary:
in VideoPlayerComponent.cpp , I had changed these two lines to the following:
const char* argv[] = { "", "--win", buf, "--layer", "10000", "--loop", "--no-osd", "-b", "--aspect-mode", "letterbox","", NULL }; argv[10] = mPlayingVideoPath.c_str();
It keeps the aspect ratio of the movies (noticeable for vertically-oriented videos) :) But, on the flipside, for the screensaver it doesn't hide the background (theme, screen, etc).
It was a brief attempt at helping out, but the new problem makes it worse than before - I'd rather have stretched video than screensavers that hide only part of the screen :)
Have a great weekend!
-
@pjft I haven't tried this change to see what you mean about the screensaver but I'm guessing rendering a screen-sized black box behind the video in the screensaver will fix this.
-
@fieldofcows yes, that is correct, and it's what I ultimately am trying to do on my own, in a - what I imagine - very suboptimal manner :)
I'll share whatever I come up with. It's been a very long time since I've done any C++ programming, but this does not in any way strike me as a tremendous challenge. And I've been meaning to do something, however minor, for the project, so this sounds like an easy thing (famous last words).
I do have a very poor development workflow at the moment, though. I'm on a Mac, so I'm using Sublime (which is little more than a beefed up Notepad, kind of like the old UltraEdit) and then I scp my code to the Pi and attempt to compile there.
I could perhaps go back to Eclipse, which should be a lot better than what it was in 10 years ago, but would love to get some way to test the code consistency.
Any tips would be very much appreciated - even if just something that'd do some very basic error checking before I send it for compilation. Not syntax errors per se, but validating references, context, scope, etc.
Thanks!
-
@fieldofcows that's now sorted. :)
I'm actually adding a few extra tidbits here and there on my limited time, mostly quality of life changes, nothing really significant.
I'll send this one as a pull request for your review later, maybe in the coming days.
I'm still trying to get my head around GitHub. I was under the impression I had committed a couple of things so far but can't seem to find them on the web.
One thing at a time. :)
Thanks!
-
@pjft With git, you have to do a commit (to the local repository) and then a push to get it to the remote repository. If you're used to things like CVS, SVN, or Perforce, it's a bit of a different workflow. This will be useful to you: https://git-scm.com/book/en/v2 .
-
@MWGemini Thanks! I have something sorted out now. :)
https://github.com/pjft/EmulationStation/tree/omx-fade-letterbox
I have submitted a PR to @fieldofcows - a very simple one, really - and am now looking into a few fun things. Will share if/when they become stable, in my limited time. Still, all credit to @fieldofcows 's work, as this is really all him. I'm just tweaking and adapting.
Would still like to have a proper development workflow on my Mac that'd allow me to quickly test the code and compile it. Right now I zip the code, copy it to the Pi, unzip, compile, and debug a lot via logs. Like the good old days of printf() debugging :P
Should have something interesting to share in the coming days, fingers crossed.
-
@pjft I can't help with the development workflow on a Mac, since I'm not a Mac user, and haven't ben able to find time in my schedule to actually do any development on ES. I keep hoping work will slack off a bit, but that never seems to happen...
-
@pjft said in Please test: Using OMXPlayer as video renderer:
Would still like to have a proper development workflow on my Mac that'd allow me to quickly test the code and compile it. Right now I zip the code, copy it to the Pi, unzip, compile, and debug a lot via logs. Like the good old days of printf() debugging :P
How about installing VirtualBox on your Mac then creating an Ubuntu VM? You should then be able to build ES for Linux.
-
@fieldofcows That is actually a great suggestion. I tried QEmu with Raspbian, but that led me down a rabbit hole of which I couldn't come out of. I'll check out VirtualBox with Ubuntu.
I'm playing a bit with a few things here and there. Will share shortly when I feel things are minimally decent/presentable.
-
@pjft
I believe QEmu doesn't emulate the PRi GPU hardware and EmulationStation needs that to load:
https://retropie.org.uk/forum/topic/448/help-retropie-virtual-emulation-with-qemu/7 -
@backstander thanks for the heads up, I wasn't aware of that. I got in trouble even just compiling all things. I based it on a Wheezy image as I struggled with getting Jessie to work, but then even after getting all the libraries installed, from Boost to FreeType and in between, it seems to struggle with VLC. I suspect the required version for the current build isn't available for Wheezy. Which is fine.
I'll see if in Ubuntu the experience is smoother.
Thanks!
-
Yay! Release day, finally after doing this on a few minutes a day.
Very minor release for the moment, but thought I'd share. Also, my first release and overall experience with GitHub, so I'm quite happy. Most of the changes are minor/quality of life, but should help people on the RPi and PC have better temperatures while also getting screensavers and the few updates (@Dominus, @abodi, this will help your temperature issues based on @fieldofcows 's changes).
Just to make it clear: the extreme majority of this code is from @fieldofcows - I just added the following changes.
A few things in the release:
- Keep aspect ratio for videos in OMXPlayer. Vertical games are no longer stretched. Haven't fixed it for VLC yet, but may look into it in the future.
- Added game name and system on screensaver (@mattrixk , @CourierSS , @Dominus) . Very hacky, done via subtitles, but for the time being it's better than nothing (I hope). I will make these an option on the ES menu in the future. Please test on PC - the could should be fine, but VLC rendering performance on the Pi wasn't good in full screen resolution (the default video resolution made subtitles be very blocky, and stretched, and full screen just halted to a stop), which leads me to the next item.
- Made OMXPlayer the default screensaver player for the RPi. No reason for that not to be the case, as there are no overlays for screensavers (yet, at least). There's still the option for having either VLC or OMXPlayer for the Video Gamelist View, of course, for overlay purposes. This way we can get a nice full-screen video scaling via the player rather than the texture stretching from VLC. PC should still be fully VLC-based, and have name and system as subtitle. If one day we get the game name as an overlay during the screensaver, this will be reverted - the code is all there, just commented out.
- Pressing Select on the System Select screen will launch video screensaver. Why? Well... I have some plans that I'm sure @Zigurana will like :) I'm thinking of trying to use this as the random game selector, and if we exit the video screensaver with START, it will just select/launch that game. I will update if I end up succeeding, or just failing miserably. My several attempts at playing with the inputs so far resulted in the latter, so I'm not extremely hopeful, but I think it is a useful way to have a random game selector for the time being :P
I also did a few minor fixes on the screensaver via OMXPlayer, and when choosing a random video would select a path that does not exist (from @Nismo 's batch gamelist script, it happened on some BIOS roms in some folders for me, or ROMs I deleted but did not update the gamelist for).
To install this release, I'd follow the usual instructions from @fieldofcows :
wget https://github.com/pjft/EmulationStation/releases/download/v0.1-ss_title/emulationstation
Make executable and replace the original ES
chmod +x emulationstation sudo cp emulationstation /opt/retropie/supplementary/emulationstation/
You may need to install dependencies, if they're not yet installed (I suspect they may be if you're on the latest RetroPie):
sudo apt-get install libvlc5 libvlccore8 vlc-nox
@fieldofcows if you feel any of these contributions are useful to your repository, I'm more than happy to send a pull request at this stage - I had sent out a smaller one earlier, but I certainly do not want to impose on your work. Thank you for taking ES this far!
Jolly good fun.
-
@pjft I think that keep aspect ratio by default it's an error, what I mean it's that keep aspect ratio must be optional for the themer like we do actually with the images by using "size" or "maxSize" tags.
Example 1, not keeping the AR, just using a fixed size:
<video name="md_video"> <pos>0 0</pos> <origin>0 0</origin> <size>0.35 0.40</size> </video>
Example 2, keeping AR, using maxSize instead:
<video name="md_video"> <pos>0 0</pos> <origin>0 0</origin> <maxSize>0.30 0.40</maxSize> </video>
The problem it's maxsize it's not implemented for videos yet. Some themes like mine need a specific size for the video because it's "inside a box" and keeping AR will broken the theme or make it look "ugly".
Regards.
-
@Nismo thanks for the feedback! I believe the main system where this ends up being a problem is in the arcade, correct? Just out of curiosity, it doesn't change the fact that this is important for themes.
It's a fairly trivial thing to change on the player side - for OMX Player it's just a flag starting whether to stretch or letterbox it, though for VLC it'll be a bit more complex.
Given your previous feedback, though, I won't look into that on VLC for the time being, especially as your theme depends on VLC. When themes have that capability to distinguish max size vs size on video we can investigate that for both players.
The main reason I investigated it is because I think someone else had mentioned this earlier, and for the screensaver it made little sense to stretch the image unnecessarily as it ends up not looking like the actual game. :)
Is there any way I can provide you with a Windows build? I don't have a Windows machine to compile it on, but would love your feedback :/
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.