Since http://www.jeffreythompson.org/blog/2014/11/13/installing-ffmpeg-for-raspberry-pi/ is a bit messy, here is how you can compile ffmpeg with x264 on raspbian. Changes are building in your home directory, getting just a shallow git clone and building with all CPU cores. Also no unnecessary sudo…
Read the comments below!
# In a directory of your choosing (I used ~/ffmpeg):
# build and install x264 git clone --depth 1 git://git.videolan.org/x264 cd x264 ./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl make -j 4 sudo make install # build and make ffmpeg git clone --depth=1 git://source.ffmpeg.org/ffmpeg.git cd ffmpeg ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree make -j4 sudo make install |
Read the comments below!
Hopefully someone, somewhere will provide a repository for this kind of stuff some day.
It takes just 25 minutes on a Raspberry Pi 3. Not hours or days like some old internet sources on old Raspis say.
In case you are wondering v4l2 should work with this.