[FFmpeg-user] Compiling ffmpeg with SRT support on Raspberry Pi

rhannah at nrie.com.au rhannah at nrie.com.au
Thu Oct 15 04:45:16 EEST 2020

Hi, I have spent a week on this already so I am hoping someone can help me.


I was trying to set up a Raspberry Pi to send video from ffmpeg using SRT
protocol. Using Pi B+ with the latest and updated Pi OS both lite and


Have followed many leads but most promising starting point was
https://srtlab.github.io/srt-cookbook/apps/ffmpeg/ which states that ffmpeg
supports SRT protocol 'out of the box' but it needs to be built with the
configure flag -enable-libsrt

So I chased to the Compilation Guide for Ubuntu/Debian/Mint

I have followed this to the letter using clean, new Pi lite and desktop


While I have tried apt-getting all the libraries required, I did decide in
the end to just build them all from the instructions given, I never did get
libaom to install so I skipped that, I don't think I needed it.


All I want to do is transmit video, no audio


To install the SRT library I used the following in my .sh file and it does
create the correct files in the ffmpeg_sources folder - the complete .sh
file is attached


cd /home/pi/ffmpeg_sources && \

sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential && \

git clone https://github.com/Haivision/srt && \

cd srt && \

./configure --prefix="$HOME/ffmpeg_build" && \

make && \

sudo make install


There were several other issues like having to install libunistring-dev to
work around errors but in the end I think I got a clean compile and install.
However the ffmpeg -protocols still does not show the SRT protocol and
ffmpeg does not work with a SRT output.


The last part of my .sh file is


cd /home/pi/ffmpeg_sources && \

wget -O ffmpeg-snapshot.tar.bz2
https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \

tar xjvf ffmpeg-snapshot.tar.bz2 && \

cd ffmpeg && \

PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
./configure \

  --prefix="$HOME/ffmpeg_build" \

  --pkg-config-flags="--static" \

  --extra-cflags="-I$HOME/ffmpeg_build/include" \

  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \

  --extra-libs="-lpthread -lm" \

  --bindir="$HOME/bin" \

  --enable-gpl \

  --enable-gnutls \

  --enable-libaom \

  --enable-libass \

  --enable-libfdk-aac \

  --enable-libfreetype \

  --enable-libmp3lame \

  --enable-libopus \

  --enable-libsvtav1 \

  --enable-libvorbis \

  --enable-libvpx \

  --enable-libx264 \

  --enable-libx265 \

  --enable-libsrt \

  --enable-nonfree && \

PATH="$HOME/bin:$PATH" make && \

make install && \

hash -r


Which is just a copy of the commands shown on the compile instructions with
my --enable-libsrt added.


I have created an install log but it is quite large so I won't attach it
here, but there is nothing that stands out as the reason why the protocol
does not get linked.


If there is anyone there who can give some insight into what is happening I
will be their servant forever


Thanks heaps



-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-install.sh
Type: application/octet-stream
Size: 3936 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20201015/1c1eaf5e/attachment.obj>

More information about the ffmpeg-user mailing list