m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlogitech12
-rwxr-xr-xmscz2pdfs2
-rwxr-xr-xyt-dl-choose17
3 files changed, 16 insertions, 15 deletions
diff --git a/logitech b/logitech
index 66bf61a..2ac35bb 100755
--- a/logitech
+++ b/logitech
@@ -6,6 +6,9 @@
# there's only one webcam connected.
# NOTE: when one of the parameters is set, auto-setting it by the webcam is
# disabled.
+#
+# Getting device info:
+# v4l2-ctl -d <device ID> --all
device=
exposure=
@@ -30,9 +33,8 @@ if [ -z "$device" ]; then
fi
if [ -n "$exposure" ]; then
- v4l2-ctl -d "$device" --set-ctrl exposure_auto=1
- v4l2-ctl -d "$device" --set-ctrl exposure_auto_priority=0
- v4l2-ctl -d "$device" --set-ctrl exposure_absolute="$exposure"
+ v4l2-ctl -d "$device" --set-ctrl auto_exposure=1
+ v4l2-ctl -d "$device" --set-ctrl exposure_time_absolute="$exposure"
fi
if [ -n "$gain" ]; then
@@ -40,11 +42,11 @@ if [ -n "$gain" ]; then
fi
if [ -n "$temperature" ]; then
- v4l2-ctl -d "$device" --set-ctrl white_balance_temperature_auto=0
+ v4l2-ctl -d "$device" --set-ctrl white_balance_automatic=0
v4l2-ctl -d "$device" --set-ctrl white_balance_temperature="$temperature"
fi
if [ -n "$focus" ]; then
- v4l2-ctl -d "$device" --set-ctrl focus_auto=0
+ v4l2-ctl -d "$device" --set-ctrl focus_automatic_absolute=0
v4l2-ctl -d "$device" --set-ctrl focus_absolute="$focus"
fi
diff --git a/mscz2pdfs b/mscz2pdfs
index e037086..8d3731a 100755
--- a/mscz2pdfs
+++ b/mscz2pdfs
@@ -23,7 +23,7 @@ base_filename=${score##*/}
json=`mktemp "/tmp/tmp-XXXXXXX.json"`
echo "putting json in $json"
-musescore --score-parts-pdf "$score" > "$json"
+mscore3 --score-parts-pdf "$score" > "$json"
parts=`jq --raw-output '.parts[]' "$json"`
diff --git a/yt-dl-choose b/yt-dl-choose
index 7d33588..63a78a7 100755
--- a/yt-dl-choose
+++ b/yt-dl-choose
@@ -22,15 +22,14 @@ if [[ $NO_PLAYLIST ]]; then
URL=`echo "$URL" | sed -e 's/&list=.*&/\&/'`
fi
-formats=`yt-dlp --list-formats $URL \
- | grep -v "audio only" \
- | grep -v "video only" \
- | grep -v mhtml \
- | sed '0,/---------/d' `
-format=`echo "$formats" | dmenu | cut -d' ' -f1`
-
-if [ -z "$format" ]; then
+video_formats=`yt-dlp --list-formats $URL \
+ | grep "video only" \
+ | grep -v mhtml`
+echo "video formats are:\n$video_formats"
+video_format=`echo "$video_formats" | dmenu | cut -d' ' -f1`
+
+if [ -z "$video_format" ]; then
exit 0;
fi
-mpv --ytdl-format=$format $1
+mpv --ytdl-format="$video_format+bestaudio" $URL