From 27cdbc317cffb86fe58cb889bd4c0c55061e021d Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 20 Oct 2020 23:30:54 +0100 Subject: [PATCH] initial commit --- README.md | 13 +++++++++++++ cams/czechia-prague-ai | 2 ++ cams/italy-syracuse-airport-south | 2 ++ cams/japan-nagasaki-airport | 2 ++ cams/launcher.sh | 7 +++++++ cams/mars | 2 ++ cams/romania-brasov-michael-weiss | 2 ++ cams/russia-yсть-kут | 2 ++ cams/thailand-koh-samui-tropical-murphys-bar | 2 ++ cams/usa-everett-smith-ave | 2 ++ new | 9 +++++++++ 11 files changed, 45 insertions(+) create mode 100644 README.md create mode 100755 cams/czechia-prague-ai create mode 100755 cams/italy-syracuse-airport-south create mode 100755 cams/japan-nagasaki-airport create mode 100755 cams/launcher.sh create mode 100755 cams/mars create mode 100755 cams/romania-brasov-michael-weiss create mode 100755 cams/russia-yсть-kут create mode 100755 cams/thailand-koh-samui-tropical-murphys-bar create mode 100755 cams/usa-everett-smith-ave create mode 100755 new diff --git a/README.md b/README.md new file mode 100644 index 0000000..27ebda5 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +Create a stream launcher with: + +```sh +./new name url +``` + +Launch an mpv cam feed with: + +```sh +./cam/name [max-quality] +``` + +Where `max-quality` is a height (e.g., `720` means a maximum quality of '720p'). diff --git a/cams/czechia-prague-ai b/cams/czechia-prague-ai new file mode 100755 index 0000000..61fde79 --- /dev/null +++ b/cams/czechia-prague-ai @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=Wi2h6BpRcns" "$1" diff --git a/cams/italy-syracuse-airport-south b/cams/italy-syracuse-airport-south new file mode 100755 index 0000000..0c4de79 --- /dev/null +++ b/cams/italy-syracuse-airport-south @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=dSycFECDqME" "$1" diff --git a/cams/japan-nagasaki-airport b/cams/japan-nagasaki-airport new file mode 100755 index 0000000..774f9d3 --- /dev/null +++ b/cams/japan-nagasaki-airport @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=Z591sNEtPgs" "$1" diff --git a/cams/launcher.sh b/cams/launcher.sh new file mode 100755 index 0000000..9ebba5f --- /dev/null +++ b/cams/launcher.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -n "$2" ] ; then + _max_quality="$2" +else + _max_quality="480" +fi +bspc rule --add mpv --one-shot state=tiled && mpv --ytdl-raw-options=format='best[height<='"$_max_quality"']' "$1" & disown diff --git a/cams/mars b/cams/mars new file mode 100755 index 0000000..774f9d3 --- /dev/null +++ b/cams/mars @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=Z591sNEtPgs" "$1" diff --git a/cams/romania-brasov-michael-weiss b/cams/romania-brasov-michael-weiss new file mode 100755 index 0000000..b548401 --- /dev/null +++ b/cams/romania-brasov-michael-weiss @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=G05wmWFDtSo" "$1" diff --git a/cams/russia-yсть-kут b/cams/russia-yсть-kут new file mode 100755 index 0000000..d16312b --- /dev/null +++ b/cams/russia-yсть-kут @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=hO9Nkorupv4" "$1" diff --git a/cams/thailand-koh-samui-tropical-murphys-bar b/cams/thailand-koh-samui-tropical-murphys-bar new file mode 100755 index 0000000..c8e62f0 --- /dev/null +++ b/cams/thailand-koh-samui-tropical-murphys-bar @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=0Ns1sNoUSaY" "$1" diff --git a/cams/usa-everett-smith-ave b/cams/usa-everett-smith-ave new file mode 100755 index 0000000..006d9e1 --- /dev/null +++ b/cams/usa-everett-smith-ave @@ -0,0 +1,2 @@ +#!/bin/sh +./launcher.sh "https://www.youtube.com/watch?v=neo1hRZTO0s" "$1" diff --git a/new b/new new file mode 100755 index 0000000..3944253 --- /dev/null +++ b/new @@ -0,0 +1,9 @@ +#!/bin/sh + +_cam_directory='cams' +mkdir -p "$_cam_directory" + +echo '#!/bin/sh' >> "$_cam_directory/$1" +echo "bspc rule --add mpv --one-shot state=tiled && mpv \"$2\" & disown" >> "$_cam_directory/$1" +chmod +x "$_cam_directory/$1" +