Last active
December 10, 2023 13:02
-
-
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
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
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 |
@Ch41r05 Use 32bit Raspbian.
@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?
@Ch41r05 I have no idea, sorry.
Prebuilt release 4.2 for armv7l Raspbian Buster - https://projects.milankragujevic.com/ffmpeg_rpi-buster-armv7l_2022-12-06_release-4.2.zip , mirror https://mega.nz/file/SpImTRDY#HmRjK2v44-4EeiMqxfKdzb9_eAJDO5k2K3dTmWaGQi4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Milan,
While looking for a solution to build and install ffmpeg with omx and omx-rpi support for a Raspberry Pi 3 with debian environment I landed on your page. Following the script triggers a "ERROR: mmal not found" on dietpi which is the lightweight debian distro I use. I'm not aware of 64 bits ports of debian for raspberry that are compatible with mmal, could you please share which OS are you using or if you separately built mmal?
Thanks a lot for sharing