OMX Player Video Preview/Screensaver - No Audio Over HDMI?
-
Hello, i am running an RPI3B with retropie 4.2 from SD image. 2.5 power supply. I am running the screensaver/omx build by @fieldofcows with modifications by @pjft.
I have everything running great for my arcade cabinet with my audio going out through 3.5 headphone jack. I have my splash screen video/audio, screensaver audio, theme scroll.wav audio and the actual in game audio all working perfectly. I can switch between OMX player and VLC player in the ES build and the audio works the same for both. OMX player is key for my build so i don't overheat while the arcade cabinet (pi) is running the screen saver or video preview, and no one is playing it. At the bottom of the entire post I will cleanly layout settings and what happens, but first i will try to explain what I did.
I have a second build that is portable to plug into HDTV. For this I want to have my audio through the HDMI. For starters I simply plugged into the TV without any adjustments to my /boot/config.txt. When doing this, all audio worked except for the video preview audio and the screensaver audio. I changed from OMX player to VLC player and the video preview and screensaver audio started working. SO.....this means that the issue with the audio has to do with the OMX player. I researched and found some info on OMX stating that i should force HDMI, so i did that in the /boot/config.txt. Tried running over HDMI, did not fix the issue, I still get all other audio, just not the video preview/screensaver audio. What it did do was disable my audio over 3.5 jack for in game audio, however the video preview still plays over the headphone jack? Weird. I went back in and re # the hdmi force in the config.txt, and now I have to switch my config.txt between hdmi and 3.5, it will no longer auto recognize....so i guess that is a second issue.
Any ideas on how to force the OMX player to play through HMDI? I found this information, but I am not sure where to put this information? It almost appears that it is only a text line to force audio through HDMI for a single .mp4 file? OMX AudioPlease see both sections 4. Audio and 5.3 HDMI. Any help would be great, and anyone who is running the omx screensaver over hdmi and the audio is working, please let me know what your settings are. Thanks!
Arcade Box Settings - Audio through 3.5 jack:
Config.txt: #hdmi_drive=2 (never changed from original 4.2 install)
What works: Splash screen intro video audio, Screensaver audio, video preview in themes audio, launch .wav audio, in game audio.
What does not work: all audio works through 3.5 jack.HDTV Setup - Audio through 3.5 jack:
Config.txt: #hdmi_drive=2 (never changed from original 4.2 install)
What works: Splash screen intro video audio, Screensaver audio, video preview in themes audio, launch .wav audio, in game audio.
What does not work: all audio works through 3.5 jack.Pluged HDTV setup into HDTV audio through HDMI
Config.txt: #hdmi_drive=2 (never changed from original 4.2 install)
What works: Splash screen intro video audio,Screensaver audio, video preview in themes audio, launch .wav audio, in game audio.
What does not work: Screensaver Audio, Video preview in themesPluged HDTV setup into HDTV audio through HDMI
Config.txt: hdmi_drive=2 removed # in config.txt
What works: Splash screen intro video audio,Screensaver audio, video preview in themes audio, launch .wav audio, in game audio.
What does not work: Screensaver Audio, Video preview in themes,Pluged HDTV setup back into 3.5 Jack
Config.txt: hdmi_drive=2 removed # in config.txt
What works: Splash screen intro video audio, Screensaver audio, video preview in themes audio,launch .wav audio, in game audio.
What does not work: Launch.wav, in game audio (interestingly enough, when forcing audio through HDMI, the OMX player audio still works through the 3.5 jack, but none of the other audio works.) -
@TMNTturtlguy Hi!
A quick note: the screensaver is always rendered via OMXPlayer, so if changing to VLC makes the screensaver have audio, I'd suspect there's probably a handshake problem of sorts with HDMI somewhere.
I'm running it via HDMI and it works fine (which doesn't mean much, I know).
Maybe would you try launching OMXPlayer in the command line and run a few tests to see what makes the audio work for you, and then we can explore? I think I left some OMXPlayer command line tests in the other main thread, maybe you can start with those?
-
@pjft Thanks for the quick reply. I am currently doing more testing, and i have a correction to make. On the HDTV with HDMI forced to hdmi_drive=2 - the screensaver audio does not work with either the OMX player or the VLC player. The video preview audio works with VLC, not with OMX.
So the screensaver always runs on OMX even if I set the OMX to off in the menu? I don't have to worry about overheating on screensaver then? Just reduced performance on my video previews?
I will look into running some test and get back to you. Thanks
-
@TMNTturtlguy Correct, that was the main purpose, as screensavers do not need to worry about overlays, which was the main problem with OMXPlayer. :)
Do try running OMX from the command line to see if any particular parameter would help. And see what OMX Player users mention about it as well, maybe there's a known tip or something.
-
@pjft can you point me to the omx tests? The only ones i can find are in regards to the text for the game titles? Sorry and thanks
-
@TMNTturtlguy Might be those, I don't fully remember.
But you can find the remaining parameters at elinux.org/Omxplayer , though I'd definitely try to search for a common solution beforehand. I'd imagine the majority of people here would be connecting directly to the TV via HDMI, and the sound would be working well.
Could it be that you made some change a while ago to redirect audio to the 3.5mm jack and that's causing some sort of interference here?
I'm happy to share my config.txt as a whole, in case it helps troubleshooting something, but it certainly sounds weird (no pun intended) :).
-
@pjft If i could get your config.text that would be great. Up until this morning i had never plugged it into anything but the 3.5 jack. My original build was my 4:3 for the arcade cabinet. Never changed the audio settings. Now i started my second build, fresh install with no adjustments to audio or video. Had it plugged into the 3.5 speakers while building at my desk, moved to the TV and started having the issues. That is when i forced hdmi_drive2.
-
@TMNTturtlguy Sure thing. It's here: https://pastebin.com/G9TTUwMp
Surprisingly enough, it seems to be mostly commented out (i.e. lines start with # ) other than the 4 last items which I believe RetroPie adds.
So maybe actually commenting out other parts of your file and gradually add them may help, instead of deleting.
-
@pjft Thanks, our .txt files match exactly except for the bottom parameters match exactly except the bottom 4 lines. My bottom 4 lines are commented out: #gpu_mem_256=128, etc.
-
@TMNTturtlguy Got it. I believe that's what it should be, then.
So, just to confirm: you're plugging the Pi to the TV via a single HDMI cable, correct?
One interesting thing:
The Splash screen intro video is played via OMX Player. Are you sure you have audio there, when plugged through HDMI?
The command line for it is just
omxplayer -b --layer 10000 "$file"
-
@pjft Yes, i am getting full audio on my custom video splash screen
-
@TMNTturtlguy Huh. Interesting.
If you do have the chance to run the OMX Player tests from the separate thread, that'd be helpful. If you can, try to run them both when EmulationStation is not running (exiting it), as well as while EmulationStation is running (you run the tests, then, from a ssh session).
I'd like to get more data to formulate an opinion, though I'm kind of stumped.
Have you edited anything in the RetroPie menu, under Audio? i.e. navigate to the "RetroPie" system in ES, and there should be an Audio-related option there.
-
@TMNTturtlguy actually, an idea.
Go to the ES Menu, Audio Options, and select "Disable Sounds". Then restart ES and confirm that that is OFF. See if it works.
-
@pjft Ok, so while looking through a bunch of other fourms I cam across the issue, not retropie or ES or really OMX issue, it is an issue with the TV I was using. Here is the story.
I was testing the build in my "bonus room" basically the kids TV which is a 1080p LG 42" Vintage 2007. It was one of the first 1080p models back then...now, kids bonus room. Based on reading from others, there is an hdmi handshake issue as you mentioned with some old TV's, not sure why.....So i plugged her into my 55" 4K - everything works beautifully. Plugged into my 47" 1080p vintage 2012, again works perfectly. Went back to my 2007 LG - nope, the only OMX audio that works is the intro splash screen, which is odd, but that is running during the boot-up, so is that really controlled by anything within retropie itself? I am wondering if it works because retropie and ES are started and controlling the HDMI out, as soon as those take over something in the old TV doesn't like the OMX audio output. Weird deal, I guess if i play on that TV I just won't have the audio on the previews or screen savers......@pjft, thanks for all your help and troubleshooting. In the end you were right with the easiest solution of all, HDMI problem with the TV.
-
@TMNTturtlguy not a bother. The reason I suggested it is because I have an old Toshiba TV which also has problems with the audio handshake. For me it's solved by changing the channel and back again, at a time when the audio is on. Luckily it doesn't happen often with the Pi, but with my old PS3 it was every time I started the console with the TV off.
If it's to play on that TV, see if there's a way you can get that to work, either by changing channel and going back, or turning the TV on before you turn on the Pi, after you turn on the Pi, see what makes it tick.
Alternatively, you could attempt the biggest hack of them all, which would be to try to launch OMX player at launch with a looping silent audio only file (if it's even possible...!) and seeing if that gets the TV to recognise the audio bit;)
Have you tried disabling the sound in the ES menu I mentioned?
Anyway, at least we narrowed it down for now. Best of luck!
How's the comic theme going? It looked stunning!
-
@pjft thanks! I did do the audio changes through the retropie menus in ES, no luck there. I will continue to test on that TV, but now I know it is a tv issue, it will be a low priority.
The theme is coming along well! I have an update planned for this evening when I get a chance. I have it in 16:9 format now. Some nice improvements and some slight modifications that aren't as nice as the original 4:3, but it looks nice and is running more smoothly.
Another benefit I found with the OMX player is that omx will hold the original format of videos, while vlc won't. Running the ES build with screenscaver we can't use maxSize but it doesn't matter, omx holds the ratio by default. Vlc will stretch the videos.
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.