View Single Post
Old 11-18-2011, 11:01 AM  
evulvmedia
Confirmed User
 
Industry Role:
Join Date: Jun 2006
Posts: 441
Encoding for web + mobile, streaming + downloading: mp4 format, 640px width, 720kbps video, 96kbps audio.

This is nice because it gives excellent quality while also working fine on mobile devices, even first-generation iPhone and iPod Touch.

Using the x264 presets it is easy!

Two passes:

ffmpeg -i INPUT -an -pass 1 -s 640xH -vcodec libx264 -profile baseline -preset slow -vpre ipod640 -b 720k -aspect W:H -threads 0 -f ipod -y /dev/null

ffmpeg -i INPUT -acodec libfaac -ar 48000 -ac 2 -ab 96k -async 1 -pass 2 -s 640xH -vcodec libx264 -profile baseline -preset slow -vpre ipod640 -b 720k -aspect W:H -threads 0 -f ipod -metadata "title=TITLE" OUTPUT-1.mp4

You need to specify H in the -s parameter based on the size of the source video (e.g. H=360 for 16:9 aspect ratio). And of course you need to specify W:H for the -aspect parameter.

Finally, you need to adjust the moov atom for streaming:

qt-faststart OUTPUT-1.mp4 OUTPUT.mp4
evulvmedia is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote