RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    [Solved] ES libdvdread livdvdnav problems

    Scheduled Pinned Locked Moved Ideas and Development
    emulationstatiobug
    17 Posts 2 Posters 4.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HexH
      Hex
      last edited by Hex

      libdvdread: Encrypted DVD support unavailable.
      libdvdread: Couldn't find device name.
      libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed
      libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed
      libdvdread: Can't open file VIDEO_TS.IFO.
      libdvdnav: vm: failed to read VIDEO_TS.IFO
      libdvdnav: Using dvdnav version 5.0.3
      

      Latest build of ES pints this log a number of times

      Problem present at : bc68e0abb0e475120f2f6553911fdf2067caaffa
      Problem not present at : e27e7cfd195a9aba78413d7b5dadef088648f558

      System: Linux Fedora 25 x64

      Gamelist with videos and Video snap supporting theme, on PC running linux, images go out of bounds. Problem not present if gamelist doesnt have video snap. Happens after commit with OMX player support

      Problematic :

      Imgur

      Problem not present :

      Imgur

      Sent from 20,000 leagues under the sea.

      Powersaver Emulation station : https://github.com/hex007/EmulationStation
      ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

      1 Reply Last reply Reply Quote 0
      • HexH
        Hex
        last edited by

        @pjft any help with this?

        Sent from 20,000 leagues under the sea.

        Powersaver Emulation station : https://github.com/hex007/EmulationStation
        ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

        1 Reply Last reply Reply Quote 0
        • pjftP
          pjft
          last edited by pjft

          Hi.

          Thanks for the note.

          I'd have little to no idea about the libdvd problems, especially as OMXPlayer would only even be available on the Pi and you're running on Linux, but can see what's happening there. Are you certain that that's coming from ES, though - meaning, do these show up in es_log.txt ? Do you have a DVD drive plugged in, and does it have a DVD in it?

          I'm puzzled about that one, though. The ES logs would probably help, as well as if you determine what exactly triggers those messages.

          As for the image, that's an interesting one. Would you be able to comment out this line and compile it?

          https://github.com/RetroPie/EmulationStation/commit/029e8bd0400fe20362217dd2e6d607395d663b9d#diff-ac3ab93a7a9321c0bf08bd099dfcdf55R93

          And see if it helps? It's the only change I see that may have caused that to happen.

          Happy to remove that line - must have been added before we got maxSize on videos working a few months ago, and since this code was written earlier in the year it probably got missed. Thanks for spotting it!

          EDIT: Also, any luck with OMXPlayer and the external sound card?

          pjftP 1 Reply Last reply Reply Quote 0
          • pjftP
            pjft @pjft
            last edited by pjft

            @Hex And just to confirm, from any Google search for the error messages you're getting, most seem to be related to VLC playing specific media files, namely DVDs or some H264 videos.

            I struggle to see what changes would have taken place between the previous version and this one, and assuming you haven't re-encoded your videos or updated VLC (in order to narrow down what might be causing those logs), I'd do a Google search for that particular problem and see if there are any steps you can take.

            I've seen mentions of installing a specific library helping with that, but I am in no way convinced of what may be causing that, especially in the latest version but not before. Would appreciate your troubleshooting there.

            EDIT:

            Also, on OMX Player, I've done some searching and it seems that it only supports audio via 3.5mm jack or via HDMI. So in that case, if you do want to use the external sound card, VLC is your main option. It's not something that we can add on our end.

            1 Reply Last reply Reply Quote 0
            • HexH
              Hex
              last edited by

              @pjft

              libdvd problems happen in VLC and were not present before refactoring. Yes these are comming from ES as i am running the binary directly. DVD drive does not have a dvd in it and it should be trivial as url is not dvd.

              I tested it and that seems to have worked nicely to remove the image scaling problem.

              OMX player supports usb audio. Parameters -o local/hdmi/both have other hidden devs like alsa:hw:0,0 or alsa:hw:1,0 corresponding to priority list, which works for splashscreen

              Sent from 20,000 leagues under the sea.

              Powersaver Emulation station : https://github.com/hex007/EmulationStation
              ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

              pjftP 1 Reply Last reply Reply Quote 0
              • HexH
                Hex
                last edited by Hex

                @pjft I found the problem. You are initializing vlc with blank parameters.

                Yours :

                void VideoVlcComponent::setupVLC()
                {
                	// If VLC hasn't been initialised yet then do it now
                	if (!mVLC)
                	{
                		const char* args[] = { "--quiet", "", "", "" };
                		// check if we want to mute the audio
                
                		mVLC = libvlc_new(sizeof(args) / sizeof(args[0]), args);
                	}
                }
                

                Original :

                void VideoComponent::setupVLC()
                {
                	// If VLC hasn't been initialised yet then do it now
                	if (!mVLC)
                	{
                		const char* args[] = { "--quiet" };
                		mVLC = libvlc_new(sizeof(args) / sizeof(args[0]), args);
                	}
                }
                

                Created a pull request : https://github.com/RetroPie/EmulationStation/pull/148

                Sent from 20,000 leagues under the sea.

                Powersaver Emulation station : https://github.com/hex007/EmulationStation
                ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                1 Reply Last reply Reply Quote 1
                • pjftP
                  pjft @Hex
                  last edited by

                  @Hex Hi Hex.

                  Thanks for the replies and for troubleshooting! As I don't have a Linux box, it's tricky to troubleshoot those. The empty arguments one was a devious one there - thank you!

                  As for OMX Player, can you then share with me a command line for OMX Player that works for you, and I can add the USB audio as an option? From all the Google searches I ran, the vast majority clearly stated it didn't support, so that was the best I got.

                  You can test it via the command line, so if you send me a command-line that works that helps!

                  Best.

                  1 Reply Last reply Reply Quote 0
                  • HexH
                    Hex
                    last edited by

                    @pjft

                    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?

                    Sent from 20,000 leagues under the sea.

                    Powersaver Emulation station : https://github.com/hex007/EmulationStation
                    ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                    pjftP 1 Reply Last reply Reply Quote 0
                    • pjftP
                      pjft @Hex
                      last edited by

                      @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!

                      1 Reply Last reply Reply Quote 0
                      • HexH
                        Hex
                        last edited by

                        @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.

                        https://github.com/hex007/EmulationStation/commit/30253c44364541010552b32ea650057dc707e3cb#diff-b3583364181372e7c0d304ad537a8aac

                        Sent from 20,000 leagues under the sea.

                        Powersaver Emulation station : https://github.com/hex007/EmulationStation
                        ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                        pjftP 1 Reply Last reply Reply Quote 0
                        • pjftP
                          pjft @Hex
                          last edited by

                          @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?

                          1 Reply Last reply Reply Quote 0
                          • pjftP
                            pjft
                            last edited by

                            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.

                            HexH 1 Reply Last reply Reply Quote 0
                            • HexH
                              Hex
                              last edited by

                              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

                              Sent from 20,000 leagues under the sea.

                              Powersaver Emulation station : https://github.com/hex007/EmulationStation
                              ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                              1 Reply Last reply Reply Quote 1
                              • HexH
                                Hex @pjft
                                last edited by

                                @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

                                Sent from 20,000 leagues under the sea.

                                Powersaver Emulation station : https://github.com/hex007/EmulationStation
                                ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                                pjftP 1 Reply Last reply Reply Quote 0
                                • pjftP
                                  pjft @Hex
                                  last edited by

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • HexH
                                    Hex
                                    last edited by

                                    @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 ;)

                                    Sent from 20,000 leagues under the sea.

                                    Powersaver Emulation station : https://github.com/hex007/EmulationStation
                                    ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                                    pjftP 1 Reply Last reply Reply Quote 1
                                    • pjftP
                                      pjft @Hex
                                      last edited by

                                      @Hex Glad to hear it works as an option :)

                                      Thanks for putting this together, and thank you for helping with the testing!

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      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.