RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Video Preview for Roms in Folders?

    Scheduled Pinned Locked Moved Help and Support
    videovideo previewfoldersroms
    40 Posts 2 Posters 12.1k 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.
    • TMNTturtlguyT
      TMNTturtlguy @pjft
      last edited by

      @pjft yes, i would be willing to test this. Sorry i was out for a while and just returned. I will work on this today and get back to you. Thanks

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

        @TMNTturtlguy Not a bother. As I said, I do not have hands on access to a Pi at the moment, so I could only compile it and send this over. I suspect it should work, but would rather have it be properly tested. In particular, comparing to the current build. Can you edit the metadata of a folder in ES? What options does it show?

        Take your time, and thanks. If this works well, I'm happy to push it to the main ES so everyone can benefit.

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

          @pjft To answer your questions in this post, I have only been working on pi builds for the last 2 or so months, prior to that I had dabbled with ROMs and emulators about 10 years ago and had built an standup arcade on a crude window based system manually launching each emulator and then opening roms. I started my Pi builds with that old knowledge in mind and when I tried launching games in N64, Dreamcast, PSP, PSX they would not launch from the zipped files. My first thought was extract them with the same name and try to launch them. That worked. I did not like the fact that i had to "Launch" the game twice from the menu list, but i decided to keep all games, even single title files in folders so that every title in the system launches the same way. This was not an issue until I started working on video previews.

          As for marquees and overlays. I only have marquees in my arcade roms and i currently don't have any themes that overlay them on the video, so it shouldn't be an issue. Thanks again and more to come on my testing.

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

            @TMNTturtlguy

            Thanks.

            In the RetroPie Wiki page for each system you'll usually find the extensions accepted for each one :) Several systems do accept zip files.

            All the best!

            1 Reply Last reply Reply Quote 0
            • TMNTturtlguyT
              TMNTturtlguy
              last edited by TMNTturtlguy

              Edit - duplicate post, sorry

              1 Reply Last reply Reply Quote 0
              • TMNTturtlguyT
                TMNTturtlguy
                last edited by

                @pjft Quick update! Success so far. I haven't got a chance to run all of your tests yet. That will happen later this evening. What i can tell you is that I installed the ES build and opened up the psx folder and the videos are running! Will need to run your specific tests and make sure games launch and report back. More to come later, i have to run for a few hours.

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

                  @TMNTturtlguy thanks for the feedback and for taking the time. There's no urgency whatsoever, please. It's just as I can test then myself at the moment, if we validated it's all working as intended, it could be merged into the main branch.

                  Thanks!

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

                    @pjft Get ready for a novel! things worked well for the most part. the only thing that fails are when there is a game that is not on the gamelist. I tried to use bold italic text below. Thanks

                    • In a Video theme: Using Carbon Video
                      --- Rendering the video in a folder for which the gamelist contains a video for (i.e. your Batman example);
                      Seems to work perfectly, videos render nicely easy and quick scrolling through entire games list. games open and run (only ran for a few seconds, not a full play) Game list includes games with and without video. Games without video showed image correctly. Roms are in sub-folder condition

                    --- Rendering a separate folder that was not in the gamelist (i.e. just create a new random folder there, but don't add it to the gamelist);
                    First attempt was not successful. I added a rom folder, simply copied the batman and robin folder and renamed it. I uploaded to the folder and restarted ES. ES would not restart and existed at the ES white screen with the following error code
                    Terminate called after throwing on instance of 'std: out_of_range'
                    what() map: : at
                    Aborted

                    I tried to restart ES but it kept failing to load after about 5 seconds on the ES screen with the same error code. I deleted the test game added which was not on the games list, restarted and was back in business. Everything loaded find and ran properly again. I now created another game folder this time a copy of x-men and called it x-men test so it was not the first game loaded when i entered the PSX system it was the 3rd game from the bottom, the new game was not on the gamelist. Added to the rom folder, restarted ES and everything started perfectly. Went through the entire list and got to the X-men Test, as soon as i hit the game the system exited ES with the same error code. SO if a game is not on the gamelist, ES will crash and you cannot restart until after you remove the game from the rom folder. I deleted the X-men test game and once again, back in business working normally. So to be proactive I decided to add X-men test to the gamelist. Added it, restarted and what do you know, works perfectly. So the current build must have games on the gamelist or it will exit in error and not reboot. You can add games, but you have to also add them to the gamelist immediately.

                    --- Rendering a separate folder that was on the gamelist, but did not have a video assigned, and instead had an image.
                    Seems to work perfectly, image shows up, game loads normally. Works in the PSX folder as well as in other folders that contain only image files and no video previews.

                    --- Rendering a separate folder that was on the gamelist, but did not have a video nor an image assigned.
                    Seems to work as expected. The game shows up on the list, the description and metadata show properly, no image or video show as expected. Game launches.

                    --- Render the video in one of those NES games.
                    Seems to work perfectly. games with both video and images show properly. games run correctly.

                    Then repeat the 3 tests again for a theme without video support.Using Carbon
                    First off - everything worked as expected in both PSX and NES, all images show up, no video as it is a non video theme. Games Launch Fine
                    Test#1 - Game not on gamelist: Failed, as above i used the X-men test rom folder. ES started and I scrolled through the gamelist. I got to X-men Test and the sytem exited ES with the same error code.
                    Test#2- Game on gamelist with no video assigned, only image: Pass
                    Test#3-Game on gamelist with no video or image: Pass

                    Then, in a video theme, open a system with no videos in it (should default to the regular detailed view), and:Using Carbon Video
                    --- Rendering a separate folder that was not in the gamelist (i.e. just create a new random folder there, but don't add it to the gamelist, and restart ES);
                    Fail - same as above - when the game is not on the list, as soon as you scroll to it, you crash with the exact same error.
                    --- Rendering a separate folder that was on the gamelist, but did not have a video assigned, and instead had an image.
                    Pass
                    --- Rendering a separate folder that was on the gamelist, but did not have a video nor an image assigned.
                    Pass

                    And then finally rename the gamelist file for the PSX system, so it's not recognized, restart ES, and open the PSX system. Should show only the basic view. See if it works.
                    Yes, this works as expected, just the basic view, able to scroll through and launch with no issues.

                    Are you able to test these and report back, to confirm all behaves as expected, and nothing crashes? If so, I can push the changes to the master RetroPie ES.

                    Also, what happens if you press "select" on the folder? Does a menu pop up? Can you edit the folder's metadata? Does it show video and marquee info?
                    Yes, works exactly as expected and stated.

                    One more issue of note. I created a folder for dreamcast that has half the roms saved to the main folder as .cdi and the other half that contain multiple files in sub-folders that look exactly like the psx file structure. Everything runs perfectly as expected. The issue I run into is when I hit the bios folder, that was not on my gamelist, so it crashed with the same error. I added it to my games list with no info, just a path and name and then everything worked fine. My plan for the final part of the build is to change the settings to only see games on the gameslist, so this will get rid of this problem for me, however it does appear that the only thing we need to figure out is what is causing the error when games are not on the gamelist.
                    Thank you so much for all your help to date, this is pretty close! Let me know if I can run more tests on an update from you. Thanks

                    Thanks!

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

                      @TMNTturtlguy wow, thank you for the exhaustive testing and write up. I see what may have happened then. I didn't expect map to throw an out of range error, but I think I can fix it then and send you a new build later.

                      Thanks once again, and glad it helped solve your problem! I'll make sure to add this to the other build with the screensaver as well so you can make the most of it as well:)

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

                        Here you go:

                        https://github.com/pjft/EmulationStation/releases/download/v0.2-folders/emulationstation

                        Could you check what actually happens when you try to edit the metadata for a folder? Does it show all options? What if you actually edit it and save it - will it work correctly? Will it load the changes the next time you launch ES?

                        Thanks for testing.

                        EDIT: Refreshed the binary, as it seems that editing the metadata for a folder that was not on the gamelist presented us with an empty menu in the base RetroPie EmulationStation. This new build should fix that behavior as well - so, more than adding new behavior it should also fix previous sub-optimal behavior.

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

                          @pjft I updated to v0.2-folder, at least I think i have, is there anyway you can make a mod to your test releases that will change ES version number? Maybe just add your release number? I believe I have the update installed as everything downloaded and accepted by chmod and sudo cp commands with not objections. I have seen no changes in the base behavior of ES from v0.1 Everything works as it did with the original tests. The videos and images all work as expected until you have a game that is not on the gameslist, then we get the same error.

                          I did test modifying the metadata folder from within ES menu. I renamed the game and changed details and developer information. I saved it. It accepted the changes immediately. I restarted ES and the changes remained. For the record, I did not test editing and saving metadata in v0.1, not sure if that worked properly then.

                          Thanks

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

                            @TMNTturtlguy My, that's a great idea. I was checking and I might have botched that previous build - it seems not all of the changes had made it through?

                            I updated it in the same link, and now when you launch it, in the menu it should have 0.2-folders in the version - please confirm that's the case :)

                            Thanks!

                            1 Reply Last reply Reply Quote 0
                            • TMNTturtlguyT
                              TMNTturtlguy
                              last edited by TMNTturtlguy

                              when i push start, my menu screen still reads "EMULATIONSTATION V2.1.5RP"

                              UPDATE - i continued testing even though the version number was not updated. this time i got a new error message when i went to a game not on the games list.

                              ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occured
                              ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occured
                              ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occured
                              terminate called for after throwing an instance of 'std: :out_of_range'
                              what(): map: :at
                              Aborted

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

                                @TMNTturtlguy With the one I just added?

                                Hm. I would not expect that - but as I stated, I cannot really try it, so you may be correct.

                                Can you try to do, in your download folder,

                                rm emulationstation
                                wget https://github.com/pjft/EmulationStation/releases/download/v0.2-folders/emulationstation
                                

                                And/or run

                                openssl md5 emulationstation
                                

                                after you download it? The MD5 hash should be

                                MD5(emulationstation)= 40788fa142f00d21d148cc25cf93975e

                                I believe wget does not overwrite the previously downloaded file, but rather creates a side copy with .1 and .2 , so maybe you're still copying your old file?

                                Let me know, thanks for the patience here.

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

                                  @pjft I performed the remove rm and the openssl md5 and got the numbers you suggested. Rebooted and I still get the standard version number for ES at the bottom.

                                  Again ran tests, same issue as before, error code when there is a game not on the gamelist.

                                  this time the error code was the original error code,
                                  Terminate called after throwing on instance of 'std: out_of_range'
                                  what() map: : at
                                  Aborted

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

                                    @TMNTturtlguy Thanks.

                                    Let me re-check here for something, and see if I can upload a new binary.

                                    If you do

                                    less /home/pi/.emulationstation/es_log.txt
                                    

                                    what do you get in the first line? You should get

                                    "EmulationStation - v2.1.5rp-FOLDERS-2, built Mar 18 2017 - 15:31:35"

                                    at least that's what I get here. :|

                                    Also, if you do

                                    openssl md5 /opt/retropie/supplementary/emulationstation/emulationstation
                                    

                                    what do you get? Do you get the same

                                    MD5(emulationstation)= 40788fa142f00d21d148cc25cf93975e

                                    ?

                                    The underrun errors are normal, unfortunately, and have plagued ES on the Pi since its inception :)

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

                                      @pjft When i run less /home/pi/.emulationstation/es_log.txt i get the following:
                                      EmulationStation-v2.1.5rp, built Mar 17 2017 -15:56:26

                                      When i run openssl i get the following:
                                      MD5(/opt/retropie/supplemtary/emulationstation/emulationstation)=22a562e5be5e64743c0b43c985fa962f

                                      edit - i mistakenly misspelled supplementary above in the output. In reality, the line does have the correct spelling. Thanks

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

                                        @TMNTturtlguy Well, that does confirm that you are not running the right version of emulationstation, as the MD5 hash of the binary is not the one you downloaded. :)

                                        Did you per chance forget to copy the one you downloaded to the executable path? You'll need to quit emulationstation for that to work, as it won't overwrite the file if it's being run. :)

                                        From scratch, in the command line after exiting emulationstation, or logging in via SSH:

                                        1. Remove any temporary emulationstation file from the current folder

                                          rm emulationstation

                                        2. Download emulationstation and confirm it's the right one

                                          wget https://github.com/pjft/EmulationStation/releases/download/v0.2-folders/emulationstation
                                          openssl md5 emulationstation

                                        It should have the MD5 as

                                        MD5(emulationstation)= 40788fa142f00d21d148cc25cf93975e

                                        1. If all of it went well, then now let's replace the binary with this one, and confirm it's there.

                                          chmod +x emulationstation
                                          sudo cp emulationstation /opt/retropie/supplementary/emulationstation/
                                          openssl md5 /opt/retropie/supplementary/emulationstation/emulationstation

                                        It should give you now the right MD5 hash - 40788fa142f00d21d148cc25cf93975e :)

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

                                          @pjft ok, i have it running now, the version now says folders-2. I can confirm that i did those steps the first few times, and i did it again with no luck. I reformated my sd card and loaded up my image file made yesterday prior to starting testing. I then ran the remove and reinstall and now we are in business. Not sure what is up with that, but i am guessing i wasn't getting the downloaded file to overwrite for some reason. Regardless, back in business and everything matches your numbers. I will now run some tests and get back to you. Thanks and sorry for the wasted time on this.

                                          1 Reply Last reply Reply Quote 1
                                          • TMNTturtlguyT
                                            TMNTturtlguy
                                            last edited by TMNTturtlguy

                                            @pjft SUCCESS! ok, so now that i have the correct version running, I tested out only in a video theme at this point. I tested in carbon video again. Everything works as expected in the NES folder with video preview, in the PSX folder which contains the games within subfolders, and in systems with only image previews and no video previews. Everything works great.

                                            I then added a game to the PSX system. I restarted ES and scrolled through. Now when I get to the game that is not on the gamelist, it shows up, there is not image or metadata, i can open and run the game and everything works as expected. Success!

                                            Now that we are at this point. Do you want me to rerun all of the original tests?

                                            This is awesome work, thank you so much.

                                            Edit- i also tested out the metadata and i can access the metadata from the options menu. I edited the name and other data. Saved. restarted ES and it was all there as it should be, again success.

                                            1 Reply Last reply Reply Quote 1
                                            • 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.