This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
build_ffmpeg_linux [2013/05/27 10:27] bullmastiff X264 - note on OpenCL support |
build_ffmpeg_linux [2017/02/12 15:47] cmd [Conclusion] |
||
---|---|---|---|
Line 4: | Line 4: | ||
This guide aims to provide the details on building the latest version of [[http:// | This guide aims to provide the details on building the latest version of [[http:// | ||
- | Update to cover libass and yasm 1.2 for Serviio 1.2 (26th March 2013) | + | |
+ | ==== Updates ==== | ||
+ | 2nd June 2013 | ||
+ | < | ||
+ | *Updated to cover x264 requirements in Serviio 1.3 | ||
+ | *Moved libvpx to optional section at the end | ||
+ | *Removed yasm from the initial apt-get install list seeing as its now built from source | ||
+ | </ | ||
+ | |||
+ | 26th March 2013 | ||
+ | < | ||
+ | *Update to cover libass and yasm 1.2 for Serviio 1.2 | ||
+ | </ | ||
====Build Procedure==== | ====Build Procedure==== | ||
+ | The below process is written by Serviio users. It will replace all existing libraries and tools with the new ones. | ||
+ | |||
+ | You can also follow a [[http:// | ||
+ | |||
===Remove Existing Versions of Packages=== | ===Remove Existing Versions of Packages=== | ||
The first step to ensuring a good install of FFmpeg is to remove any exisiting installations of the libraries and utilities which will be built from source throughout this guide to ensure that there are no conflicts which can lead to problems which are difficult to diagnose: | The first step to ensuring a good install of FFmpeg is to remove any exisiting installations of the libraries and utilities which will be built from source throughout this guide to ensure that there are no conflicts which can lead to problems which are difficult to diagnose: | ||
+ | |||
+ | <note warning> | ||
< | < | ||
Line 13: | Line 32: | ||
</ | </ | ||
- | **NOTE: | ||
===Install Essential Build Tools and Libraries=== | ===Install Essential Build Tools and Libraries=== | ||
Line 22: | Line 40: | ||
sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev \ | sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev \ | ||
libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \ | libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \ | ||
- | libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev texi2html | + | libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev texi2html zlib1g-dev \ |
libssl1.0.0 libssl-dev libxvidcore-dev libxvidcore4 libass-dev | libssl1.0.0 libssl-dev libxvidcore-dev libxvidcore4 libass-dev | ||
</ | </ | ||
===Yasm=== | ===Yasm=== | ||
- | Yasm is an assembler and is recommended for x264 and FFmpeg. Version 1.2 is required to build the latest x264 and FFmpeg sources. | + | Yasm is an assembler and is recommended for x264 and FFmpeg. Version 1.3 is required to build the latest x264 and FFmpeg sources. |
< | < | ||
Line 33: | Line 51: | ||
mkdir src | mkdir src | ||
cd src | cd src | ||
- | wget http:// | + | wget http:// |
- | tar xzvf yasm-1.2.0.tar.gz | + | tar xzvf yasm-1.3.0.tar.gz |
- | cd yasm-1.2.0 | + | cd yasm-1.3.0 |
./configure | ./configure | ||
make | make | ||
- | sudo checkinstall --pkgname=yasm --pkgversion=" | + | sudo checkinstall --pkgname=yasm --pkgversion=" |
--deldoc=yes --fstrans=no --default | --deldoc=yes --fstrans=no --default | ||
</ | </ | ||
===Build and Install x264=== | ===Build and Install x264=== | ||
- | [[http:// | + | [[http:// |
+ | |||
+ | x264 is required for streaming to iOS devices using MediaBrowser, | ||
+ | |||
+ | To acquire and build x264, perform the following: | ||
< | < | ||
- | cd src | + | cd ~/src |
git clone git:// | git clone git:// | ||
cd x264 | cd x264 | ||
Line 56: | Line 78: | ||
</ | </ | ||
- | **NOTE:** New version of x264 contains by default support of OpenCL. If not installed or without sense (example Ubuntu 12.04LTS on VMWare) add to configure additional option --diable-opencl. | + | **NOTE:** New version of x264 contains by default support of OpenCL. If not installed or without sense (example Ubuntu 12.04LTS on VMWare) add to configure additional option --disable-opencl. |
- | + | ||
- | ===Build and Install libvpx=== | + | |
- | [[http:// | + | |
< | < | ||
- | cd ~/src | + | ./configure --disable-opencl |
- | git clone http:// | + | |
- | cd libvpx | + | |
- | ./configure | + | |
- | make | + | |
- | sudo checkinstall --pkgname=libvpx --pkgversion=" | + | |
- | --deldoc=yes --fstrans=no | + | |
</ | </ | ||
+ | Without this option ffmpeg could not be configured (ERROR: libx264 not found). | ||
===Build and Install librtmp=== | ===Build and Install librtmp=== | ||
Line 86: | Line 100: | ||
It is now time to build FFmpeg: | It is now time to build FFmpeg: | ||
- | <note warning> | + | <note warning> |
+ | There have been a number of reports that you must use the version of FFmpeg source that is provided on the Serviio download page on Ubuntu if you want Http Live Streaming to work (required for MediaBrowser iOS and ServiiGo Enhanced profiles).</ | ||
< | < | ||
cd ~/src | cd ~/src | ||
+ | </ | ||
+ | |||
+ | To use the lastest version of ffmpeg | ||
+ | < | ||
git clone --depth 1 git:// | git clone --depth 1 git:// | ||
+ | </ | ||
+ | |||
+ | Else, to use the version that Serviio ships with | ||
+ | < | ||
+ | wget http:// | ||
+ | bzip2 -d ffmpeg-2.4.x.tar.bz2 | ||
+ | tar xvf ffmpeg-2.4.x.tar | ||
+ | </ | ||
+ | |||
+ | Then | ||
+ | < | ||
cd ffmpeg | cd ffmpeg | ||
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ | ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ | ||
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 \ | --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 \ | ||
- | --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx | + | --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-librtmp |
- | | + | --enable-libxvid --enable-libass |
make | make | ||
- | sudo checkinstall --pkgname=ffmpeg --pkgversion=" | + | sudo checkinstall --pkgname=ffmpeg --pkgversion=" |
--deldoc=yes --fstrans=no --default | --deldoc=yes --fstrans=no --default | ||
</ | </ | ||
- | ===Add Additional Support to x264 (Lavf)=== | + | |
+ | === Optional Libraries ==== | ||
+ | Additional libraries that aren't used by Serviio. You may want them if you use other software that uses ffmpeg. | ||
+ | ====Build and Install libvpx==== | ||
+ | libvpx is an emerging open video compression library which is gaining popularity for distributing high definition video content on the internet. FFmpeg supports using the libvpx library to compress video content (although Serviio does not). To acquire and build libvpx, perform the following: | ||
+ | |||
+ | < | ||
+ | cd ~/src | ||
+ | git clone https:// | ||
+ | cd libvpx | ||
+ | ./ | ||
+ | make | ||
+ | sudo checkinstall --pkgname=libvpx --pkgversion=" | ||
+ | --deldoc=yes --fstrans=no --default | ||
+ | </ | ||
+ | |||
+ | Now rebuild ffmpeg by following the above steps except add | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | to the long ./configure command | ||
+ | |||
+ | ====Add Additional Support to x264 (Lavf)==== | ||
Now that FFmpeg is built and installed, it is a good idea to re-configure and rebuild x264 to add additional functionality; | Now that FFmpeg is built and installed, it is a good idea to re-configure and rebuild x264 to add additional functionality; | ||
Line 117: | Line 169: | ||
====Conclusion==== | ====Conclusion==== | ||
- | At this point, FFmpeg is installed and Serviio should now use the newly built version. Please visit the [[http:// | + | At this point, FFmpeg is installed and Serviio should now use the newly built version. Please visit the [[http:// |
+ | |||
+ | ====Note==== | ||
+ | If you receive error: | ||
+ | **ffmpeg: error while loading shared libraries: librtmp.so.1: | ||
+ | |||
+ | Then do as follows | ||
+ | |||
+ | sudo nano / | ||
+ | |||
+ | Add the following line to the file | ||
+ | |||
+ | < | ||
+ | |||
+ | Save the file < | ||
+ | |||
+ | Now enter: sudo ldconfig | ||
+ | |||
+ | Now reboot machine: sudo reboot | ||
~~NOTOC~~ | ~~NOTOC~~ |