sync-camera: copy MOV file and *then* convert.
This is important to at least not keep files on the device for too long.
This commit is contained in:
parent
cbb8d1a9e8
commit
e1ba233753
@ -88,8 +88,12 @@ do
|
|||||||
OUTPUT_PATH="$OUTPUT_DIR/${INPUT_FILE##*/}"
|
OUTPUT_PATH="$OUTPUT_DIR/${INPUT_FILE##*/}"
|
||||||
if ! [ -f "$OUTPUT_PATH" ]
|
if ! [ -f "$OUTPUT_PATH" ]
|
||||||
then
|
then
|
||||||
|
echo "Copying $INPUT_FILE to ${OUTPUT_PATH} ..."
|
||||||
|
cp "${INPUT_FILE}" "${OUTPUT_PATH}"
|
||||||
echo "Converting ${INPUT_FILE} to MP4 at ${OUTPUT_PATH::-4}.mp4 ..."
|
echo "Converting ${INPUT_FILE} to MP4 at ${OUTPUT_PATH::-4}.mp4 ..."
|
||||||
ffmpeg -loglevel fatal -nostdin -i "$INPUT_FILE" "${OUTPUT_PATH::-4}.mp4"
|
ffmpeg -loglevel fatal -nostdin -i "$OUTPUT_PATH" "${OUTPUT_PATH::-4}.mp4"
|
||||||
|
echo "Removing temporary file $OUTPUT_PATH ..."
|
||||||
|
rm "$OUTPUT_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $REMOVE_FILES -eq 1 ]
|
if [ $REMOVE_FILES -eq 1 ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user