Skip to content

rpi-curious/yt-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YT Player

yt-player.sh a wrapper script for youtube-dl and omxplayer

The following covers how to install this branch within a user account

Byte size of yt-player.sh Open Issues Open Pull Requests Latest commits


Table of Contents


Quick Start

Install Dependencies

sudo pip install --upgrade youtube-dl

Git Commands

  1. Make a directory for Git sources

  2. Change current directory to sub-directory path

  3. Clone the source and any submodule dependencies

mkdir -vp "${HOME}/git/hub/rpi-curious"

cd "${HOME}/git/hub/rpi-curious"

git clone --recurse-submodules git@github.com:rpi-curious/yt-player.git

Install Commands

  1. Link yt-player.sh to a PATH accessible location

  2. Set ownership and executable permissions

mkdir ~/bin
ln -s "${HOME}/git/hub/rpi-curious/yt-player/yt-player.sh" "${HOME}/bin/"

chown ${USER}:${GROUPS} ~/bin/yt-player.sh
chmod u+x "${HOME}/git/hub/rpi-curious/yt-player/yt-player.sh"

Update

  1. Change directory to repository root

  2. Pull changes to source code

  3. Update submodules utilized by this repository

cd "${HOME}/git/hub/rpi-curious/yt-player"

git pull

git submodule update --init --recursive --merge

YT Player API

Arguments Type Description
both hdmi local alsa boolean Set audio output for omxplayer
10 -10 number Set volume in millibels for omxplayer
http* string space separated list of URLs for youtube-dl to parse

Example

yt-player.sh hdmi 10\
 'https://www.youtube.com/playlist?list=PL45KLPZcC-zM_G2wTBt6NH-oqXUYt3ns7'\
 'https://www.youtube.com/watch?v=jxf8NBA3STc'\
 'https://www.youtube.com/watch?v=nuNVRKBkfXI'

Notes

Silent pauses are to be expected for playlists, this is likely because of parsing youtube-dl output via Bash (receives entire list), where as Python generators might shorten wait times; but that is speculation.

Live streams do not work as of last test, however, one may consider streamlink...

sudo pip install --upgrade streamlink

... for such needs, check reddit discussion for omxplayer specific settings.


License

YT Player quick start documentation
Copyright (C) 2019  S0AndS0

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.