Create Segmented Video


ffmpeg -i input.mpg -c copy -f segment -segment_time 60 -segment_list list.m3u8 output%03d.ts

This site has a good writeup but uses Apple's segmentor

Encoding Webm with presets


 # ffmpeg -i input.mp4 -s 1280x720 -vpre libvpx-720p -b 3900k -pass 1 \

        -an -f webm -y output.webm

# ffmpeg -i input.mp4 -s 1280x720 -vpre libvpx-720p -b 3900k -pass 2 \

        -acodec libvorbis -ab 100k -f webm -y output.webm

Need to look at the desired size and bitrate



ffmpeg .... -f segment -segment_time 5 -segment_list_type flat -segment_list stream.m3u8 -y -segment_format mpegts  stream%05d.ts

Here is another example (but he's transcoding on the fly)


ffmpeg -i -async 1 -ss 00:00:05 -acodec libfdk_aac \
-vbr 3 -b:v 3000k -ac 2 -vcodec libx264 -preset superfast  -tune zerolatency  -threads 2 \
-s 1280x720 -flags -global_header -fflags +genpts -map 0:0 -map 0:1 -hls_time 2 \
-hls_wrap 40 test.m3u8

Encoding h264

Came from


ffmpeg -i input_file.avi -vcodec libx264 -vprofile high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k
-vf scale=-1:480 -threads 0 -acodec libfdk_aac -b:a 128k output_file.mp4

Quick Start Commnad

qt-faststart output_file.mp4 output_file_with_relocated_metadata.mp4

Create Thumbs


ffmpeg -itsoffset -4 -i "$INFILE" -vcodec png -vframes 1 -an -f rawvideo -s 120x90 -y "$OUTFIL


He also has some good recipies for H264 and Webm