Jump to content
LaunchBox Community Forums
proghodet

Alternative to EmuMovies

Recommended Posts

Posted (edited)

I'm one of the few who doesn't have a subscription to emumovies, but i wanted to share my method for getting videos for LaunchBox.
YouTube has longplays of a vast majority of the games that I need, so I created a script to download videos from there.

It is a bit time consuming, and may require some technical know-how. If it's too much hassle, you may consider a subscription from emumovies instead 🤷‍♂️

Prerequisites:
You need to install the following programs:
Python* - ffmpeg - youtube-dl
Add all the programs to your path (guide)

* Python needs to be version 3.7. Didn't work with 3.8, for whatever reason. 

Optional:
I recommend using a text editor, such as Notepad++, Visual Studio Code, Atom, or something like that.
You can also use Notepad, but not a text processor such as Microsoft Word.

How to:
With all programs installed and added to your path, go to a folder where you'd like to download videos.
Right click, and choose new -> text document. Rename the file to "script", and be sure that the file extension is .py (e.g: script.py).
Open the document with your favorite text editor (if you don't have one, use notepad).
Paste the code below:

import subprocess
import re

# how long the videos will be; two minutes.
video_duration = "00:02:00.00"

videos = [
  # Duplicate this line:
  {"title": "Mega Man X", "youtube_url": "https://www.youtube.com/watch?v=0qMDQTF8uVQ", "start_time": "00:03:30.00"},
]

# no touchy:
for video in videos:
  links = subprocess.check_output(['youtube-dl', '-g', video["youtube_url"]]).splitlines()
  video_url = re.findall(r"'(.*?)'", str(links[0]), re.DOTALL)
  audio_url = re.findall(r"'(.*?)'", str(links[1]), re.DOTALL)
  print(subprocess.check_output(['ffmpeg', '-ss', video["start_time"], '-i', video_url, '-ss', video["start_time"], '-i', audio_url, '-t', video_duration, '-c', 'copy', video["title"] +".mp4"]))

I have added an example video (mega man x). Duplicate this line, and edit it as you see fit.
You can add as many videos as you'd like - I have tried with 70 videos, and it worked fine.
 

{"title": "Mega Man X", "youtube_url": "https://www.youtube.com/watch?v=0qMDQTF8uVQ", "start_time": "00:03:30.00"},

- Set the game title - it should be the same as the game title in LaunchBox.
- Add a link to the youtube video*.
- Choose where in the video it should start recording from. (The syntax is HH:MM:SS.mm, so hour, minute, seconds, milliseconds)

* If the youtube-link has an & inside it, be sure to remove everything behind it, including the &.
e.g: If the link is: https://www.youtube.com/watch?v=TB6fwRRCzk8&list=PLpxuazQ7SB4wt7r_2BIxG0fDBtlcW-n5p
Make it: https://www.youtube.com/watch?v=TB6fwRRCzk8

When you have added all the videos you want, you can run the script
In order to do that we need to use the windows command prompt.
Open it by pressing the windows-key, and write cmd, and then press enter.
Finally, we can run the script:

python c:\wherever\script\is\script.py

If you have done everything right, you should now be downloading all the videos you added.
Lastly, just move the files from the script-folder to the correct path the LaunchBox folder, eg. LaunchBox\Videos\Sony Playstation\

Feel free to ask questions!

Edited by proghodet

Share this post


Link to post
Share on other sites
Posted (edited)

you can also just us "SKraperUI" out of the box to get videos just make sure it doesn't save a gamelist as it's not update frequently and "corrupts" the gamelists. 

https://www.skraper.net/

i genrally use launchbox for everything but videos and the come through with skraper and get the videos

Edited by drseussicide
  • Like 1

Share this post


Link to post
Share on other sites
16 minutes ago, drseussicide said:

you can also just us "SKraperUI" out of the box to get videos just make sure it doesn't save a gamelist as it's not update frequently and "corrupts" the gamelists. 

https://www.skraper.net/

i genrally use launchbox for everything but videos and the come through with skraper and get the videos

thank you. this is awesome and exactly what I expected for the Launchbox Games Database. 

Share this post


Link to post
Share on other sites

just make sure you don't let it save game lists and read it's settings thoroughly. it's really powerful and not super fast. it sucks to wait for it to finish only to find out it was set wrong somewhere. i'd suggest doing a smaller system first by itself to make sure you like the result.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...