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