]> gitweb.fluxo.info Git - scripts.git/commitdiff
Adss youtube-player
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Nov 2016 14:03:59 +0000 (12:03 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Nov 2016 14:03:59 +0000 (12:03 -0200)
youtube-player [new file with mode: 0755]

diff --git a/youtube-player b/youtube-player
new file mode 100755 (executable)
index 0000000..46b8dd5
--- /dev/null
@@ -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 -