Add the vid2twitter script
This commit is contained in:
parent
50737293be
commit
913942f042
1 changed files with 22 additions and 0 deletions
22
bin/vid2twitter
Executable file
22
bin/vid2twitter
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
INPUT="$1"
|
||||||
|
OUTPUT="${INPUT%.*}.mp4"
|
||||||
|
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "Usage: vid2twitter [source_video_file]" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$OUTPUT" ]; then
|
||||||
|
echo -n "$OUTPUT: file exists, overwrite? (y|N) "
|
||||||
|
read -r overwrite
|
||||||
|
case "${overwrite,,}" in
|
||||||
|
"y" | "yes") ;;
|
||||||
|
*)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
ffmpeg -i "$INPUT" -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac "$OUTPUT"
|
Loading…
Reference in a new issue