Posted on October 27th, 2008 in Scalability, Video | Permalink
We recently had to transcode a large number of videos for the iPhone. Rather than try to scale out our in-house infrastructure, we thought it would be prudent to check out different projects people had been working on. One stellar example is Panda (whom our friend Ezra Zygmuntowicz at Engine Yard mentioned to us). Panda leverages Amazon’s S3, EC2, and Simple DB web services to offer a very flexible, cost effective, and scalable option for integrating video transcoding into any site. We’re likely going to do build something a bit more tailored for howcast.com, but will definitely try to see if there are things that we can contribute back to that project. We humbly tip our hats to the New Bamboo team for their fantastic work.
Posted on October 19th, 2008 in Video | Permalink
OK so we have admittedly just about worn out this topic, however, we do have some recipe improvements to share with you. We ran into some issues with our previous recipe for some videos on the iPhone. Here is our latest incantation which seems to work quite well:
ffmpeg -y -i [input file] -v 1 -threads auto -vcodec libx264 -b 300k -r 15 -bt 175k -refs 1 -loop 1 -deblockalpha 0 -deblockbeta 0 -parti4x4 1 -partp8x8 1 -me full -subq 6 -me_range 21 -chroma 1 -slice 2 -bf 0 -level 30 -g 300 -keyint_min 30 -sc_threshold 40 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.7 -qmax 51 -qdiff 4 -i_qfactor 0.71428572 -maxrate 768k -bufsize 2M -cmp 1 -s 480x320 -acodec libfaac -profile aac_low -ab 64k -ar 22050 -ac 2 -f mp4 [output file]
Note that you may need to adjust the resolution as appropriate. With respect to what changed, you will notice is that we lowered both the video and audio bit rate, are explicitly using the AAC low complexity audio profile (per Apple’s specs), and have also switched back to using stereo (vs. mono) for the audio output. You will need to ensure that you have a fairly recent version of FFmpeg installed with H.264 and AAC. We hope that you find this helpful and as always feel free to ping us with any questions.