New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding OMX Player as experimental option for ES #135
Conversation
You are real ... i'm 100% agree with you :D The only thing i don't understand was, is the new Z-Index option can fix the overlays on top of videos problem? |
Not with OMX Player, no. The thing is that EmulationStation uses SDL for rendering, which is hardcoded at a specific layer - 10000, I believe. You can read more details in this post, where I kind of laid out all the research I had been doing as well: https://retropie.org.uk/forum/post/62614 The z-index option handles which objects are rendered on top of which, but that's all within the 10000 SDL layer. While VLC renders videos to a texture in ES - so it can be rendered via the ES pipeline - OMX Player with hardware acceleration renders videos separately, unfortunately as a window on top of ES. As such, for the time being, OMX Player videos are permanently on top of ES, in a separate layer. I may in the future test whether rendering video through OMX into a texture would result in better performance (than VLC) while being able to render overlays, but reports and research provided mixed results. Even VLC compiled with HW acceleration seemed to start rendering on top of the current layer, according to fieldofcows in the threads, so... we'll see. Baby steps. But I agree: in the long run, I'd be very much in favor of settling for a single video player that would be hardware accelerated. But for the time being, this is a good compromise I hope. And it's fairly easy to undo. Thanks! |
Thanks. If anyone has time to test this it would be appreciated thanks. |
Thanks. A quick question: I believe at one time you might have mentioned something about us linking a hardware accelerated version of ffmpeg somewhere? Can you point me in the right direction? While we may have OMX as an option, I'd like to see what could be a more longer-term solution. Or at least get that out of my system :) |
the ffmpeg / vlc in Jessie doesn't have it so you would need to build it all (and then there would likely need to be code changes to enable the acceleration when using the vlc library etc). |
I see. I'll leave that battle for later then, you did mention that hopefully in the short to medium term we'd get a hardware accelerated version of VLC with the OS so we'll revisit then. Thanks. |
I really want to test this build to help. |
Hi @Darknior . Thanks for the reply. There have been some comments around ES crashing at compilation from within RetroPie Setup, but it is the common understanding that if you exit EmulationStation and open RetroPie-Setup separately that it should work. Please check whether that's not the case. That being said, to test this, these steps should help: 1 - Exit to the terminal (quit ES)
And then after if finishes compiling, just run
And you should have the new option for the experimental player in a new menu. Let me know if this doesn't work - I'm mostly writing from memory. Thanks! |
Thanks, you are real for ES, Using RetroPie-Setup separately working fine for me :) I also compile your version for test and it is excellent i love it. Thanks! |
Thanks for the note. You shouldn't have to restart ES, but you would have
to go back to the system view and then re-enter the gamelist view for it to
list the videos. It's an unfortunately know bug from emulationstation that
will also happen if you change theme. It will reload the views but for some
reason the playback won't be triggered.
Can you test that's the case? You should be able to test it after changing
video player.
Thanks for testing!
…On Tue, 23 May 2017 at 18:58, Fabien ***@***.***> wrote:
Thanks, you are real for ES, Using RetroPie-Setup separately working fine
for me :)
I also compile your version for test and it is excellent i love it.
For my part i must restart ES if i change the video player, if not i don't
have videos.
After restart i have videos with OMX, fast and smoother, without any
glitch in videos, a real dream :p
Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7Va45vDjP6VrvpsBMXO8y_iVuWHOks5r8x5FgaJpZM4NgZZ0>
.
|
It's ok it works fine like you write :D |
I've tested on my raspi1 overclocked to High, the results are impressive. I've recorded a video to let you guys see: The first 30 sec is the pjft RetroPie-OMX-Player branch. UPDATE: I've added some subtitles on the youtube video. So, enable it when watching. |
Oh wow, thanks for testing. Initially I was thinking "oh, it takes a bit to
load", and then I saw the VLC performance :/ I had no idea it didn't work
on the Pi1! I'm glad that at least you now have videos performing well.
TMNTTurtleGuy had noticed that the OMX video still played while in
screensaver mode. I just updated my branch to tackle that, so if you plan
on keeping that build around, do update!
I had split the video screensaver features and OMX player ones into two
PRs, so by doing that I missed the code that actually made them work
together :)
After this is merged, I'll rebase my code and then push for the video
screensaver stuff.
Thanks for testing!
- Paulo Tavares
…On Thu, May 25, 2017 at 6:23 PM, meleu ***@***.***> wrote:
I've tested on my raspi1 overclocked to High, the results are impressive.
I've recorded a video to let you guys see:
https://youtu.be/w-uvnI_o7u8
The first 30 sec is the pjft RetroPie-OMX-Player branch.
From 31 sec on is the official RetroPie ES binary as in 25-may-2017.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7bKt0ITvNs3WPKkPsZeRH9TbUShhks5r9bkTgaJpZM4NgZZ0>
.
|
I'll do it as soon as I learn how to cross-compile. It took almost 4 hours to compile on my raspi1! 😅
Off-topic: It sounds like a Brazilian name. Você é brasuca também? |
Português;) I knew you were Brazilian from a few threads in the forum, where you were talking about... Was it rollerblading? Anyway, glad to help! |
Just squashed the screensaver fix to the latest commit, so it's ready to merge in case it gets approved. Would you want me to squash both @fieldofcows' and my commits though? I'd rather keep them separate as it gives more credit - and sense of authorship - to his work, but I'll accept any recommendation here. Thanks. |
@pjft Is OMX Player installed by default or will we need to update the install script as well to ensure it is available? |
im ok with the commits split. we can add omxplayer as a dependency in retropie-setup - it's installed by default on our prebuilt image (can be used for the splashscreen). |
Ah, good question and good call - I always thought it came with the default
Raspbian image, but I can completely see how naive and wrong that
assumption could't been :)
Is there anything I need to do on my end to make that happen, though? Happy
to add it, though would appreciate some pointers/guidance.
Would it make more sense to check if it exists, and only show the option if
it does indeed exist, though?
- Paulo Tavares
…On Fri, May 26, 2017 at 1:04 PM, Jools Wills ***@***.***> wrote:
im ok with the commits split.
we can add omxplayer as a dependency in retropie-setup - it's installed by
default on our prebuilt image (can be used for the splashscreen).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7VUAEA1j39uVhwq10RpGKRVv4RFuks5r9r_MgaJpZM4NgZZ0>
.
|
Now it's explained why it ran on my RetroPie/raspi1 without needing to install anything else... |
One final thing, while we're at it. Open to suggestions on the naming of
the option. Right now it's written as "Enable Experimental Video Player",
in order to suggest that it is "experimental" (in the sense that if
something doesn't work as intended -- overlays being the case in point --
they can kind of expect that).
However, if we feel this could probably be better named as "faster",
"lightweight", "hw accelerated", "OMX" or something else, do let me know -
it's just so we're happy with the actual naming for users.
Thanks all!
- Paulo Tavares
…On Fri, May 26, 2017 at 1:08 PM, meleu ***@***.***> wrote:
@joolswills <https://github.com/joolswills>
it's installed by default on our prebuilt image
Now it's explained why it ran on my RetroPie/raspi1 without needing to
install anything else...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7RVwp7rtCznG25tiu6p-bufCs4yQks5r9sCkgaJpZM4NgZZ0>
.
|
I vote for ENABLE OMX VIDEO PLAYER. Question: even if my hardware is powerful is there any advantage in using VLC rather than the faster OMX? I've tested the pjft's branch on RetroPie/x86/Core i7/RAM=8GB and noticed that the OMX player loads the video a little bit faster. It's a small difference, but it's noticeable. I think that if OMX video player proves to be stable, it should be the only option. |
The only reason to use VLC is that hardware accelerated video does not
allow for rendering images on top of the video, so themes that would want
to use an overlay (scanlines, boxart, whatever) can't do it with OMXPlayer.
Other than that, performance-wise there is no comparison whatsoever - VLC
even overheats on stock Pis with the default Pi Foundation case without a
fan or heatsinks.
That being said, there aren't many - if any at the moment? - finalized
themes with that in place, and truth be told one can certainly ask the
opposite: had OMXPlayer been the default first video player on ES, would we
replace it for VLC or make VLC the experimental one?
I am not one to answer that, as I personally am not very much into the
theming realm, but I am supportive of at least exploring the topic of
making OMX the default and having VLC as an optional "Layer-compatible"
video player, if that's something that makes sense for the wider community.
But, as I've expressed in the past, I am not going to make that a sticking
point. I'm just happy that people have the option, and I can see both sides
of the argument.
- Paulo Tavares
…On Fri, May 26, 2017 at 4:01 PM, meleu ***@***.***> wrote:
I vote for *ENABLE OMX VIDEO PLAYER*.
Question: even if my hardware is powerful is there any advantage in using
VLC rather than the faster OMX?
I've tested the this pjft's branch on RetroPie/x86/Core i7/RAM=8GB and
noticed that the OMX player loads the video a little bit faster. It's a
small difference, but it's noticeable. I think that if OMX video player
proves to be stable, it should be the only option for video player.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7ZhwHFFOSwOhqlCfHXnAnx5zD37Cks5r9uksgaJpZM4NgZZ0>
.
|
Pretty enlightening answer, thank you. |
I don't know if they are considered finalized, but off hand I know Nismo's OldRoom theme and the CRT theme are layering images on top of the video. I wouldn't have any objections to making OMX the default player, but there may be other theme features down the line that it may not support. For example, I have been doing some experimenting with adding support for rotating theme elements. I am not sure if anyone would want to rotate the video, but it would be possible. |
Yeah, I'm not sure that would be possible with OMX without rotating the TV
;)
…On Sat, 27 May 2017 at 13:24, John Rassa ***@***.***> wrote:
I don't know if they are considered finalized, but off hand I know Nismo's OldRoom
theme
<https://retropie.org.uk/forum/topic/8019/oldroom-theme-w-i-p-new-1-9-beta-media-packs>
and the CRT theme
<https://retropie.org.uk/forum/topic/7022/new-theme-crt-with-support-for-video-preview>
are layering images on top of the video.
I wouldn't have any objections to making OMX the default player, but there
may be other theme features down the line that it may not support. For
example, I have been doing some experimenting with adding support for
rotating theme elements. I am not sure if anyone would want to rotate the
video, but it would be possible.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7SXhrPvZU9OFilx5Xr_OQbueADjlks5r-BYVgaJpZM4NgZZ0>
.
|
Addenda: of course, as I said, that's all "for now". I'd love to explore rendering OMX player video to Texture and see if performance holds up, as well as whether there are any other problems. But that's not a short term effort as it'd need a bit of research and learning on my end. And I can't promise I'd succeed, as @fieldofcows already did a lot of that research and came up empty, so my initial expectations are set quite low. But yes, this isn't necessarily final, though it's probably as good as it'll get for a while. |
I have been using @pjft's OMX player build for several months and it works really well. The videos play very smooth and they play at a much lower temperature. Once i started using the OMX player i have not gone back. I have tested this PR branch and it works extremely well and as expected. I suggest we leave the option to turn the feature on and off. I know several theme makers like the overlays, and several individual modify their own systems with different overlays as well. I also like the renaming to Enable OMX player, i would suggest we add a note like this Enable OMX Performance Video Player. Or some other way to describe what its purpose is. This is a great addition to ES and a huge improvement on performance and temperature. Nice Work @pjft. |
I'm happy to merge if @pjft is. I don't mind if it's on by default either, is that the case? |
The PR needs rebasing actually due to recent changes. Missed that |
I agree with @meleu on this. |
…cows' work (by pjft).
- Correct handling of zombie processes left in memory - Add options to mute video - Fix resizing to work with theme refactorings introduced by jdrassa and zigurana
Sorry about re-opening and closing - my brute-force rebasing approach causes Git to auto-close the pull-request. My bad. I'm just recompiling once again to confirm everything is good to go (i.e. that there are no compilation errors). The option is currently titled "USE OMX VIDEO PLAYER (HW ACCELERATED)" (need to check if it fits the menu), and is OFF by default. I wouldn't be shocked if OMX Player is by default ON, only because neither the CRT nor the OldRoom themes are currently released, and as such there are no completed themes that use overlays on top of videos at the moment. But, as I said, I do not have a strong opinion. But if that is to be the case, I'd rather have the option be called "USE VLC PLAYER (SUPPORTS THEME OVERLAYS, SLOWER)" or something, and be off by default. Let me know your thoughts and we'll wrap this today. |
Beautifully stated! I like the reasoning and the labeling of the VLC player. I think everyone has convinced me that OMX as default is the way to go. It is the only thing thing I use, so it makes me happy! |
Bear in mind on a PC, vlc should be default and the setting should be hidden (if this isn't already the case) |
@joolswills |
That is correct - these options only show up on the Pi, and only have
effect on a Pi.
Even if any option would state otherwise, it's always VLC that's used on
anything other than the Pi.
I'll triple check that everything is hidden.
…On Sun, 28 May 2017 at 21:48, Jools Wills ***@***.***> wrote:
Bear in mind on a PC, vlc should be default and the setting should be
hidden (if this isn't already the case)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7WIxtLt-rM_3-elRbs2jZNsdt5EHks5r-d2NgaJpZM4NgZZ0>
.
|
@meleu: OMX Player only exists on the Pi. If for some reason you're seeing the option on anything other than the Pi, it will be using VLC. Are you seeing such an option, though? |
I've got it. My bad, sorry. |
I've just compiled and checked. The option is gone! 👍 |
Just checked. It compiles, and the options are contained within ifdef RPI statements so that it only uses OMX and only shows the OMX option on the Pi. Current status: the option is currently titled "USE OMX VIDEO PLAYER (HW ACCELERATED)" (need to check if it fits the menu), and is OFF by default. If you'd like it to be different, just say so - or feel free to edit it on your end (Settings.cpp sets the default, and GuiMenu.cpp has the option text), otherwise merge away. Best. |
Thanks |
Yay, thanks! Next stop: video screensaver. |
YES PLEASE! |
Perfect, all i read here is fine for me :) I have some other idées to upgrade skinning concept @pjft ... to show the titleshot at the same place of the video, 1 sec before she start to make the scrolling smother, and the skin more beautifully. |
Hi!
You may certainly suggest tweaks and changes and if those are feasible and
manageable, someone will eventually pick them up :)
The suggestion you're making about the image showing under the video, I
think that's up to the theme, but I suspect that the theme maker can
explicitly show the image in the same place of the video, in a lower
z-index, and you'll get that effect.
Best.
…On Mon, 29 May 2017 at 10:39, Fabien ***@***.***> wrote:
Perfect, all i read here is fine for me :)
Next step Video Screensaver ... so excellent :)
I have some other idées to upgrade skinning concept @pjft
<https://github.com/pjft> ... to show the titleshot at the same place of
the video, 1 sec before she start to make the scrolling smother, and the
skin more beautifully.
And some other ... i must create a new thread in the forum to explain them
and ask you if it is possible to add them ? Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7Z2xuo12aiOAy5bEwM9jGfGIWmJ-ks5r-pJkgaJpZM4NgZZ0>
.
|
@pjft, just noticed something with the screensaver function I wanted to share with you. when testing out a new system I created with additional art for an update to my theme I used a master gamelist supplied by another user. I only loaded 8 roms that I own physical copies of but was to lazy to create a gamelist with only those games and the other user had proved all of the art properly named for the gamelist. What I did do however is onlynload the 8 vidoos onto the pi that correspond to the 8 games. The screensaver ran until it hit a game on the gamelist that said it had a video, but the video did not exist. The screen went black and video never reappeared. I checked the error log and it was filled with all the videos from the gamelist that I didn't have video for. So....users who run master game lists will run into issues using the screensaver function. Let me know if this makes sense. Thanks |
Thanks for the report.
Yes, that's a known deliberate behavior, to prevent entering an infinite
loop searching for videos that may not exist at all.
If after a certain number of consecutive failed random games video load
attempts (I think it's set at 20 or 100, it's a number pulled out of thin
air), it'll default to the black screensaver rather than going nuts trying
to find random videos that the gamelist is pointing to but clearly don't
exist.
If the gamelist points to assets that don't exist, emulationstation doesn't
know about that. The fact that it retries for a few times is a bonus.
I could set it to retry more times (100, if currently at 20) but other than
that it's on the user to ensure that the gamelist is minimally correct.
That being said, I recommend leaving the screensaver feedback for the
correct PR when it comes :)
…On Mon, 29 May 2017 at 17:11, TMNTturtleguy ***@***.***> wrote:
@pjft <https://github.com/pjft>, just noticed something with the
screensaver function I wanted to share with you. when testing out a new
system I created with additional art for an update to my theme I used a
master gamelist supplied by another user. I only loaded 8 roms that I own
physical copies of but was to lazy to create a gamelist with only those
games and the other user had proved all of the art properly named for the
gamelist. What I did do however is onlynload the 8 vidoos onto the pi that
correspond to the 8 games. The screensaver ran until it hit a game on the
gamelist that said it had a video, but the video did not exist. The screen
went black and video never reappeared. I checked the error log and it was
filled with all the videos from the gamelist that I didn't have video for.
So....users who run master game lists will run into issues using the
screensaver function. Let me know if this makes sense. Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7fAO9eq936kZ3xdeR1nSNtGOFD5Sks5r-u4lgaJpZM4NgZZ0>
.
|
@pjft Audio doesnt work if using USB soundcard. |
@hex007: this is a (lengthy) discussion on the addition of a new video player. How is your issue related? |
I think I would like to move the settings around a bit. As on x86 there is a video player settings menu with just one item in it. I was thinking:
thoughts ? |
Sure. I have no key objections at the moment.
The video screensaver, though, will add a few more options to it, that's
why it's a bit empty.
Your call, but it's transient.
…On Wed, 31 May 2017 at 17:54, Jools Wills ***@***.***> wrote:
I think I would like to move the settings around a bit. As on x86 there is
a video player settings menu with just one item in it. I was thinking:
put video player audio setting in the Audio Settings.
put the omxplayer setting in Other Settings.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7ZUdaKczhfAKxXRGJyTG_g9NAut0ks5r_ZthgaJpZM4NgZZ0>
.
|
Can leave it for now. Not a biggy. |
Thanks. Haven't had much time in the past few days to get back on this, but
will do so in the near future.
…On Wed, 31 May 2017 at 17:56, Jools Wills ***@***.***> wrote:
Can leave it for now. Not a biggy.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVAV7Yu4fZ2Pm_Pl-WOzkcwfcD0dz3sxks5r_ZvYgaJpZM4NgZZ0>
.
|
Submitted PR #152 corresponding to requested changes |
Fix compilation (memcpy) under Ubuntu
---- Changes summary ----
OMX Player has better performance on the Pi than VLC. @fieldofcows did a great work adding it to a separate branch, earlier in the year.
Since then, I ended up picking it up and improving it slightly - fixing some minor annoyance and a couple of leftover issues - and since then I have mostly been maintaining a version of ES that's pretty much the RetroPie main one (frequently rebased), but that has OMX Player as an option, and screensaver as well. I tried to reach out to @fieldofcows for the past 2 months, but didn't hear anything from him.
That version has been extensively used for the past few months both by me as well as by several other forum users (Dominus, TMNTurtlGuy, Scannigan come to mind, but a few others stated that were using it as well), who prefer OMX Player as a default given its better performance on the Pi (avoiding overheating issues in some cases, and allowing for better video quality), so I'd like to bring it over as an explicitly experimental option under a "Video Settings" menu.
It's only available on the Pi - VLC is still the default for anything else. It's easy to revert/remove in the future, as it's a separate independent class.
OMX Player cannot be the default on the Pi because of theming issues, in particular z-indexing. HW accelerated video players, both OMXPlayer and a compiled version of VLC are rendering video on top of everything else.
Still, while there are themes in development that use overlays on top of videos, the majority of the actual themes that are out there do not yet have overlays on videos, so this is a valid option to have in case the user doesn't want to use VLC to get better performance.
I squashed @fieldofcows ' commits into a single one of him, and added mine separately, so that full accurate attribution can be had. Hopefully this is alright.
Following this one I'll submit the screensaver one as well.
This is fully rebased with @jdrassa's z-index changes from yesterday.
Hope this suits. Thanks.