[8a1e4f4] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[01062dd] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[560e14cf] | 6 |
|
---|
[15b3bc29] | 7 | <!ENTITY ffmpeg-download-http "http://downloads.sourceforge.net/ffmpeg/ffmpeg-&ffmpeg-version;.tar.gz">
|
---|
[01062dd] | 8 | <!ENTITY ffmpeg-download-ftp " ">
|
---|
[6c0c2a83] | 9 | <!ENTITY ffmpeg-md5sum "ea5587e3c66d50b1503b82ac4179c303">
|
---|
[8a9da37] | 10 | <!ENTITY ffmpeg-size "1.6 MB">
|
---|
[f5d262aa] | 11 | <!ENTITY ffmpeg-buildsize "62.9 MB (built with all dependencies)">
|
---|
| 12 | <!ENTITY ffmpeg-time "1.0 SBU">
|
---|
[01062dd] | 13 | ]>
|
---|
| 14 |
|
---|
[0b5a693] | 15 | <sect1 id="ffmpeg" xreflabel="FFmpeg-&ffmpeg-version;">
|
---|
[8a1e4f4] | 16 | <?dbhtml filename="ffmpeg.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>FFmpeg-&ffmpeg-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="ffmpeg">
|
---|
| 26 | <primary sortas="a-FFmpeg">FFmpeg</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to FFmpeg</title>
|
---|
| 31 |
|
---|
[f009801] | 32 | <para><application>FFmpeg</application> is a solution to record, convert and
|
---|
| 33 | stream audio and video. It is a very fast video and audio converter and it can
|
---|
| 34 | also acquire from a live audio/video source. Designed to be intuitive, the
|
---|
| 35 | command-line interface (<command>ffmpeg</command>) tries to figure out all the
|
---|
| 36 | parameters, when possible. <application>FFmpeg</application> can also convert
|
---|
| 37 | from any sample rate to any other, and resize video on the fly with a high
|
---|
| 38 | quality polyphase filter. <application>FFmpeg</application> can use a
|
---|
| 39 | video4linux compatible video source and any Open Sound System audio
|
---|
[8a1e4f4] | 40 | source.</para>
|
---|
| 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download (HTTP): <ulink url="&ffmpeg-download-http;"/></para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download (FTP): <ulink url="&ffmpeg-download-ftp;"/></para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download MD5 sum: &ffmpeg-md5sum;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Download size: &ffmpeg-size;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Estimated disk space required: &ffmpeg-buildsize;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>Estimated build time: &ffmpeg-time;</para>
|
---|
| 61 | </listitem>
|
---|
| 62 | </itemizedlist>
|
---|
| 63 |
|
---|
[7ab0cf0d] | 64 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 65 | <itemizedlist spacing="compact">
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Required patch: <ulink
|
---|
| 68 | url="&patch-root;/ffmpeg-&ffmpeg-version;-gcc4-1.patch"/></para>
|
---|
| 69 | </listitem>
|
---|
[f5d262aa] | 70 | <listitem>
|
---|
| 71 | <para>Required patch: <ulink
|
---|
| 72 | url="&patch-root;/ffmpeg-&ffmpeg-version;-amr_fixes-1.patch"/></para>
|
---|
| 73 | </listitem>
|
---|
[7ab0cf0d] | 74 | </itemizedlist>
|
---|
| 75 |
|
---|
[f29d6ee] | 76 | <bridgehead renderas="sect3">FFmpeg Dependencies</bridgehead>
|
---|
[8a1e4f4] | 77 |
|
---|
| 78 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[4b4814c2] | 79 | <para role="optional"><xref linkend="libvorbis"/>,
|
---|
[f009801] | 80 | <xref linkend="lame"/>,
|
---|
| 81 | <xref linkend="imlib2"/>,
|
---|
[e77976f] | 82 | <xref linkend="x-window-system"/>,
|
---|
[f009801] | 83 | <xref linkend="sdl"/>,
|
---|
| 84 | <xref linkend="freetype2"/>,
|
---|
| 85 | <xref linkend="mplayer"/> (for the shared post-processing library),
|
---|
| 86 | <ulink url="http://sourceforge.net/projects/faac">FAAC</ulink>,
|
---|
[f5d262aa] | 87 | <ulink url="http://sourceforge.net/projects/faac">FAAD2</ulink>,
|
---|
| 88 | <ulink url="http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-540.zip">
|
---|
| 89 | AMR narrowband (floating point)</ulink> or
|
---|
| 90 | <ulink url="http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-530.zip">
|
---|
| 91 | AMR naarrowband (fixed point)</ulink>,
|
---|
| 92 | <ulink url="http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26204-530.zip">
|
---|
| 93 | AMR wideband</ulink>, and
|
---|
[520f6b4f] | 94 | <xref linkend="tetex"/> (to build HTML documentation)</para>
|
---|
[8a1e4f4] | 95 |
|
---|
[0e2aa08] | 96 | <para condition="html" role="usernotes">User Notes:
|
---|
| 97 | <ulink url="&blfs-wiki;/ffmpeg"/></para>
|
---|
| 98 |
|
---|
[8a1e4f4] | 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2 role="installation">
|
---|
| 102 | <title>Installation of FFmpeg</title>
|
---|
| 103 |
|
---|
[f009801] | 104 | <para>Install <application>FFmpeg</application> by running the following
|
---|
[8a1e4f4] | 105 | commands:</para>
|
---|
| 106 |
|
---|
| 107 | <note>
|
---|
[f009801] | 108 | <para>Review the <filename>doc/optimization.txt</filename> file in the
|
---|
[8a1e4f4] | 109 | source tree for information about optimizing the build.</para>
|
---|
| 110 | </note>
|
---|
| 111 |
|
---|
[7ab0cf0d] | 112 | <screen><userinput>patch -Np1 -i ../ffmpeg-&ffmpeg-version;-gcc4-1.patch &&
|
---|
[f5d262aa] | 113 | patch -Np1 -i ../ffmpeg-&ffmpeg-version;-amr_fixes-1.patch &&
|
---|
| 114 | sed -i "s/static uint64/const uint64/" \
|
---|
[b82b7f6] | 115 | libavcodec/liba52/resample_mmx.c &&
|
---|
| 116 | ./configure --prefix=/usr --enable-shared \
|
---|
[65a0209] | 117 | --enable-pthreads --disable-ffplay &&
|
---|
[8a1e4f4] | 118 | make</userinput></screen>
|
---|
[65a0209] | 119 |
|
---|
[520f6b4f] | 120 | <para>If you have <application>teTeX</application> installed, the man pages
|
---|
[f5d262aa] | 121 | and HTML documentation were built during the <command>make</command>
|
---|
| 122 | process. Skip to the <systemitem class="username">root</systemitem> user
|
---|
| 123 | installation steps if you don't need other formats of the documentation, or
|
---|
| 124 | issue any or all of the following commands to create the additional
|
---|
| 125 | formats.</para>
|
---|
| 126 |
|
---|
| 127 | <screen><userinput>for DOCFILE in faq ffmpeg-doc ffplay-doc ffserver-doc hooks
|
---|
| 128 | do
|
---|
| 129 | texi2pdf -b $DOCFILE.texi
|
---|
| 130 | texi2dvi -b $DOCFILE.texi
|
---|
| 131 | dvips -o $DOCFILE.ps $DOCFILE.dvi
|
---|
| 132 | makeinfo --plaintext --force -o $DOCFILE.txt $DOCFILE.texi
|
---|
| 133 | done</userinput></screen>
|
---|
| 134 |
|
---|
[520f6b4f] | 135 | <para>If you do not have <application>teTeX</application> installed, use the
|
---|
[8a1e4f4] | 136 | following command to build the man pages:</para>
|
---|
| 137 |
|
---|
[f5d262aa] | 138 | <screen><userinput>make -C doc ff{mpeg,play,server}.1</userinput></screen>
|
---|
[8a1e4f4] | 139 |
|
---|
[e2c98cc6] | 140 | <para>This package does not come with a test suite that works.</para>
|
---|
| 141 |
|
---|
[8a1e4f4] | 142 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 143 |
|
---|
| 144 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 145 |
|
---|
[520f6b4f] | 146 | <para>If you have <application>teTeX</application> installed on your system,
|
---|
[f5d262aa] | 147 | install the documentation by issuing the following commands as the
|
---|
| 148 | <systemitem class="username">root</systemitem> user (modify the command
|
---|
| 149 | appropriately to reflect the documentation formats you've created):</para>
|
---|
[8a1e4f4] | 150 |
|
---|
| 151 | <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/ffmpeg-&ffmpeg-version; &&
|
---|
[e2c98cc6] | 152 | install -v -m644 doc/*.{html,dvi,pdf,ps,txt} \
|
---|
[f5d262aa] | 153 | /usr/share/doc/ffmpeg-&ffmpeg-version;</userinput></screen>
|
---|
[8a1e4f4] | 154 |
|
---|
| 155 | </sect2>
|
---|
| 156 |
|
---|
| 157 | <sect2 role="commands">
|
---|
| 158 | <title>Command Explanations</title>
|
---|
| 159 |
|
---|
[f009801] | 160 | <para><command>sed -i -e "s/static uint64/const uint64/"
|
---|
| 161 | libavcodec/liba52/resample_mmx.c</command>: This command fixes an issue
|
---|
[f5d262aa] | 162 | on machines with MMX capability and use <application>GCC</application> >=
|
---|
| 163 | 3.4.x to compile in A52 support using the <option>--enable-a52</option>
|
---|
| 164 | parameter passed to the <command>configure</command> script.</para>
|
---|
[8a1e4f4] | 165 |
|
---|
| 166 | <para><parameter>--enable-shared</parameter>: This switch is needed to
|
---|
[f009801] | 167 | build the <filename class="libraryfile">libavcodec</filename> and
|
---|
| 168 | <filename class="libraryfile">libavformat</filename> shared
|
---|
[8a1e4f4] | 169 | libraries.</para>
|
---|
| 170 |
|
---|
[f009801] | 171 | <para><parameter>--enable-pthreads</parameter>: This switch enables the
|
---|
[8a1e4f4] | 172 | build to link against the Posix threads library.</para>
|
---|
| 173 |
|
---|
| 174 | <para><parameter>--disable-ffplay</parameter>: Only installs the server part.
|
---|
[f009801] | 175 | <command>ffplay</command> requires <application>X</application> for
|
---|
| 176 | building. Remove this option if <application>X</application> is
|
---|
[8a1e4f4] | 177 | installed.</para>
|
---|
| 178 |
|
---|
[0e2aa08] | 179 | <para><option>--enable-<replaceable><codec></replaceable></option>: Review
|
---|
[f009801] | 180 | the available options and codecs using the
|
---|
[f5d262aa] | 181 | <command>./configure --help</command> command. Also review the information
|
---|
| 182 | at the end of the configure script (<command>cat</command> the file or view
|
---|
| 183 | it using a text editor) for information about building support for the AMR
|
---|
| 184 | codecs.</para>
|
---|
[8a1e4f4] | 185 |
|
---|
| 186 | </sect2>
|
---|
| 187 |
|
---|
| 188 | <sect2 role="configuration">
|
---|
| 189 | <title>Configuring FFmpeg</title>
|
---|
| 190 |
|
---|
| 191 | <sect3 id="ffmpeg-config">
|
---|
| 192 | <title>Config Files</title>
|
---|
| 193 |
|
---|
[f009801] | 194 | <para><filename>/etc/ffserver.conf</filename> and
|
---|
[8a1e4f4] | 195 | <filename>~/.ffmpeg/ffserver-config</filename></para>
|
---|
| 196 |
|
---|
| 197 | <indexterm zone="ffmpeg ffmpeg-config">
|
---|
| 198 | <primary sortas="e-AA.ffmpeg-ffserver-config">~/.ffmpeg/ffserver-config</primary>
|
---|
| 199 | </indexterm>
|
---|
| 200 |
|
---|
| 201 | <indexterm zone="ffmpeg ffmpeg-config">
|
---|
| 202 | <primary sortas="e-etc-ffserver.conf">/etc/ffserver.conf</primary>
|
---|
| 203 | </indexterm>
|
---|
| 204 |
|
---|
| 205 | <para>You'll find a sample ffserver configuration file at
|
---|
[f009801] | 206 | <ulink url="http://ffmpeg.sourceforge.net/sample.html"/> (also
|
---|
[8a1e4f4] | 207 | <filename>doc/ffserver.conf</filename> in the source tree).</para>
|
---|
| 208 |
|
---|
| 209 | </sect3>
|
---|
| 210 |
|
---|
| 211 | </sect2>
|
---|
| 212 |
|
---|
| 213 | <sect2 role="content">
|
---|
| 214 | <title>Contents</title>
|
---|
| 215 |
|
---|
| 216 | <segmentedlist>
|
---|
| 217 | <segtitle>Installed Programs</segtitle>
|
---|
| 218 | <segtitle>Installed Libraries</segtitle>
|
---|
| 219 | <segtitle>Installed Directories</segtitle>
|
---|
| 220 |
|
---|
| 221 | <seglistitem>
|
---|
| 222 | <seg>ffmpeg, ffserver, and optionally, ffplay</seg>
|
---|
| 223 | <seg>libavcodec.so, libavformat.so, and video hook modules</seg>
|
---|
[f009801] | 224 | <seg>/usr/include/ffmpeg, /usr/lib/vhook, and
|
---|
[8a1e4f4] | 225 | /usr/share/doc/ffmpeg-&ffmpeg-version;</seg>
|
---|
| 226 | </seglistitem>
|
---|
| 227 | </segmentedlist>
|
---|
| 228 |
|
---|
| 229 | <variablelist>
|
---|
| 230 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 231 | <?dbfo list-presentation="list"?>
|
---|
| 232 | <?dbhtml list-presentation="table"?>
|
---|
| 233 |
|
---|
| 234 | <varlistentry id="ffmpeg-prog">
|
---|
| 235 | <term><command>ffmpeg</command></term>
|
---|
| 236 | <listitem>
|
---|
[f009801] | 237 | <para>is a command-line tool to convert video files, network streams
|
---|
[8a1e4f4] | 238 | and input from a TV card to several video formats.</para>
|
---|
| 239 | <indexterm zone="ffmpeg ffmpeg-prog">
|
---|
| 240 | <primary sortas="b-ffmpeg">ffmpeg</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
| 244 |
|
---|
| 245 | <varlistentry id="ffplay">
|
---|
| 246 | <term><command>ffplay</command></term>
|
---|
| 247 | <listitem>
|
---|
[f009801] | 248 | <para>is a very simple and portable media player using the
|
---|
[8a1e4f4] | 249 | <filename>ffmpeg</filename> libraries and the SDL library.</para>
|
---|
| 250 | <indexterm zone="ffmpeg ffplay">
|
---|
| 251 | <primary sortas="b-ffplay">ffplay</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 | </listitem>
|
---|
| 254 | </varlistentry>
|
---|
| 255 |
|
---|
| 256 | <varlistentry id="ffserver">
|
---|
| 257 | <term><command>ffserver</command></term>
|
---|
| 258 | <listitem>
|
---|
| 259 | <para>is a streaming server for everything that <command>ffmpeg</command>
|
---|
| 260 | could use as input (files, streams, TV card input, webcam, etc.).</para>
|
---|
| 261 | <indexterm zone="ffmpeg ffserver">
|
---|
| 262 | <primary sortas="b-ffserver">ffserver</primary>
|
---|
| 263 | </indexterm>
|
---|
| 264 | </listitem>
|
---|
| 265 | </varlistentry>
|
---|
| 266 |
|
---|
| 267 | <varlistentry id="libavcodec">
|
---|
| 268 | <term><filename class='libraryfile'>libavcodec.so</filename></term>
|
---|
| 269 | <listitem>
|
---|
[d7ecaa6] | 270 | <para>is a library containing the <application>FFmpeg</application>
|
---|
[8a1e4f4] | 271 | codecs (both encoding and decoding).</para>
|
---|
| 272 | <indexterm zone="ffmpeg libavcodec">
|
---|
| 273 | <primary sortas="c-libavcodec">libavcodec.so</primary>
|
---|
| 274 | </indexterm>
|
---|
| 275 | </listitem>
|
---|
| 276 | </varlistentry>
|
---|
| 277 |
|
---|
| 278 | <varlistentry id="libavformat">
|
---|
| 279 | <term><filename class='libraryfile'>libavformat.so</filename></term>
|
---|
| 280 | <listitem>
|
---|
[f009801] | 281 | <para>is a library containing the file formats handling (mux and demux code
|
---|
| 282 | for several formats) used by <command>ffplay</command> as well as
|
---|
[8a1e4f4] | 283 | allowing the generation of audio or video streams.</para>
|
---|
| 284 | <indexterm zone="ffmpeg libavformat">
|
---|
| 285 | <primary sortas="c-libavformat">libavformat.so</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
| 290 | </variablelist>
|
---|
| 291 |
|
---|
| 292 | </sect2>
|
---|
[49e5372] | 293 |
|
---|
| 294 | </sect1>
|
---|