-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_ffmpeg_outputs.sh
More file actions
executable file
·35 lines (24 loc) · 1.35 KB
/
create_ffmpeg_outputs.sh
File metadata and controls
executable file
·35 lines (24 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
OUTPUT_CLIP="outputs/ffmpeg_h264_nosound.mp4"
echo "Creating $OUTPUT_CLIP"
ffmpeg -y -framerate 25 -start_number 0 -i images/frame_%04d.jpg -f mp4 -c:v libx264 -pix_fmt yuv420p -vb 1M -t 2.40 $OUTPUT_CLIP >/dev/null 2>&1
echo "$OUTPUT_CLIP duration (expected 2.40s)"
ffprobe $OUTPUT_CLIP 2>&1 | grep "Duration:"
echo ""
OUTPUT_CLIP="outputs/ffmpeg_h264_aac.mp4"
echo "Creating $OUTPUT_CLIP"
ffmpeg -y -framerate 25 -start_number 0 -i images/frame_%04d.jpg -i sounds/cc0_24s.wav -f mp4 -c:v libx264 -pix_fmt yuv420p -vb 1M -c:a aac -t 2.40 $OUTPUT_CLIP >/dev/null 2>&1
echo "$OUTPUT_CLIP duration (expected 2.40s)"
ffprobe $OUTPUT_CLIP 2>&1 | grep "Duration:"
echo ""
OUTPUT_CLIP="outputs/ffmpeg_h264_mp3.mp4"
echo "Creating $OUTPUT_CLIP"
ffmpeg -y -framerate 25 -start_number 0 -i images/frame_%04d.jpg -i sounds/cc0_24s.wav -f mp4 -c:v libx264 -pix_fmt yuv420p -vb 1M -c:a mp3 -t 2.40 $OUTPUT_CLIP >/dev/null 2>&1
echo "$OUTPUT_CLIP duration (expected 2.40s)"
ffprobe $OUTPUT_CLIP 2>&1 | grep "Duration:"
echo ""
OUTPUT_CLIP="outputs/ffmpeg_vp8_vorbis.webm"
echo "Creating $OUTPUT_CLIP"
ffmpeg -y -framerate 25 -start_number 0 -i images/frame_%04d.jpg -i sounds/cc0_24s.wav -f webm -c:v vp8 -pix_fmt yuv420p -vb 1M -c:a libvorbis -t 2.40 $OUTPUT_CLIP >/dev/null 2>&1
echo "$OUTPUT_CLIP duration (expected 2.40s)"
ffprobe $OUTPUT_CLIP 2>&1 | grep "Duration:"
echo ""