Created
September 29, 2023 01:07
-
-
Save geraldurbas/5285c6007fc0e6a35f2491ce9098037d to your computer and use it in GitHub Desktop.
AVI & Mp4 Slideshow with ffmpeg for Hunter Camera Images
This file contains hidden or 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
for i in $(find /somepath -type f -name "DSCF0001.JPG") | |
do | |
path="${i//DSCF0001.JPG/}" | |
cd $path | |
if [ ! -f "outputFinal.avi" ]; then | |
su - www-data -s /bin/bash -c "cd $path; ffmpeg -f image2 -framerate 3 -pattern_type glob -i '*.JPG' -s 3072x1728 outputFinal.avi" | |
fi | |
if [ ! -f "outputFinal.mp4" ]; then | |
su - www-data -s /bin/bash -c "cd $path; ffmpeg -f image2 -framerate 3 -pattern_type glob -i '*.JPG' -s 3072x1728 outputFinal.mp4" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment