summaryrefslogtreecommitdiffstats
path: root/firefox-youtube-handler
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-09-10 11:59:18 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-09-10 11:59:18 +0200
commita65c4c428c03fbaa5ae1a4cf2848b39894cfdfd6 (patch)
tree10531a1a13c27066f6b9a2d3e0235e7395220ab8 /firefox-youtube-handler
parent0073c5be49afb0ff2a39e0304192a1750c847a35 (diff)
downloadbin-a65c4c428c03fbaa5ae1a4cf2848b39894cfdfd6.tar.gz
bin-a65c4c428c03fbaa5ae1a4cf2848b39894cfdfd6.tar.xz
firefox-youtube-handler: Let mpv do the heavy lifting
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'firefox-youtube-handler')
-rwxr-xr-xfirefox-youtube-handler8
1 files changed, 5 insertions, 3 deletions
diff --git a/firefox-youtube-handler b/firefox-youtube-handler
index 598ec56..60b1fb8 100755
--- a/firefox-youtube-handler
+++ b/firefox-youtube-handler
@@ -8,13 +8,15 @@ proto='yt://'
url=$1
id=${url##$proto}
-audiourl="$(youtube-dl -g -f 141/140 -- "$id")"
-videourl="$(youtube-dl -g -f 138/264/299/137/298/136/135/134 -- "$id")"
+mpv --ytdl-format=bestvideo+bestaudio "https://youtube.com/watch?v=$id"
+
+#audiourl="$(youtube-dl -g -f 141/140 -- "$id")"
+#videourl="$(youtube-dl -g -f 138/264/299/137/298/136/135/134 -- "$id")"
#audiourl="$(youtube-dl -g -f bestaudio -- "$id")"
#videourl="$(youtube-dl -g -f bestvideo -- "$id")"
#vlc "$videourl" --input-slave "$audiourl"
-mpv --really-quiet --title "YouTube - $id" --no-cache --demuxer-lavf-o=fflags=+ignidx "$videourl" --audio-file "$audiourl"
+#mpv --really-quiet --title "YouTube - $id" --no-cache --demuxer-lavf-o=fflags=+ignidx "$videourl" --audio-file "$audiourl"
#mplayer "$videourl" -audiofile "$audiourl"
# max 720p because youtube serves 1080p only via DASH (seperate audio/video streams)