Fix the export of audio.wav (don't trim to 15 seconds). Use 5 zero numbers for longer videos.

This commit is contained in:
litter 2020-02-15 13:31:24 -05:00
parent bb1583383f
commit 42af9d2fd9
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ mkdir -p "$AUDIO_DIR"
echo "Exporting ${VIDEO}..."
rm "${FRAMES_DIR}*.png"
ffmpeg -y -i "${VIDEO}" -f image2 -r 24 "${FRAMES_DIR}image-%04d.png"
ffmpeg -y -i "${VIDEO}" -f image2 -r 24 "${FRAMES_DIR}image-%05d.png"
if [ "$WITH_SOUND" == "true" ]; then
echo "Exporting audio from ${VIDEO}..."
ffmpeg -y -i "${VIDEO}" -y -acodec pcm_s16le -ac 1 -ar $AUDIO_RATE -ss "$START" -t 15 "${AUDIO_DIR}audio.wav"
ffmpeg -y -i "${VIDEO}" -y -acodec pcm_s16le -ac 1 -ar $AUDIO_RATE "${AUDIO_DIR}audio.wav"
fi