aboutsummaryrefslogtreecommitdiff
path: root/youtube-player
blob: 46b8dd5002d7a4b2afc51e6abb54d33bf5f16743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
#
# Youtube player from the command line
# https://unix.stackexchange.com/questions/160212/watch-youtube-videos-in-terminal
#

# Parameters
BASENAME="`basename $0`"
URL="$1"

# Check
if [ -z "$1" ]; then
  echo "usage: $BASENAME <url>"
  exit 1
fi

# Run
youtube-dl $URL -o - | mplayer -vo aa -monitorpixelaspect 0.5 -