Add ffmpeg convenience scripts
This commit is contained in:
23
pic2vid.sh
Normal file
23
pic2vid.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z $1 ] ; then
|
||||
echo "need input file at position 1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
input=$1
|
||||
|
||||
if ! [ -f $input ] ; then
|
||||
echo "$input does not appear to exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
basename=${input%.*}
|
||||
output="${basename}.mp4"
|
||||
|
||||
echo "input: $input"
|
||||
echo "output: $output"
|
||||
|
||||
ffmpeg -loop 1 -i $input -c:v libx264 -t 8000 -pix_fmt yuv420p -vf scale=640:480 $output
|
||||
23
standardize_video.sh
Normal file
23
standardize_video.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z $1 ] ; then
|
||||
echo "need input file at position 1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
input=$1
|
||||
|
||||
if ! [ -f $input ] ; then
|
||||
echo "$input does not appear to exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
basename=${input%.*}
|
||||
output="${basename}_small.mp4"
|
||||
|
||||
echo "input: $input"
|
||||
echo "output: $output"
|
||||
|
||||
ffmpeg -t 8000 -i $input -s 720x480 -c:a copy $output
|
||||
Reference in New Issue
Block a user