![omniplayer v1.00 omniplayer v1.00](https://static.macupdate.com/screenshots/276739/m/omniplayer-screenshot.png)
If procname = "emulationstatio": # Killing 2 birds with one stone, while we look for emulators, make sure EmulationStation is still running.ĮsStarted=True # And turn it back to True, because it wasn't done running. _volume(maxvolume) # Pygame sets this to 1.0 on new song in case max volume -isnt- 1, set it to max volume.ĮsStarted=False #New check 4-23-16 - set this to False (assume ES is no longer running until proven otherwise) While currentsong = lastsong and len(bgm) > 1: #If we have more than one BGM, choose a new one until we get one that isn't what we just played.Ĭurrentsong = random.randint(0,len(bgm)-1) If not _busy(): # We aren't currently playing any music While (os.path.exists('/home/pi/PyScripts/DisableMusic')): If os.path.exists('/home/pi/PyScripts/DisableMusic'): #Check to see if the DisableMusic file exists if it does, stop doing everything! () #halt the music, emulationStation is not running!ĮsStarted=True # Will cause us to break out of the loop because ES is now running.
#Omniplayer v1.00 code#
There is code further down that, as part of the emulator loop, makes sure eS is running. While not esStarted: #New check (4/23/16) - Make sure EmulationStation is actually started. Time.sleep(1) #OMXPlayer is running, sleep 1 to prevent the need for a splash.Ĭurrentsong = bgm.index(startsong) #Set the currentsong to the index in BGM that is our startingsong.Ĭurrentsong = -1 #If this triggers, you probably screwed up the filename, because our startsong wasn't found in the list. If procname = "omxplayer" or procname = "omxplayer.bin": # Looking for a splash screen! #Look for OMXplayer - if it's running, someone's got a splash screen going! Time.sleep(startdelay) # Delay audio start per config option above #ES Should be going, see if we need to delay our start If procname = "emulationstatio": # Emulation Station's actual process name is apparently short 1 letter. #test: Ran into some issues with script crashing on a cold boot, so we're camping for emulationstation (if ES can start, so can we!) #TODO: Fill in all of the current RetroPie Emulator process names in this list.Įmulatornames = Volume = maxvolume # Store this for later use to handle fading out. oggįrom pygame import mixer # import PyGame's music mixer Startsong = "" # if this is not blank, this is the EXACT, CaSeSeNsAtIvE filename of the song you always want to play first on boot.īgm = ".mp3" or mp3 = ".ogg"] # Find everything that's.
![omniplayer v1.00 omniplayer v1.00](https://www.lizhi.io/wp-content/uploads/2021/05/omniplayer.png)
![omniplayer v1.00 omniplayer v1.00](https://i.ytimg.com/vi/aSkfkZ_pmN4/maxresdefault.jpg)
Restart = True # If true, this will cause the script to fade the music out and -stop- the song rather than pause it. Musicdir = '/home/pi/RetroPie/roms/music' If you have a splash screen with audio and the script is playing music over the top of it, increase this value to delay the script from starting. Startdelay = 0 # Value (in seconds) to delay audio start. #also that line is commented out as we import the mixer specifically a bit further down.
#Omniplayer v1.00 install#
If you want to keep connected devices over restarts, generate it first and pass it from then on.#import pygame # if you don't have pygame: sudo apt-get install python-pygame screen_id: The screen ID will be generated if not passed by -s flag.generic_cmd : all non-implemented commands.
#Omniplayer v1.00 tv#
Minimal dumb YouTube TV example (opens every video in a new browser window, no control possible): gotubecast -n "Dumb TV" -i dumb-v1 | while read lineĬmd="`cut -d ' ' -f1 : the device pairing code formatted with separating dashes Provided you have golang correctly set up: go get /gotubecast It doesn't have any dependencies and runs on any of the platforms supported by golang.įor example, use it on a Raspberry Pi in combination with youtube-dl and omxplayer for a DIY Chromecast clone or make a YouTube TVĮxtension for your favorite media center software. Play/pause/seek/volume change commands etc. It connects to the YouTube Leanback API and generates a text stream providing pairing codes, video IDs, Gotubecast is a small Go program which you can use to make your own YouTube TV player.