Skip to content

Instantly share code, notes, and snippets.

View macfanr's full-sized avatar
🙂
I may be slow to respond.

Danny macfanr

🙂
I may be slow to respond.
View GitHub Profile
@macfanr
macfanr / removelogo.sh
Last active July 2, 2017 11:40
remove logo with ffmpeg
#!/bin/sh
if [ $# != 2 ]; then
echo "usage: videoshot.sh /Users/danny/MyVideoDir /Users/danny/MyOutputDir"
exit -1
fi
inputDir=$1
outputDir=$2
binaryEXE=./ffmpeg
@macfanr
macfanr / videoshot.sh
Last active October 28, 2016 03:58
video shots with ffmpeg
#!/bin/sh
function random()
{
duration=`./ffmpeg -i "${file}" 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// | sed 's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }'`
# echo "$duration"
min=15
if [ $duration -gt $min ]
then