ffmpeg hardware accel for Pi2

My Quirky 8.0.* builds are based on DEBs from Ubuntu Xenial Xerus 16.04, which has ffmpeg version 2.8.6.

Ffmpeg version 3.1 introduced OpenMAX hardware acceleration for the Raspberry Pi, so I decided to check that out.

I downloaded ffmpeg from git, and configured it like this, in a running Pi2:

# ./configure --prefix=/usr --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libx264 --enable-nonfree --enable-pthreads --enable-libvorbis  --enable-shared --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-runtime-cpudetect --enable-zlib --disable-debug --enable-bzlib --enable-version3 --enable-ffplay  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394  --enable-libfreetype --enable-libschroedinger --enable-libvpx --enable-libspeex --enable-libcdio --enable-fontconfig --enable-libbluray --enable-libx265 --enable-pic --disable-libpulse --disable-yasm --enable-thumb --cpu=armv7-a --disable-vdpau --enable-mmal --enable-omx --enable-omx-rpi --enable-openssl --enable-opengl --enable-libtheora --enable-librtmp --enable-libopencv --enable-libmp3lame --enable-libfontconfig --enable-libass --enable-gcrypt --enable-libgsm --enable-libtwolame --enable-libv4l2 --enable-libwebp --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libsmbclient --enable-libopus --disable-ladspa --disable-libcaca  --disable-libssh --enable-sdl2 --enable-ffplay --disable-armv5te --disable-armv6 --disable-armv6t2 --extra-cflags="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/mmal -I/opt/vc/include/interface/vchiq_arm -I/opt/vc/include/IL -I/opt/vc/include/GLES2" --extra-cxxflags="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/mmal -I/opt/vc/include/interface/vchiq_arm -I/opt/vc/include/IL -I/opt/vc/include/GLES2" --extra-ldflags="-L/opt/vc/lib"

# make -j3

I was curious to know if there is any way to get 'ffplay' to render with MMAL or OpenMAX, but it seems there isn't. Big Buck Bunny full-screen was jerky. It cannot utilise the direct overlay rendering with OpenMAX, as VLC and OMXplayer can do.

I think that by default, it uses MMAL. If I do this explicitly, it works, but no difference in the frame rate, just as jerky full-screen:

# ffplay -vcodec h264_mmal big_buck_bunny.mp4

...I guess it is decoding using the GPU, but that's it.

I can't see any point to it, so I will stay with the ffmpeg Ubuntu DEBs.

No comments posted yet