aboutsummaryrefslogtreecommitdiff
path: root/youtube-player
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-11-24 12:03:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-11-24 12:03:59 -0200
commitb9e8338307a279ec648c6acc269ba5abc5d28c7e (patch)
tree0df98974edc671a82a61099ef60b027fe2ffeea9 /youtube-player
parentc6bd78be5febfa28838d99d697d9f30dde0f625f (diff)
downloadscripts-b9e8338307a279ec648c6acc269ba5abc5d28c7e.tar.gz
scripts-b9e8338307a279ec648c6acc269ba5abc5d28c7e.tar.bz2
Adss youtube-player
Diffstat (limited to 'youtube-player')
-rwxr-xr-xyoutube-player18
1 files changed, 18 insertions, 0 deletions
diff --git a/youtube-player b/youtube-player
new file mode 100755
index 0000000..46b8dd5
--- /dev/null
+++ b/youtube-player
@@ -0,0 +1,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 -