Add downscale_all_mp4_in_current_folder_to_1080p.sh
This commit is contained in:
parent
2d8189a250
commit
a906b07b81
9
downscale_all_mp4_in_current_folder_to_1080p.sh
Executable file
9
downscale_all_mp4_in_current_folder_to_1080p.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for input_file in *.mp4 ; do
|
||||||
|
basename=$(basename -s .mp4 "$input_file")
|
||||||
|
old_file="${basename}.old.mp4"
|
||||||
|
mv "$input_file" "$old_file"
|
||||||
|
(ffmpeg -i "$old_file" -c:a copy -fps_mode passthrough -vf "scale=-1:'min(1080,ih)'" "$input_file" && rm "$old_file") || \
|
||||||
|
(mv "$input_file" "${input_file}.conv_err" && mv "$old_file" "$input_file")
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user