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

    Lars Muldjord's Skyscraper no video

    Scheduled Pinned Locked Moved Help and Support
    skyscraperretropie x86
    8 Posts 5 Posters 757 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.
    • D
      Drdave79
      last edited by Drdave79

      While using Lars Muldjord's Skyscraper, I still get no video previews on some systems. 85% of the systems have video previews, but some are random. In my Playstation or Dreamcast list in emulation station, for example, maybe 25% of the games have a video preview. Out of 500+ games. So it's not all or nothing. Of course I have video downloads enabled in skyscraper and everything's been updated.

      Any other suggestions please? Thanks.

      muldjordM Lister of SmegL 2 Replies Last reply Reply Quote 0
      • muldjordM
        muldjord @Drdave79
        last edited by

        @drdave79 Did it find videos for the games? In that case it's probably related to the format of some of the videos. You should consider converting them. I can't remember how to do that, but try searching around for a bit. It's been mentioned a bunch of times on here.

        D 1 Reply Last reply Reply Quote 0
        • Lister of SmegL
          Lister of Smeg @Drdave79
          last edited by

          @drdave79
          I think a lot of scraping success depends on how well the roms are named hence I try to aim for no-intro, TOSEC or Redump sets (arcade sets are usually ok when built from the correct dat)
          You can browse screenscraper.fr and see how closely your sets match up with theirs

          1 Reply Last reply Reply Quote 0
          • D
            Drdave79 @muldjord
            last edited by

            @muldjord Yes, I did. For example, in the psx\snap folder there's 3D Baseball (USA).mp4. In the psx folder, there's a 3D Baseball (USA).chd and 3D Baseball (USA).srm file. I even edited the gamelist.xml file to make sure it all matched.

            Still no video preview.

            S 1 Reply Last reply Reply Quote 0
            • S
              sleve_mcdichael @Drdave79
              last edited by sleve_mcdichael

              @drdave79 you can convert them with ffmpeg. If you don't have it already then install it with:

              sudo apt update && sudo apt install ffmpeg
              

              Put this script in ~/.skyscraper and make it executable:

              #! /bin/bash
              # Script provided by jgcobra
              
              echo Converting video...
              echo Source: $1
              echo Dest: $2
              
              # Check if the video is already in 420p format
              c=$(ffprobe "$1" 2>&1 | grep -c yuv420p)
              
              if [ "$c" -eq 0 ]
              then
                  echo Incorrect source video format detected. Converting video to 420p format...
                  ffmpeg -i "$1" -y -pix_fmt yuv420p -acodec copy -strict experimental "$2"
              else
                  echo Video is in correct 420p format. Copying as is...
                  cp "$1" "$2"
              fi
              

              In the same directory, edit config.ini and add this line to the [main] section (using the actual script's name in place of scriptName.sh):

              videoConvertCommand="scriptName.sh %i %o"
              

              This will probe the videos on initial download and convert them if necessary.

              It will not affect existing videos, however. For that, put this other script in /usr/local/bin (you'll need to use sudo) and make it executable as well. Then run it from inside your video directory (place it and chmod it using sudo; do not run it using sudo or the new files may have the wrong permissions.) Having it placed in /usr/local/bin means you can run the script from anywhere just by typing it's name, without the full or relative path. Existing videos will not be overwritten; converted videos will be saved to a converted/ directory. Move them one level up to use. Not all videos will be converted, only those in yuv444p will be converted to yuv420p.

              #! /bin/bash
              # Script provided by Clyde
              
              mkdir -p converted    # create the folder "converted" if it doesn't exist
              for f in *.mp4        # process all videos in the current directory
                do
                  echo "$(pwd)/$f"  # show the processed file's name
                  c=$(ffprobe "$f" 2>&1 | grep -c yuv444p)  # (-c)ount no. of "444p"
              
                  if [ "$c" -gt 0 ]                         # if 444p is present,
                    then                                    # convert to 420p
                      ffmpeg -i "$f" -y -pix_fmt yuv420p -strict experimental converted/"$f"
                  fi
              done
              

              Edit: your existing Skyscraper cached videos will still be in the original format. If you want to cache the converted versions, you can re-download them with the --cache refresh option in Skyscraper, after setting up the first script to detect and convert.

              D ClydeC 2 Replies Last reply Reply Quote 1
              • D
                Drdave79 @sleve_mcdichael
                last edited by

                @sleve_mcdichael Thank you for those very detailed instructions. Quite a bit of it goes past my level of expertise here. I may have to download a fresh build and play around with this in fear of breaking my current build. This is pretty complicated.

                1 Reply Last reply Reply Quote 0
                • ClydeC
                  Clyde @sleve_mcdichael
                  last edited by

                  @sleve_mcdichael said in Lars Muldjord's Skyscraper no video:

                  Having it placed in /usr/local/bin means you can run the script from anywhere just by typing it's name, without the full or relative path.

                  Alternatively, you can put it in a directory bin in a user's home directory if you only need it for this user, e.g. /home/pi/bin for the user pi.

                  Edit: your existing Skyscraper cached videos will still be in the original format. If you want to cache the converted versions, you can re-download them with the --cache refresh option in Skyscraper, after setting up the first script to detect and convert.

                  Or you may convert the videos directly inside the cache. It's located in the hidden directory ~/.skyscraper/cache (only .skyscraperis hidden because of the leading dot in its name). There, the cache is organised in subdirectories for the resp. systems, e.g. arcade or snes, each containing a subdir videos, containing further subdirs for each scraping source.

                  So for example, if you saved my script as 444p-to-420p.shin either /usr/local/bin or ~/bin(~ points to the current user's home dir), and made it executable with chmod +x 440p-to-420p.sh, these two commands will convert all 444p arcade videos from ScreenScraper in Skyscraper's cache to 420p:

                  cd ~/.skyscraper/cache/arcade/videos/screenscraper
                  444p-to-420p.sh
                  

                  After that, you'll find any converted videos in ~/.skyscraper/cache/arcade/videos/screenscraper/converted. Check them for playability and then move them one directory upwards.

                  (This post is more for anyone interested than for you, @sleve_mcdichael, as I guess that you already know all this. πŸ˜‰ )

                  S 1 Reply Last reply Reply Quote 2
                  • S
                    sleve_mcdichael @Clyde
                    last edited by

                    @clyde ah, I hadn't considered converting them directly in the cache. That would save the trouble (and the bandwidth) of downloading them again just to do the same conversion anyway.

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