Created
March 25, 2014 22:38
-
-
Save yurrriq/9773027 to your computer and use it in GitHub Desktop.
Creates a QuickTime-friendly MP4 ($3) from an image ($1) and an audio file ($2).
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
#!/bin/bash | |
if [ "$#" -eq 3 ]; then | |
IMAGE="$1" | |
AUDIO="$2" | |
OUTPUT="$3" | |
ffmpeg -loglevel panic \ | |
-f image2 -loop 1 \ | |
-i "$IMAGE" \ | |
-i "$AUDIO" \ | |
-c:v libx264 -tune stillimage \ | |
-c:a aac -strict experimental -b:a 320k \ | |
-pix_fmt yuv420p \ | |
-shortest "$OUTPUT" && \ | |
open "$3" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment