[Solved] ES libdvdread livdvdnav problems
-
Refer to commits made on 29th May : https://github.com/hex007/EmulationStation/commits/master
I am facing a problem with this. Look at the simple code below.
int main(int argc, char** argv) const char* args[] = { "", "--layer", "10010", "--loop", "--no-osd", "--aspect-mode", "letterbox", "--vol", "0", "-o", "alsa:hw:0,0", "/home/pi/RetroPie/roms/gb/kd.mp4", "", "", "", NULL }; const char* env[] = { "LD_LIBRARY_PATH=/opt/vc/libs:/usr/lib/omxplayer", NULL }; // Run the omxplayer binary execve("/usr/bin/omxplayer.bin", (char**)args, (char**)env); }
It works nicely. But when incorporated in VideoPlayerComponent.cpp it doesnt play. I stripped everything to a bare minimum (same as above code) while testing and it stll doesnt work. Any insight?
-
@Hex can you commit your code to one of your branches and send over the file here?
My best bet would be that it's inserting the video path at the wrong location, this rendering some of your arguments ineffective, but without seeing the changed file it's hard to say.
The reason for the empty arguments in the array is so we can add new ones at runtime.
There should be no empty arguments between valid arguments, I believe (I.e. if 1 and 3 are filled, 2 shouldn't be empty).
Let me look through the code, maybe I find something that can help!
-
@pjft I printed all the arguments just to be sure that they were in order as expected and even hardcoded them to eliminate the possibility. Still video doesnt play
This is the main change.
-
@Hex oh. Video doesn't play, you say?
Hm. And can you tell whether the process even starts or not?
Let me suggest that you install htop and run that via SSH. It will show you in a nice process tree diagram if there's an OMX Player processes starting and with which arguments (you may need to select a detailed view type).
It should help.
I wouldn't be shocked if it's an argument list size limitation, for whatever random reason. After you running into the empty parameters for VLC problem, I'm open to anything :)
One reasonably easy way to test it step by step is to start by evening the video path argument in the first few arguments, see if it works, and then gradually move it forward.
Without knowing what error may be happening on the OMX side of things, it's hard to move forward :/
What happens if you, via SSH, run the exact same OMX Player command you think you're invoking, with EmulationStation running at the same time?
-
Apologies for what may be a naive comment.
In your code sample you're using -o also:0: something, where in the EmulationStation code you're using -o local/HDMI/both (one of them).
Are they the same?
Are you not attempting to start OMX Player with an invalid option and so it's exiting immediately?
Just a thought, as that's the only potential difference I see.
Best.
-
I tried running omxplayer when ES is running and it doesnt run if,
alsa:hw:0,0
, which is a valid dev is provided. If I provide an incorrect dev then it work but no audio. This seems to me like ES is not releasing alsa controls properly.I have set VolumeControl device to "speaker" rather than PWM
-
@pjft said in ES libdvdread livdvdnav problems:
Apologies for what may be a naive comment.
In your code sample you're using -o also:0: something, where in the EmulationStation code you're using -o local/HDMI/both (one of them).
Are they the same?
Are you not attempting to start OMX Player with an invalid option and so it's exiting immediately?
Just a thought, as that's the only potential difference I see.
Best.
i did not update the comment but valid options for
-o
are local/hdmi/both/alsa:hw:X,0 where X is device number.if i run this command in terminal, ES not running, everything works :
omxplayer -o alsa:hw:0,0 FILE
if I run the command with all options without ES, it runs.OMX doesnt run with ES if device is alsa:hw:0,0 which is a valid device and accepted by omxplayer
-
@Hex I see.
Would you be able to use other alsa device IDs and see if you can achieve the same results? What are those two indexes in the parameter? Does it only with for you with 0:0?
Alternatively you could look into releasing alsa before playing a video and re-attaching after a video stops.
It's a bit of effort, but could be tested at least. You could do those in startVideo and stopVideo or equivalent.
-
@pjft Your suggestion to halt the audiomanager works well. I will submit a PR soon with ability to switch between PCM and SPEAKER for Rpi and ability to change omx audio device. I am marking this as solved. Thanks brother in code ;)
-
@Hex Glad to hear it works as an option :)
Thanks for putting this together, and thank you for helping with the testing!
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.