MOVFLAGS="-movflags +frag_keyframe+empty_moov+default_base_moof+faststart" BITRATE_HI="-b:v 3840k" BITRATE_LO="-b:v 2560k" VIDEO_H264="-vcodec h264 $BITRATE_HI" VIDEO_H263="-vcodec h263 -b:v 1280k" VIDEO_JPEG="-vcodec mjpeg" VIDEO_VP8="-vcodec libvpx $BITRATE_HI" VIDEO_VP9="-vcodec libvpx-vp9 -row-mt 1 $BITRATE_LO" AUDIO_VORBIS="-acodec libvorbis -ac 2 -ar 44100 -vb 128k" AUDIO_OPUS="-acodec libopus -ac 2 -ar 48000 -vb 128k" AUDIO_AAC="-ac 2 -ar 44100 -vb 128k" AUDIO_MP3="-acodec libmp3lame -ac 2 -ar 44100 -vb 128k" AUDIO_MP2="-acodec mp2 -ac 2 -ar 44100 -vb 128k" AUDIO_ALAC="-acodec alac -sample_fmt s16 -ac 1 -ar 22050" if false then ffmpeg -i polyphon.ogv -vn $AUDIO_MP3 -y polyphon-mp3.mp3 ffmpeg -i polyphon.ogv -vn $AUDIO_MP3 $MOVFLAGS -y polyphon-mp3.mp4 ffmpeg -i polyphon.ogv -vn $AUDIO_AAC $MOVFLAGS -y polyphon-aac.mp4 ffmpeg -i polyphon.ogv -vn $AUDIO_OPUS -y polyphon-opus.webm ffmpeg -i polyphon.ogv -vn $AUDIO_OPUS $MOVFLAGS -y polyphon-opus.mp4 ffmpeg -i polyphon.ogv -vn $AUDIO_OPUS $MOVFLAGS -tag:a Opus -y polyphon-opus-tagged.mp4 ffmpeg -i polyphon.ogv -vn $AUDIO_VORBIS $MOVFLAGS -y polyphon-vorbis.mp4 ffmpeg -i polyphon.ogv -vn $AUDIO_MP2 $MOVFLAGS -y polyphon-mp2.mp4 ffmpeg -i polyphon.ogv -vn $AUDIO_ALAC $MOVFLAGS -y polyphon-alac.mp4 ffmpeg -i polyphon.ogv -an -vf "drawtext=text='h264.mp4':fontsize=72:fontcolor=red" $VIDEO_H264 $MOVFLAGS -y polyphon-h264.mp4 VIDEO_JPEG="-vcodec mjpeg" MOVFLAGS="-movflags +frag_keyframe+empty_moov+default_base_moof+faststart" ffmpeg -i polyphon.ogv -an -vf "drawtext=text='jpeg.mp4':fontsize=72:fontcolor=magenta, scale=640:360" $VIDEO_JPEG $MOVFLAGS -y polyphon-jpeg.mp4 ffmpeg -i polyphon.ogv -an -vf "drawtext=text='jpeg.mov':fontsize=72:fontcolor=magenta, scale=640:360" $VIDEO_JPEG $MOVFLAGS -y polyphon-jpeg.mov VIDEO_H263="-vcodec h263 -b:v 1280k" ffmpeg -i polyphon.ogv -an -vf "drawtext=text='h263.mp4':fontsize=72:fontcolor=brown, scale=352:288" $VIDEO_H263 -y polyphon-h263.h263 || exit 1 #ffmpeg -f m4v -i polyphon-h263.h263 -vcodec copy -y polyphon-h263.mp4 || exit 1 ffmpeg -i polyphon.ogv -an -vf "drawtext=text='h263.mov':fontsize=72:fontcolor=brown, scale=352:288" $VIDEO_H263 $MOVFLAGS -y polyphon-h263.mov ffmpeg -i polyphon.ogv -an -vf "drawtext=text='h263.3gp':fontsize=72:fontcolor=brown, scale=352:288" $VIDEO_H263 $MOVFLAGS -y polyphon-h263.3gp ffmpeg -i polyphon.ogv -an -vf "drawtext=text='m4v.mp4':fontsize=72:fontcolor=brown" -vcodec mpeg4 $BITRATE_HI $MOVFLAGS -y polyphon-m4v.mp4 ffmpeg -i polyphon.ogv -an -vf "drawtext=text='mpeg2.mp4':fontsize=72:fontcolor=brown" -vcodec mpeg2video $BITRATE_HI $MOVFLAGS -y polyphon-mpeg2.mp4 ffmpeg -i polyphon.ogv -an -vf "drawtext=text='mpeg1.mp4':fontsize=72:fontcolor=brown" -vcodec mpeg1video $BITRATE_HI $MOVFLAGS -y polyphon-mpeg1.mp4 ffmpeg -i polyphon.ogv -an -vf "drawtext=text='vp8.webm':fontsize=72:fontcolor=cyan" $VIDEO_VP8 -y polyphon-vp8.webm ffmpeg -i polyphon.ogv -an -vf "drawtext=text='vp9.webm':fontsize=72:fontcolor=green" $VIDEO_VP9 -y polyphon-vp9.webm ffmpeg -i polyphon.ogv -an -vf "drawtext=text='vp9.mp4':fontsize=72:fontcolor=blue" $VIDEO_VP9 $MOVFLAGS -y polyphon-vp9.mp4 /usr/local/ffmpeg/bin/ffmpeg -i polyphon.ogv -an -vf "drawtext=text='vp8.mp4':fontsize=72:fontcolor=purple" $VIDEO_VP8 $MOVFLAGS -y polyphon-vp8.mp4 ffmpeg -i polyphon.ogv $AUDIO_AAC -vf "drawtext=text='h264-aac.mp4':fontsize=72:fontcolor=orange" $VIDEO_H264 $MOVFLAGS -y polyphon-h264-aac.mp4 ffmpeg -i polyphon.ogv $AUDIO_AAC -vf "drawtext=text='jpeg-aac.mov':fontsize=72:fontcolor=magenta" $VIDEO_JPEG $MOVFLAGS -y polyphon-jpeg-aac.mov ffmpeg -i polyphon.ogv $AUDIO_AAC -vf "drawtext=text='vp9-aac.mp4':fontsize=72:fontcolor=purple" $VIDEO_VP9 $MOVFLAGS -y polyphon-vp9-aac.mp4 ffmpeg -i polyphon.ogv $AUDIO_VORBIS -vf "drawtext=text='vp8-vorbis.webm':fontsize=72:fontcolor=darkcyan" $VIDEO_VP8 -y polyphon-vp8-vorbis.webm ffmpeg -i polyphon.ogv $AUDIO_OPUS -vf "drawtext=text='vp9-opus.webm':fontsize=72:fontcolor=darkgreen" $VIDEO_VP9 -y polyphon-vp9-opus.webm ffmpeg -i polyphon.ogv $AUDIO_MP3 -vf "drawtext=text='vp9-mp3.mp4':fontsize=72:fontcolor=purple" $VIDEO_VP9 $MOVFLAGS -y polyphon-vp9-mp3.mp4 ffmpeg -i polyphon.ogv $AUDIO_ALAC -vf "drawtext=text='vp9-alac.mp4':fontsize=72:fontcolor=violet" $VIDEO_VP9 $MOVFLAGS -y polyphon-vp9-alac.mp4 fi