Skip to content

Instantly share code, notes, and snippets.

@yeyus
Last active August 29, 2015 14:22
Show Gist options
  • Save yeyus/cd4f15f15843716d415c to your computer and use it in GitHub Desktop.
Save yeyus/cd4f15f15843716d415c to your computer and use it in GitHub Desktop.
ffmpeg with rtmpdump support
  1. Requirements
libfdk-aac
libx265-dev
libx264-dev
yasm
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
  1. Build rtmpdump
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
  1. Configure ffmpeg
PATH="$HOME/devel/ffmpeg_bin:$PATH" PKG_CONFIG_PATH="$HOME/devel/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/devel/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/devel/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/devel/ffmpeg_build/lib" \
  --bindir="$HOME/devel/ffmpeg_bin" \
  --enable-gpl \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libtheora \
  --enable-libvorbis \
  --enable-libx264 \
  --enable-libx265 \
  --enable-librtmp \
  --enable-protocol=file \
  --enable-protocol=rtmp \
  --enable-encoder=flv \
  --enable-decoder=flv \
  --enable-nonfree
  1. make
  2. run ffmpeg
./ffmpeg -re -i "rtmp://x.x.x.x:y/n/m tcUrl=h playpath=y swfUrl=f flashVer=V swfVfy=1 pageUrl=w live=1" -c copy -f flv rtmp://localhost/src/default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment