sevenpana.blogg.se

Raspberry pi ffmpeg install
Raspberry pi ffmpeg install





raspberry pi ffmpeg install

If you have a H.264 video file (inputfile.mp4) that needs to be re-encoded to a smaller bitrate (1500k), for example, you can take advantage of both:įfmpeg -c:v h264_mmal -i inputfile.mp4 -c:v h264_omx -c:a copy -b:v 1500k outputfile.mp4 To take advantage of Pi's accelerated H.264, use ffmpeg option -c:v h264_mmal for decoding and -c:v h264_omx for encoding. I'll be assuming this ffmpeg variant in my future Raspberry Pi projects and tutorials, so if you can't get them to work, switch to this self-compiled version.

raspberry pi ffmpeg install

If a future ffmpeg version offers something new that you need, you can simply repeat these steps to upgrade.Īs ffmpeg is now installed like a regular Debian package, it's easy to uninstall: sudo apt remove ffmpeg Store that in a safe place, so you can quickly install it on another Pi ( sudo dpkg -i ffmpeg*.deb) without recompiling. You now have the latest and greatest ffmpeg installed and there's a precompiled deb package in your FFmpeg directory (you can delete the other stuff to free some space). (on Pi 2/3 you can utilize additional CPU cores with make -j4) Install the self-compiled ffmpeg (fill in any information checkinstall wants) sudo checkinstall Lock the package so it won't get replaced by another version during software updates echo "ffmpeg hold" | sudo dpkg -set-selections Done! configure -arch=armel -target-os=linux -enable-gpl -enable-omx -enable-omx-rpi -enable-nonfree -enable-mmal Install checkinstall if you already haven't sudo apt install checkinstall Remove any other ffmpeg package sudo apt remove ffmpeg Get the ffmpeg source code and compile it (this will take loooong) git clone Raspbian should have git and compilation tools installed by default, but if not, install them. It's a good idea to use checkinstall so that a proper deb package is created and installed. Compiling also avoided some bloaty dependencies that the package in the Debian (Jessie backports) repository has. Compiling ffmpeg with Raspberry Pi hardware accelerationĪFAIK the regular Debian/Raspbian version of ffmpeg does not support Raspberry Pi's hardware H.264 acceleration, so I decided to roll my own.







Raspberry pi ffmpeg install