aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocal/bin/translate-prompt4
-rwxr-xr-xlocal/bin/video-to-x26410
2 files changed, 12 insertions, 2 deletions
diff --git a/local/bin/translate-prompt b/local/bin/translate-prompt
index d1588da..fb23b56 100755
--- a/local/bin/translate-prompt
+++ b/local/bin/translate-prompt
@@ -10,6 +10,7 @@ command -v rofi > /dev/null &&
choice="$(
$menu_exec <<EOF
+From Selection
From Clipboard
Open Editor
EOF
@@ -20,6 +21,9 @@ EOF
text_file="$(mktemp /tmp/translate_prompt_text_XXXXXX)"
case "$choice" in
+ 'From Selection')
+ xsel --output > "$text_file"
+ ;;
'From Clipboard')
xclip -out -selection clipboard > "$text_file"
;;
diff --git a/local/bin/video-to-x264 b/local/bin/video-to-x264
index 2081029..dd93ca5 100755
--- a/local/bin/video-to-x264
+++ b/local/bin/video-to-x264
@@ -3,7 +3,13 @@
file_path="$1"
extension=
-ffmpeg -hwaccel cuda \
- -i "$file_path" \
+
+# CUDA options: -hwaccel cuda -hwaccel_output_format cuda -c:v h264_nvenc
+# seems slower on gpu tho
+# There is also -c:v hvec_nvenc
+#
+# Options to reduce size: -b:v 5M -crf 28
+
+ffmpeg -i "$file_path" \
-map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy \
"${file_path%%.*}-x264.${file_path##*.}"