mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-14 08:01:35 +09:00
Script : encoding script automation
This commit is contained in:
@ -419,6 +419,8 @@ capture was not aborted."
|
|||||||
"foc" '(lambda () (interactive) (find-file (expand-file-name "~/.doom.d/config.el")))
|
"foc" '(lambda () (interactive) (find-file (expand-file-name "~/.doom.d/config.el")))
|
||||||
:desc "doom package.el"
|
:desc "doom package.el"
|
||||||
"fop" '(lambda () (interactive) (find-file (expand-file-name "~/.doom.d/packages.el")))
|
"fop" '(lambda () (interactive) (find-file (expand-file-name "~/.doom.d/packages.el")))
|
||||||
|
:desc "doom init.el"
|
||||||
|
"foi" '(lambda () (interactive) (find-file (expand-file-name "~/.doom.d/init.el")))
|
||||||
;; Eshell
|
;; Eshell
|
||||||
:desc "eshell"
|
:desc "eshell"
|
||||||
"e" '(:ignore t)
|
"e" '(:ignore t)
|
||||||
|
|||||||
@ -1,12 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#Input Directory
|
#Input Directory
|
||||||
input_dir=/mnt/wsl/PHYSICALDRIVE1/input/WAAA
|
input_dir=$1 #~/mnt/EAST/Aimi\ Rei
|
||||||
output_dir=~/Downloads/input
|
output_dir=~/Downloads/input
|
||||||
|
|
||||||
# get bitrate
|
# get bitrate
|
||||||
mediainfo --Output="General;File Name: %FileName%\r\n
|
|
||||||
Video;BitRate: %BitRate/String%\r\nDimensions : %Width%x%Height%\r\n\n" *.mp4
|
|
||||||
|
|
||||||
|
|
||||||
walk_dir () {
|
walk_dir () {
|
||||||
@ -17,9 +15,17 @@ walk_dir () {
|
|||||||
walk_dir "$pathname"
|
walk_dir "$pathname"
|
||||||
else
|
else
|
||||||
#printf '%s\n' "$pathname"
|
#printf '%s\n' "$pathname"
|
||||||
base_name=$(basename ${pathname}) # only filename
|
base_name=$(basename "${pathname}") # only filename
|
||||||
|
if [[ "$base_name" == *mp4 ]]; then
|
||||||
|
brate=$(mediainfo --Output="Video;%BitRate%" "$pathname")
|
||||||
|
brate_int=$((brate))
|
||||||
|
printf "$base_name 's bit rate is $brate_int\n"
|
||||||
|
if [ $brate_int -gt 550000 ]; then
|
||||||
|
HandBrakeCLI -i "$pathname" -o $output_dir/$base_name -Z "General/Very Fast 480p30" --no-two-pass -b 500
|
||||||
|
fi
|
||||||
|
fi
|
||||||
#printf '%s, %s\n' "$base_name" "$output_dir/$base_name"
|
#printf '%s, %s\n' "$base_name" "$output_dir/$base_name"
|
||||||
HandBrakeCLI -i $pathname -o $output_dir/$base_name -Z "General/Very Fast 480p30" --no-two-pass -b 500
|
#HandBrakeCLI -i $pathname -o $output_dir/$base_name -Z "General/Very Fast 480p30" --no-two-pass -b 500
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user