Posted in Raspberry Pi

Compile FFMPEG for Raspberry Pi 3

Get FFMPEG source code:

Compile libx264

Compile ALSA

Compile FDK-AAC

Installing build tools:

Compile fdk-aac

Compile FFMPEG

--enable-omx --enable-omx-rpi : This enables ffmpeg runtime hardware encoding

4 thoughts on “Compile FFMPEG for Raspberry Pi 3

  1. Hello Sir, I have followed all the above yet when i try to run at the end the following command it says “ffmpeg: Command not found” can you please help me?

    raspivid -o – -t 0 -w 1280 -h 720 -fps 25 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i – -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://

  2. The above process work like a charm!
    If you happened to be getting “ERROR: OMX_Core.h not found” you just need to source missing headers. You can get them from the default repo by executing below command:

    sudo apt-get install libomxil-bellagio-dev

    At the end, you may also want to validate your compilation by running:

    ./ffmpeg -encoders | grep h264_omx

    If all went well, you should see something along the lines:

    V….. h264_omx OpenMAX IL H.264 video encoder (codec h264)

    Many Thanks for a solid guide which even consider in which directory user currently is!

  3. in case if anyone get an error “Omx_Core.h not available, Please follow the following additional steps before compiling FFMPEG:
    1. Install the package called “libomxil-bellagio-dev”
    2. unside ffmpeg directory, run the command ‘sudo ./configure –enable-omx –enable-omx-rpi’
    3. Then proceed with ffmpeg compilation

Leave a Reply

Your email address will not be published. Required fields are marked *