Skip to content

Instantly share code, notes, and snippets.

@dmarov
Last active May 11, 2024 14:55
Show Gist options
  • Save dmarov/21f0d15bd44a690fa2b188ee0275c310 to your computer and use it in GitHub Desktop.
Save dmarov/21f0d15bd44a690fa2b188ee0275c310 to your computer and use it in GitHub Desktop.
#!/usr/bin/zsh
for file in ./h265x/*(.);
do
echo $file;
newfile="${file%.*}.h265"
if [[ ! -a $newfile ]]; then
mv "${file%.*}.h265x" $newfile;
fi
echo DONE;
done
for file in ./h265x/*(.);
do
echo $file;
newfile=$file:t
mp4file="./mp4/${newfile%.*}.mp4"
if [[ ! -a $mp4file ]]; then
ffmpeg -loglevel error -i $file -c:v libx265 -c:a copy -aspect 1920:1080 $mp4file
fi
echo DONE;
done
/home/md/python-env/bin/dvr-scan -i ./mp4/*.mp4 --threshold 0.9 --output ./dvr-scan/output.avi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment