ffmpeg - qt-faststart

FFMPEG provide a good utility for you to make your mp4 file optimized for web. In general, it makes the moov atom before mdat atom so that it will be easier to find moov stom and send to remote client.

The following is assumed that you have download ffmpeg 0.8.4 source from http://ffmpeg.org/download.html and tar -xvzf ffmpeg-0.8.4.tar.gz to a folder

Build qt-faststart in Linux

1. Navigate to your ffmpeg source folder
2. Go to tools folder
3. Type make qt-faststart

Build qt-faststart in Windows

You can build qt-faststart via cygwin using Linux build step. However, it can only be run within cygwin environment as it will bind qt-faststart with cygwin libraries

Alternatively, build qt-faststart.exe from VS2010

1. Create a VS2010 project
2. Place qt-faststart.c into your source folder
3. You need to find and include 2 external header files inttypes.h and stdin.h
4. Configure your VS2010 project to use the above header files for compilation (Project Properties -> C/C++ -> General -> Additional Include Directories)
5. Open qt-faststart.c and replace __MINGW32__ with the following


#ifdef _WIN32
#    ifdef __MINGW32__
#        define fseeko fseeko64
#      define ftello ftello64
#    else
#        define fseeko _fseeki64
#        define ftello _ftelli64
#    endif
#endif


6. Build the project to get the qt-faststart.exe

Usage:

qt-faststart input.mp4 output.mp4

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. so where is this qt-faststart.c file?

    ReplyDelete
  3. In the tools folder, as stated in the article. Even in more recent versions, it's still there. :)

    ReplyDelete

Post a Comment

Popular Posts