Last active
August 29, 2015 14:04
-
-
Save fcecagno/9d12abf8140802d52f2e to your computer and use it in GitHub Desktop.
FFmpeg on trusty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
sudo apt-get install build-essential git-core checkinstall yasm texi2html libvorbis-dev libx11-dev libvpx-dev libxfixes-dev zlib1g-dev pkg-config libxext-dev libv4l-dev netcat | |
FFMPEG_VERSION=2.3.3 | |
if [ ! -d "/usr/local/src/ffmpeg-${FFMPEG_VERSION}" ]; then | |
cd /usr/local/src | |
sudo wget "http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2" | |
sudo tar -xjf "ffmpeg-${FFMPEG_VERSION}.tar.bz2" | |
cd "ffmpeg-${FFMPEG_VERSION}" | |
sudo ./configure --enable-x11grab --enable-gpl --enable-version3 --enable-postproc --enable-libvorbis --enable-libvpx | |
sudo make | |
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:${FFMPEG_VERSION}" --backup=no --deldoc=yes --default | |
fi |
To install Video4Linux loopback
sudo apt-get install -y v4l2loopback-dkms
sudo modprobe v4l2loopback
To load more devices
sudo modprobe v4l2loopback devices=2
if the v4l2loopback module is already loaded in your system, you need to remove and reload it.
To enable rtmp support:
(tested with 2.4.2 version of ffmpeg)
- Change the version to 2.4.2
FFMPEG_VERSION=2.4.2
- Add 'librtmp-dev' package in the 'apt-get install' command
sudo apt-get install build-essential git-core checkinstall yasm texi2html libvorbis-dev libx11-dev libvpx-dev libxfixes-dev zlib1g-dev pkg-config libxext-dev libv4l-dev netcat librtmp-dev
- in the 'configure' line add ' --enable-libtmp' :
...
./configure --enable-x11grab --enable-gpl --enable-version3 --enable-postproc --enable-libvorbis --enable-libvpx --enable-librtmp
...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To stream the screen as a webcam: