Created
October 12, 2019 09:19
-
-
Save repcsi/354da3c932af7579e61b76498d2d0d3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Under File Storage -> Run a command | |
/etc/motioneye/convert.sh %f | |
convert.sh: | |
#!/bin/bash | |
FILEPATH="$1" | |
TMPPATH=$(mktemp).mp4 | |
/usr/bin/ffmpeg -i "$FILEPATH" -pix_fmt yuv420p -vcodec libx264 -crf 20 "$TMPPATH" | |
/bin/rm -f "$FILEPATH" | |
/bin/mv "$TMPPATH" "$FILEPATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment