[Ffmpeg-devel] [PATCH] Add Dirac support to ffmpeg

Anuradha Suraparaju anuradha
Thu Jul 7 14:38:23 CEST 2005

**Dirac patch for ffmpeg
**Tested with ffmpeg cvs (as of July 7, 2007 10:00am) and 
**Author(s): Andrew Kennedy (dirac_dev at users.sourceforge.net) (main)
             Anuradha Suraparaju (asuraparaju at users.sourceforge.net) 
             (minor mods)

Dirac is an open-source video codec currently under development. Both
the encoder and decoder have been integrated with ffmpeg. This patch is
only a basic integration such that only the salient paremeters are
currently passed from ffmpeg to Dirac. As Dirac develops, especially
with the integration of  a formalised bit-stream syntax,  then more
complex screnarios can be dealt with. Encoded Dirac files, with the
right patch, can be played back using MPlayer.

Please feel free to modify/add-to the code. 

These are the instructions for enabling Dirac support in ffmpeg source

1. Download Dirac from sourceforge and build and install Dirac
   cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/dirac login 
    cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/dirac co
-P compress

   cd compress
   make install

   The last step installs the Dirac share encoder and decoder libraries 
   in /usr/local/lib (which is the default install point).
2. Download ffmpeg from cvs
   cvs -z9 -d:pserver:anonymous at mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
3. Apply the patch

   cd ffmpeg
   patch -p1 < ffmpeg-cvs-dirac-patch.txt

4. Build and Install
   ./configure --enable-dirac
   make install

The option '--enable-dirac' must be used during configuration in order
to pick-up the Dirac code during building.

Sample Usage: (encoding)
ffmpeg -s 720x576 -i input_file.yuv -vcodec dirac -qscale 15 -f rawvideo

The output from the encoder is exactly as it is written to the .drc
encoded file ( hence the '-f rawvideo' output). Dirac bit-rate is
controlled by a quality-factor (currently a basic intepretation from
qscale. A qscale of 1 maps to dirac quality factor 10 and 30 maps to
quality factor 1). Dirac bitstreams can be wrapped in avi by using the
-f avi option. 

ffmpeg -i input.drc output.yuv

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-cvs-dirac-patch.txt
Type: text/x-patch
Size: 30060 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050707/1cdd89af/attachment.bin>

More information about the ffmpeg-devel mailing list