Posts Tagged ‘OS’

Creating good quality h264 video for the upcoming Flash Player and Flash Media Server

Friday, September 28th, 2007

Important

This tutorial has been updated (and improved) a lot, for the new version please follow this link.

UPDATE: I realized that when i read a tutorial about anything, in most cases, i want to first see what result im going to get so then i can decide if the tutorial is worth reading (or not), so here is a head by head comparison: 

This is an h264 file encoded by the guys at apple.com, it’s the TV Commercial for the brand new iMac: ORIGINAL VIDEO

This is the same file re-encoded using the steps on this tutorial: RE-ENCODED VIDEO

Obviouisly, there is an small quality degradation, but keep in mind that apple’s original movie is 14MB in size, while mine is 1.5MB ;).
You can play my MP4 video with almost any video player out there, but remember that not all video players out there support HE-AAC audio (or aacPlus) and b-frames, so if you play the file with a player like QuickTime, it is NOT going to work.
I recommend mPlayer or VLC media player to play this kind of video, and obviously, Flash Player will play the file perfectly too.

Update for Macintosh users:

I updated the bash script on this post so it can be used also by Macintosh users, so instead of using the NERO Digital AAC Encoder, Macintosh users can take advantage of the native 3GPP AAC Plus V2 encoder that i just compiled. Visit this post for more information about it.

Like a lot of people out there, i was really happy when i found the press release from Adobe, stating the addition of h.264 video support and HE-AAC Plus audio to their upcoming Flash Player versions, and also, to the upcoming Flash Media Server.
After following several “Tutorials” all over the web, i found that there was not any single one that gave me the results that i wanted; that is, good video quality, with the less possible file size, so after a lot of trial and error and after a lot of help and optimizations by the guys at the ffmpeg and x264 IRC channels, i decided to create this tutorial that will most probably help you a lot to encode good quality h264 video, with HE-AAC Plus Audio, and all this inside an MP4 container with tags and all ready to deliver to your visitors.

There are several things that you will need in order to do this:

Some friendly bookmarks:
SVN checkout for x264:
svn checkout svn://svn.videolan.org/vlc/trunk vlc-trunk
SVN checkout for ffmpeg:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

First of all, I’m assuming that you are running Linux, Mac-OS X or any other UNIX variant. I never tried this on windows because I am pretty sure that there are lot of really nice programs that you could buy to do the job.
(more…)