View Single Post
Old 11-18-2011, 12:12 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,481
Quote:
Originally Posted by evulvmedia View Post
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
do you only encode 1 video for both mobile and web, or two?
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote