Giter Club home page Giter Club logo

retropie-convert-videos's Introduction

RetroPie Convert Videos GitHub release (latest by date)

A tool for RetroPie to convert videos.

WARNING: The Raspberry Pi doesn't have that much power and converting videos is very demanding. It takes about 35 seconds to convert a video, so if you have a lot of videos... Do the math ;)

Prerequisites

At this moment this script only works with videos downloaded using:

Use the ROM folder for gamelists & images option in Steven Selph's Scraper.

Use the ROM folder for gamelists & media option in Lars Muldjord's Skyscraper.

Installation

cd /home/pi/
git clone https://github.com/hiulit/RetroPie-Convert-Videos.git
cd RetroPie-Convert-Videos/
sudo chmod +x retropie-convert-videos.sh

Update

cd /home/pi/RetroPie-Convert-Videos/
git pull

Usage

./retropie-convert-videos.sh [OPTIONS]

If no options are passed, you will be prompted with a usage example:

USAGE: ./retropie-convert-videos.sh [OPTIONS]

Use './retropie-convert-videos.sh --help' to see all the options.

Before trying to convert any videos, --to-ces and --scraper must be set.

Once the conversion is finished, a new converted-<to_ces> folder with the resulting videos will be created in /home/pi/RetroPie/roms/<system>/images if you are using Steven Selph's Scraper or in /home/pi/RetroPie/roms/<system>/media/videos if you are using Lars Muldjord's Skyscraper. You can then replace the old videos with these ones.

Log files are stored in logs/.

Options

  • --help: Print the help message.
  • --path [OPTIONS]: Set the path to the ROMs folder. (optional)
  • --from-ces [OPTIONS]: Set Color Encoding System (C.E.S) to convert from. (optional)
  • --to-ces [OPTIONS]: Set Color Encoding System (C.E.S) to convert to. (mandatory)
  • --scraper [OPTIONS]: Set the scraper. (mandatory)
  • --convert-all: Convert videos for all systems. Warning! It can take a lot of time.
  • --convert-systems [OPTIONS]: Select systems to convert videos.
  • --gui [OPTIONS]: Start the GUI.
  • --version: Print the script version.

Examples

--help

Print the help message.

Example

./retropie-convert-videos.sh --help

--path [OPTIONS] (optional)

Set the path to the ROMs folder.

By default it's /home/pi/RetroPie/roms.

Options

  • path - The path to the ROMs folder.

Example

./retropie-convert-videos.sh --path "/path/to/your/roms/folder"

--from-ces [OPTIONS] (optional)

Set Color Encoding System (C.E.S) to convert from in the config file.

Target only videos with this particular C.E.S. If left blank, it will target all videos, regardless of the C.E.S.

In most cases, you'd want to set it to yuv444p as this is the C.E.S that gives errors when using the OMX player.

Options

  • C.E.S - Color Encoding System (C.E.S) to convert from.

Example

./retropie-convert-videos.sh --from-ces "yuv444p"

--to-ces [OPTIONS] (mandatory)

Set Color Encoding System (C.E.S) to convert to in the config file.

Convert videos to this particular C.E.S.

In most cases, you'd want to set it to yuv420p as this is the C.E.S that seems to work well with the OMX player.

Options

  • C.E.S - Color Encoding System (C.E.S) to convert to.

Example

./retropie-convert-videos.sh --to-ces "yuv420p"

--scraper (mandatory)

Set the scraper in the config file.

Options

  • sselph - Steven Selph's Scraper.
  • skyscraper - Lars Muldjord's Skyscraper.

Example

./retropie-convert-videos.sh --scraper "sselph"

--convert-all

Warning! It can take a lot of time.

Convert videos for all systems.

Checks the config file to see if at least the to_ces key has a value.

Example

./retropie-convert-videos.sh --convert-all

--convert-systems [OPTIONS]

Select systems to convert videos.

If no options are passed, it displays a checklist from which one or more systems can be selected.

Checks the config file to see if at least the to_ces key has a value.

Options

  • systems - Any of the system available in RetroPie's ROMS directory (e.g. nes, snes, megadrive, etc.). Systems must be quoted and comma-separated. See the example below.

Example (without options)

./retropie-convert-videos.sh --convert-systems

RetroPie Convert Videos select videos example

Example (with options)

./retropie-convert-videos.sh --convert-systems "nes, snes"

--gui [OPTIONS]

Start the GUI.

It lets you perform all the functions, but in a more friendly manner.

RetroPie Convert Videos GUI example

Options

  • standalone - Launch the script without checking if RetroPie is installed, which it does by default.

Example (without options)

./retropie-convert-videos.sh --gui

Example (with options)

./retropie-convert-videos.sh --gui standalone

--version

Print the script's version.

Example

./retropie-convert-videos.sh --version

Config file

When setting the C.E.S using --from-ces or --to-ces, or when using --scraper or --path, the generated values are stored in retropie-convert-videos-settings.cfg.

# Settings for RetroPie Convert Videos.
#
# TIP: run the 'ffmpeg -pix_fmts' command to get a full list of Color Encoding Systems (C.E.S).

# From color (optional)
# Target only videos with this particular C.E.S.
# If left blank, it will target all videos, regardless of the C.E.S.
# (e.g. "yuv444p")

from_ces = ""

# To color (mandatory)
# Convert videos to this particular C.E.S.
# (e.g. "yuv420p")

to_ces = ""

# Scraper (mandatory)
# The scraper used to get the videos.
# Available scrapers:
# - "sselph" (Steven Selph's Scraper).
# - "skyscraper" (Lars Muldjord's Skyscraper).

scraper = ""

# ROMs folder path (optional)
# Set the path to the ROMs folder. By default it's "/home/pi/RetroPie/roms".
# (e.g. "/path/to/your/roms/folder")

roms_path = ""

You can edit this file directly instead of using --from-ces, --to-ces, --scraper or --path.

Changelog

See CHANGELOG.

Contributing

See CONTRIBUTING.

Authors

Credits

Thanks to:

License

MIT License.

retropie-convert-videos's People

Contributors

edwardsd97 avatar hiulit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

retropie-convert-videos's Issues

Port to Odroid?

We've got a running "RetroPie" build on Odroid XU4. I have some videos that were scraped from screenscraper.fr with the Skraper program. Some of the videos don't play correctly or at all inside EmulationStation. I thought maybe the colorspace was wrong. I had a similar issue on the Raspberry Pi in the past and this tool worked a treat. Is there any possibility it could be ported over to that system? I'm not sure what information you need if this is a possibility. I'd be more than happy to find out for you and write back. Just let me know!

avconv will fail out with segmentation fault on many videos

There appears to be an existing known issue with avconv that has some known repros.
https://lists.libav.org/pipermail/libav-bugs/2014-January/002969.html

The crash will output an error similar to:
Error in `/usr/bin/avconv': realloc(): invalid next size

It feels like with all the options that avconv offers there might be some way to tweak them so it avoids this.

I have uploaded an example video that will fail in this way.

1941-video.zip

Nested folders in arcade

I have folders in arcade such as CPS1, and filters rom sets (from arcade manager). The gui doesn't see the arcade folder and subfolders. Is there a way to have the script look in subfolders? If not how would I call the script into one of the subdirectories?

This is also an issue with Daphne that has two levels deep and sub nested roms folder.

/roms/arcade/cps1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.