MOVFLAGS="-movflags +frag_keyframe+empty_moov+default_base_moof+faststart" HLSFLAGS="-hls_time 10 -hls_list_size 0 -hls_segment_type fmp4 -hls_flags single_file -hls_playlist_type vod" TSFLAGS="-hls_time 10 -hls_list_size 0 -hls_segment_type mpegts -hls_flags single_file -hls_playlist_type vod" BITRATE_HI="-b:v 1250k" BITRATE_LO="-b:v 1000k" SIZE_MAIN="-s 854x480" SIZE_JPEG="-s 213x120" VIDEO_H264="-vcodec h264 -g 240 $BITRATE_HI $SIZE_MAIN" VIDEO_JPEG="-vcodec mjpeg -g 240 $BITRATE_LO $SIZE_JPEG" VIDEO_VP8="-vcodec libvpx -cpu-used 3 -g 240 $BITRATE_HI $SIZE_MAIN" VIDEO_VP9="-vcodec libvpx-vp9 -row-mt 1 -cpu-used 3 -g 240 $BITRATE_LO $SIZE_MAIN" AUDIO_VORBIS="-acodec libvorbis -ac 2 -ar 44100 -vb 128k" AUDIO_OPUS="-acodec libopus -ac 2 -ar 48000 -vb 96k" AUDIO_AAC="-ac 2 -ar 44100 -vb 128k" AUDIO_MP3="-acodec libmp3lame -ac 2 -ar 44100 -vb 128k" #INFILE=polyphon.ogv INFILE=caminandes-llamigos.webm set -e # Flat WebM ffmpeg -i $INFILE $VIDEO_VP8 $AUDIO_VORBIS -y new-vp8.webm ffmpeg -i $INFILE $VIDEO_VP9 $AUDIO_OPUS -y new-vp9.webm # Flat Quicktime ffmpeg -i $INFILE -s 320x180 $VIDEO_JPEG $AUDIO_MP3 $MOVFLAGS -y new-mjpeg.mov # Audio for HLS ffmpeg -i $INFILE -vn $AUDIO_AAC $HLSFLAGS -hls_segment_filename new-aac.mp4 -y new-aac.m3u8 ffmpeg -i $INFILE -vn $AUDIO_OPUS $HLSFLAGS -hls_segment_filename new-opus.mp4 -y new-opus.m3u8 #ffmpeg -i $INFILE -vn $AUDIO_MP3 $HLSFLAGS -hls_segment_filename new-mp3.mp4 -y new-mp3-mp4.m3u8 #ffmpeg -i $INFILE -vn $AUDIO_MP3 $TSFLAGS -hls_segment_filename new-mp3.ts -y new-mp3-ts.m3u8 ffmpeg -i $INFILE -vn $AUDIO_MP3 -f segment -segment_time 10 -segment_list new-mp3.m3u8 -y new-mp3-%04d.mp3 php timestamp-id3.php new-mp3.m3u8 new-mp3.mp3 # Video for HLS ffmpeg -i $INFILE -an $VIDEO_VP9 $HLSFLAGS -hls_segment_filename new-vp9.mp4 -y new-vp9.m3u8