views:

255

answers:

1

I have a site where people upload videos, which are converted to .flv format. Simple.

I wanted to also convert to an mp4 format that will "stream" to an iphone and blackberry, or allowed to be downloaded to either, for later viewing.

Can someone post a working ffmpeg line to accomplish this task?

Closest I got was this (which doesn't work)

ffmpeg -i in.avi -f mp4 -vcodec libx264 -maxrate 1000 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac -s 480x320 -ab 128k -qscale 7 out.mp4
A: 

What does the trick for me, was setting the format to ipod instead of mp4 using the "-f ipod" option. The ipod format option seems to be a mp4 container with some quirks for the iPod / iPhone.

ffmpeg -y -i $input -acodec libfaac -ab 128k -s 640x480 -vcodec libx264\
  -vpre slow -vpre ipod640 -b 196k -bt 196k\
  -threads 0 -f ipod output.mp4

Don't know if that does the trick for Blackberry too, but would be interested to hear about it.

Sascha