Skip to content

Instantly share code, notes, and snippets.

@milankragujevic
Last active December 10, 2023 13:02
Show Gist options
  • Select an option

  • Save milankragujevic/bd38d796ea6eea27f229216d75d6c202 to your computer and use it in GitHub Desktop.

Select an option

Save milankragujevic/bd38d796ea6eea27f229216d75d6c202 to your computer and use it in GitHub Desktop.
Compile FFmpeg with support for OMX encoding of H264 video on Raspberry Pi 3
wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb -O /tmp/deb-multimedia-keyring.deb
sudo dpkg -i /tmp/deb-multimedia-keyring.deb
rm /tmp/deb-multimedia-keyring.deb
sudo sh -c 'echo "deb https://www.deb-multimedia.org buster main non-free" >> /etc/apt/sources.list'
sudo apt update
sudo apt upgrade -y
sudo apt install -y libfdk-aac-dev libomxil-bellagio-dev libx264-dev libasound2-dev libmp3lame-dev autoconf automake build-essential libfreetype6-dev libtool pkg-config texinfo zlib1g-dev git
cd ~
git clone https://github.com/ffmpeg/ffmpeg -b release/4.2
cd ffmpeg/
./configure --enable-indev=alsa --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree --enable-yasm --enable-libfdk-aac --disable-doc --enable-mmal --enable-libmp3lame --enable-libfreetype --disable-shared --enable-static
make -j4
sudo make install
@milankragujevic
Copy link
Author

@Ch41r05 Use 32bit Raspbian.

@Ch41r05
Copy link

Ch41r05 commented Oct 11, 2022

@milankragujevic I've already tried 32bit Raspbian, sadly with no luck, since it instead features a "ERROR: OpenMAX IL headers from raspberrypi/firmware not found". Did you encounter this kind of error in your previous attempts?

@milankragujevic
Copy link
Author

@Ch41r05 I have no idea, sorry.

@milankragujevic
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment