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/07/04 15:49] zip [Build Procedure] |
build_ffmpeg_linux [2016/08/04 20:52] dadoupy [Build Procedure] |
||
---|---|---|---|
Line 8: | Line 8: | ||
2nd June 2013 | 2nd June 2013 | ||
< | < | ||
- | *Updated to cover x264 requirements in Serviio 1.3 (Not yet released at this point) | + | *Updated to cover x264 requirements in Serviio 1.3 |
*Moved libvpx to optional section at the end | *Moved libvpx to optional section at the end | ||
*Removed yasm from the initial apt-get install list seeing as its now built from source | *Removed yasm from the initial apt-get install list seeing as its now built from source | ||
Line 19: | Line 19: | ||
====Build Procedure==== | ====Build Procedure==== | ||
- | <note tip>The below process is written by Serviio users. You can also follow a [[http:// | + | The below process is written by Serviio users. |
+ | |||
+ | 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> | ||
< | < | ||
sudo apt-get remove ffmpeg x264 libx264-dev libvpx-dev librtmp0 librtmp-dev | sudo apt-get remove ffmpeg x264 libx264-dev libvpx-dev librtmp0 librtmp-dev | ||
</ | </ | ||
- | <note important> | + | |
===Install Essential Build Tools and Libraries=== | ===Install Essential Build Tools and Libraries=== | ||
Line 41: | Line 45: | ||
===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 47: | 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 | ||
</ | </ | ||
Line 59: | Line 63: | ||
[[http:// | [[http:// | ||
- | x264 is not used prior to Serviio 1.3. In Serviio 1.3, it is required for streaming to iOS devices using MediaBrowser, | + | x264 is required for streaming to iOS devices using MediaBrowser, |
To acquire and build x264, perform the following: | To acquire and build x264, perform the following: | ||
< | < | ||
- | cd src | + | cd ~/src |
git clone git:// | git clone git:// | ||
cd x264 | cd x264 | ||
Line 74: | 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 --disable-opencl. Without this option ffmpeg could not be configured (ERROR: libx264 not found). | + | **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. |
+ | |||
+ | < | ||
+ | ./configure --disable-opencl | ||
+ | </ | ||
+ | Without this option ffmpeg could not be configured (ERROR: libx264 not found). | ||
===Build and Install librtmp=== | ===Build and Install librtmp=== | ||
Line 91: | 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 \ | ||
Line 114: | Line 139: | ||
< | < | ||
cd ~/src | cd ~/src | ||
- | git clone http://git.chromium.org/ | + | git clone https:// |
cd libvpx | cd libvpx | ||
./configure | ./configure | ||
Line 127: | Line 152: | ||
</ | </ | ||
to the long ./configure command | to the long ./configure command | ||
- | |||
====Add Additional Support to x264 (Lavf)==== | ====Add Additional Support to x264 (Lavf)==== | ||
Line 146: | Line 170: | ||
====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 | ||
+ | |||
+ | ldconfig | ||
+ | |||
+ | Now reboot machine | ||
+ | |||
~~NOTOC~~ | ~~NOTOC~~ |