- Serviio Wiki
- Updates
- Build Procedure
- Remove Existing Versions of Packages
- Install Essential Build Tools and Libraries
- Yasm
- Build and Install x264
- Build and Install librtmp
- Build and Install FFmpeg
- Optional Libraries
- Build and Install libvpx
- Add Additional Support to x264 (Lavf)
- Conclusion
- Note
- FFmpeg Compilation Guide
- All platforms
- Linux
- macOS
- Windows
- Other Platforms
- Performance Tips
- Guides for developers
Serviio Wiki
This guide aims to Mesin Cuci Panasonic Terbaru provide the details on building the latest version of FFmpeg from source on Linux (as well as some other important dependencies) with the aim to provide the best support for Serviio; it is adapted from this guide and assumes that APT is the package manager of choice. This can likely be adapted to build FFmpeg on Windows using Cygwin or MinGW.
Updates
*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
*Update to cover libass and yasm 1.2 for Serviio 1.2
Build Procedure
The below process is written by Serviio users Harga Toshiba 1 Tabung. It will replace all existing libraries and tools with the new ones.
You can also follow a guide supplied by FFmpeg developers themselves, which will instead build ffmpeg in an isolated location. If you do this, you will need to use the ffmpeg.location system property to tell Serviio which ffmpeg binary to use e.g. add
-Dffmpeg.location=/home/username/ffmpeg_sources/ffmpeg/ffmpeg
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:
On some Linux systems (i.e. Ubuntu), removing librtmp0 will cause half the system to uninstall and do irreparable damage. If you get asked to remove ~500MB of software when running the command above, remove librtmp0 from the command above and re-run it.
sudo apt-get remove ffmpeg x264 libx264-dev libvpx-dev librtmp0 librtmp-dev
Install Essential Build Tools and Libraries
There are several tools and libraries required to build the software in this guide. Much of this software should be available in the repositories for your Linux distribution and can be installed this way:
sudo apt-get update 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 \ libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev texi2html zlib1g-dev \ libssl1.0.0 libssl-dev libxvidcore-dev libxvidcore4 libass-dev
Yasm
Yasm is an assembler and is recommended for x264 and FFmpeg. Version 1.3 is required to build the latest x264 and FFmpeg sources.
cd ~ mkdir src cd src wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz tar xzvf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure make sudo checkinstall --pkgname=yasm --pkgversion="1.3.0" --backup=no \ --deldoc=yes --fstrans=no --default
Build and Install x264
x264 is one of the most popular implementations of the H.264 video compression algorithm which is used to compress video on blu-ray discs and is often the codec of choice for distributing high definition content on the internet. FFmpeg supports using the x264 library to compress video content.
x264 is required for streaming to iOS devices using MediaBrowser, and for the Enhanced profile option in ServiiGo.
To acquire and build x264, perform the following:
cd ~/src git clone git://git.videolan.org/x264 cd x264 ./configure --enable-static make sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/')" --backup=no --deldoc=yes \ --fstrans=no --default
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).
Build and Install librtmp
librtmp provides support for the RTMP content streaming protocol developed by Adobe and commonly used to distribute content to flash video players on the web. FFmpeg supports using the librtmp library to stream content from RTMP sources. To acquire and build librtmp, perform the following:
cd ~/src git clone git://git.ffmpeg.org/rtmpdump cd rtmpdump make SYS=posix sudo checkinstall --pkgname=rtmpdump --pkgversion="2:$(date +%Y%m%d%H%M)-git" --backup=no \ --deldoc=yes --fstrans=no --default
Build and Install FFmpeg
It is now time to build FFmpeg:
This guide uses latest FFmpeg source, Serviio is tailored to work with a certain version though — the source can be downloaded at http://www.serviio.org/download
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).
To use the lastest version of ffmpeg
git clone --depth 1 git://git.videolan.org/ffmpeg
Else, to use the version that Serviio ships with
wget http://download.serviio.org/opensource/ffmpeg-2.4.x.tar.bz2 bzip2 -d ffmpeg-2.4.x.tar.bz2 tar xvf ffmpeg-2.4.x.tar
cd ffmpeg ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 \ --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-librtmp \ --enable-libxvid --enable-libass make sudo checkinstall --pkgname=ffmpeg --pkgversion="99:$(date +%Y%m%d%H%M)-git" --backup=no \ --deldoc=yes --fstrans=no --default
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://chromium.googlesource.com/webm/libvpx cd libvpx ./configure make sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no \ --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; see here for more information:
sudo apt-get remove x264 cd ~/src/x264 rm *.deb make distclean ./configure --enable-static make sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/')" --backup=no --deldoc=yes \ --fstrans=no --default
Conclusion
At this point, FFmpeg is installed and Serviio should now use the newly built version. Please visit the forum if you need Cara Membersihkan Mesin Cuci assistance with this guide.
Note
If you receive error:
ffmpeg: error while loading shared libraries: librtmp.so.1: cannot open shared object file: No such file or directory
Add the following line to the file
Now reboot machine: sudo reboot
FFmpeg Compilation Guide
This page contains a list of resources which describe the necessary steps required for compiling FFmpeg from scratch or with the help of build scripts and/or package managers.
All platforms
Read the Generic compilation guide, regardless of your platform. It provides generic compilation and installation instructions, including the use of configure .
- CompilationGuide/vcpkg – vcpkg also aims to be portable accross all platforms. For windows it uses MinGW/MSYS compilation toolchain.
Linux
Alternative ways to obtain/compile ffmpeg under Linux:
macOS
Windows
- CompilationGuide/MinGW – MinGW Compilation Guide for compiling FFmpeg with Windows/MinGW/MSYS.
- CompilationGuide/CrossCompilingForWindows – Cross compiling for Windows is sometimes easier than using MSYS+MinGW.
- CompilationGuide/WinRT – Compiling FFmpeg for Windows Apps (Windows 10 and Windows 8.1)
- CompilationGuide/MSVC – Compiling FFmpeg using MSYS+MSVC, see also:
- Instructions on the reference web page
- Roxlu’s guide
Using external scripts or tools:
- Media Autobuild Suite – Automatically build FFmpeg under Windows
- Linuxbrew, which can be used with Windows Subsystem for Linux (WSL)
- Chocolatey – a package manager for Windows with an FFmpeg package
Other Platforms
Performance Tips
There are numerous avenues to extract maximum performance out of FFmpeg when it is built from source. The following list describes some of them:
- If using GCC/Clang , consider adding -march=native to —extra-cflags to make slightly better use of your hardware. Alternatively, for a more general solution, examine the —arch and —cpu options. Gains are variable, and usually quite small. However, this is usually even more safe than the above, and is thus listed here.
- Depending on your use case, —enable-hardcoded-tables may be a useful option. It results in an increase of approximately 15% in the size of libavcodec , the main library impacted by this change. It enables savings in table generation time, done once at codec initialization, since by hardcoding the tables, they do not need to be computed at runtime. However, the savings are often negligible (~100k cycles is a typical number) especially when amortized over the entire encoding/decoding operation. By default, this is not enabled. Improvements are being made to the runtime initialization, and so over time, this option will have an impact on fewer and fewer codecs.
- Other options may be found by examining ./configure —help .
Guides for developers