Ffmpeg
Copying Files
cp -av /camera /local # Keep the file modify times function rename { ORIG_FILE=$1 PREFIX="SANYO_" TOUCH_ARG=`stat -f "%Sm" -t "%Y%m%d%H%M.%S" $ORIG_FILE` NAME_TIMESTAMP=`stat -f "%Sm" -t "%Y%m%d_%H%M%S" $ORIG_FILE` NEW_NAME="${PREFIX}${NAME_TIMESTAMP}.mp4" #echo "Moving $ORIG_FILE to $NEW_NAME" mv -v $ORIG_FILE $NEW_NAME touch -t $TOUCH_ARG $NEW_NAME }
H.264 encoding
- Also set resolution and bitrate all at the same time:
ffmpeg -i VID_20160918_113318088.mp4 -vprofile high -codec:v libx264 -preset slow -b:v 2500k -maxrate 2500k -bufsize 5000k -vf scale=-2:720 -threads 0 -codec:a aac -b:a 128k ../HD_size/VID_20160918_113318088_720.mp4
ffmpeg -r 1 -i img%01d.png -vcodec mpeg4 -y movie.mp4
- fps is defined with the "-r" bit - so "-r 1" would be 1 fps, "-r 30" would be 30, etc.