Download and Install ffmpeg version 0.4.9-pre1 on Mac OS X
Sunday the 23rd of November, 2008

    version 0.4.9-pre1

      View the most recent changes for the ffmpeg port at: ffmpeg.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for ffmpeg.
      The raw portfile for ffmpeg 0.4.9-pre1 is located here:
      http://ffmpeg.darwinports.com/dports/multimedia/ffmpeg/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/ffmpeg
      Google
      Web Darwinports.com



      # $Id: Portfile 40473 2008-10-02 18:33:51Z macsforever2000 macports.org $

      PortSystem 1.0

      Name: ffmpeg
      Version: 0.4.9-pre1
      revision 12
      Category: multimedia
      Maintainers: acho macports.org openmaintainer
      Description: Digital VCR and streaming server
      Long Description: FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. The project is made of several components: ffmpeg is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card. ffserver is an HTTP (RTSP is being developped) multimedia streaming server for live broadcasts. Time shifting of live broadcast is also supported. ffplay is a simple media player based on SDL and on the ffmpeg libraries. libavcodec is a library containing all the ffmpeg audio/video encoders and decoders. Most codecs were developped from scratch to ensure best performances and high code reusability. libavformat is a library containing parsers and generators for all common audio/video formats.
      Homepage: http://ffmpeg.sourceforge.net/
      master_sites
      distfiles
      use_parallel_build yes
      worksrcdir trunk
      depends_build bin:svn:subversion port:gmake
      build.cmd gmake
      configure.compiler gcc-4.0

      set svn_rev 14381

      pre-fetch {
      if {[file isdirectory ${distpath}/${svn_rev}]} {
      if {![file isdirectory ${distpath}/${svn_rev}/trunk/.svn]} {
      file delete -force ${distpath}/${svn_rev}
      }
      }
      }

      fetch {
      if {![file isdirectory ${distpath}/${svn_rev}]} {
      file mkdir ${distpath}/${svn_rev}
      system "svn co -r${svn_rev} --ignore-externals svn://svn.mplayerhq.hu/ffmpeg/trunk ${distpath}/${svn_rev}/trunk"
      system "svn co -r27349 svn://svn.mplayerhq.hu/mplayer/trunk/libswscale ${distpath}/${svn_rev}/trunk/libswscale"
      }
      }

      extract {
      file copy ${distpath}/${svn_rev}/trunk ${worksrcpath}
      }

      Platform: darwin
      configure.cflags-append -DHAVE_LRINTF ${configure.cppflags}
      configure.args --disable-vhook --mandir=${prefix}/share/man --enable-shared --enable-pthreads --disable-mmx --cc=gcc-4.0

      default_variants +a52

      pre-configure {
      if {[variant_isset universal]} {
      configure.args-delete --disable-dependency-tracking
      }
      }
      post-destroot {
      file mkdir ${destroot}${prefix}/share/doc/${name}
      file copy ${worksrcpath}/doc/TODO ${destroot}${prefix}/share/doc/${name}
      foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] {
      file copy $f ${destroot}${prefix}/share/doc/${name}
      }
      }

      platform darwin i386 {
      post-patch {
      reinplace "s|defined\(ARCH_X86\) \&\& defined\(CONFIG_GPL\)|defined\(ARCH_X86\) \\\&\\\& defined\(CONFIG_GPL\) \\\&\\\& \\\!defined\(__APPLE__\)|g" ${worksrcpath}/libswscale/rgb2rgb.c
      }
      }

      Variant: mmx description {enable mmx support, experimental; does not build in gcc-4.2 or xcode 3.0 gcc-4.0} {
      # make no-mmx default and allow mmx enabling for the brave.
      configure.args-delete --disable-mmx
      # Fix Leopard problems by disabling the cavs decoder for now
      configure.args-append --disable-decoder=cavs
      }

      Variant: gpl description {allow use of GPL code, the resulting libav* and ffmpeg will be under GPL} {
      configure.args-append --enable-gpl
      }

      Variant: postproc requires gpl description {enable GPLed postprocessing support} {
      configure.args-append --enable-postproc
      }

      # Adds MP3 support
      Variant: lame description {enable MP3 encoding via libmp3lame} {
      depends_lib-append port:lame
      configure.args-append --enable-libmp3lame
      }

      Variant: extvorbis description {enable Vorbis encoding via libvorbis, native implementation exists} {
      depends_lib-append port:libvorbis port:libogg
      configure.args-append --enable-libvorbis
      }

      Variant: theora description {enable Theora encoding via libtheora} {
      depends_lib-append port:libtheora port:libogg
      configure.args-append --enable-libtheora
      }

      Variant: faac requires gpl description {enable FAAC support via libfaac} {
      depends_lib-append port:faac
      configure.args-append --enable-libfaac
      }

      Variant: faad requires gpl description {enable FAAD support via libfaad} {
      depends_lib-append port:faad2
      configure.args-append --enable-libfaad
      }

      Variant: xvid requires gpl description {enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists} {
      depends_lib-append port:XviD
      configure.args-append --enable-libxvid
      }

      # depends build until x264 port supports shared libraries
      Variant: x264 requires gpl description {enable H.264 encoding via x264} {
      depends_build-append port:x264
      configure.args-append --enable-libx264
      }

      Variant: a52 requires gpl description {enable GPLed liba52 support} {
      depends_lib-append port:a52dec
      configure.args-append --enable-liba52
      post-destroot {
      file mkdir ${destroot}${prefix}/include/ffmpeg
      foreach f [glob ${destroot}${prefix}/include/libavcodec/*.h ${destroot}${prefix}/include/libavformat/*.h ${destroot}${prefix}/include/libavutil/*.h] {
      regsub -all $destroot ${f} "" srclink
      ln -s ${srclink} ${destroot}${prefix}/include/ffmpeg/[lindex [split ${f} /] end]
      }

      }
      }
      Variant: avfilter requires gpl description {video filter support (replaces vhook)} {
      patchfiles-append patch-libswscale-Makefile.diff patch-configure.diff
      configure.args-append --enable-swscale --enable-avfilter

      # keep vhook as long as avfilter isnt working fully
      configure.args-delete --disable-vhook
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/ffmpeg
      % sudo port install ffmpeg
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching ffmpeg
      ---> Verifying checksum for ffmpeg
      ---> Extracting ffmpeg
      ---> Configuring ffmpeg
      ---> Building ffmpeg with target all
      ---> Staging ffmpeg into destroot
      ---> Installing ffmpeg
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using ffmpeg with these commands:
      %  man ffmpeg
      % apropos ffmpeg
      % which ffmpeg
      % locate ffmpeg

     Where to find more information:

    Darwin Ports



    Lightbox this page.