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/06/02 14:01] will |
build_ffmpeg_linux [2015/01/22 16:19] pcfascst corrected ffmpeg location for serviio.sh to be actual location executable would be located for someone following this guide. |
||
---|---|---|---|
Line 6: | Line 6: | ||
==== Updates ==== | ==== Updates ==== | ||
- | *2nd June 2013 : Updated to cover x264 requirements in Serviio 1.3 (Not yet released | + | 2nd June 2013 |
- | *26th March 2013 : Update to cover libass and yasm 1.2 for Serviio 1.2 | + | < |
+ | *Updated to cover x264 requirements in Serviio 1.3 | ||
+ | *Moved libvpx to optional section | ||
+ | *Removed | ||
+ | </ | ||
+ | 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 18: | Line 32: | ||
</ | </ | ||
- | **NOTE: | ||
===Install Essential Build Tools and Libraries=== | ===Install Essential Build Tools and Libraries=== | ||
Line 27: | 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 | ||
</ | </ | ||
Line 50: | 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 65: | 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 82: | 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:// | ||
+ | tar xvf ffmpeg-N-54096-ge41bf19.tar.gz | ||
+ | </ | ||
+ | |||
+ | 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-librtmp \ | --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-librtmp \ | ||
- | --enable-libxvid --enable-libass | + | --enable-libxvid --enable-libass |
make | make | ||
sudo checkinstall --pkgname=ffmpeg --pkgversion=" | sudo checkinstall --pkgname=ffmpeg --pkgversion=" | ||
Line 100: | Line 133: | ||
=== Optional Libraries ==== | === Optional Libraries ==== | ||
Additional libraries that aren't used by Serviio. You may want them if you use other software that uses ffmpeg. | Additional libraries that aren't used by Serviio. You may want them if you use other software that uses ffmpeg. | ||
- | |||
====Build and Install libvpx==== | ====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: | 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: | ||
Line 114: | Line 146: | ||
</ | </ | ||
- | Now rebuild ffmpeg by following the above steps except | + | Now rebuild ffmpeg by following the above steps except |
< | < | ||
- | ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ | + | --enable-libvpx |
- | --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 \ | + | |
- | --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-librtmp \ | + | |
- | --enable-libxvid --enable-libass | + | |
</ | </ | ||
+ | to the long ./configure command | ||
Line 140: | 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~~ |