Here's what I use to GPU encode/decode multiple IP camera feeds using motion on a 15W haswell system with enough CPU left free for other tasks.
#motion.conf movie_extpipe_use on movie_extpipe ffmpeg -y -f rawvideo -pix_fmt yuv420p -video_size %wx%h -framerate %fps -vaapi_device /dev/dri/renderD128 -i pipe:0 -vf 'format=nv12,hwupload' -c:v h264_vaapi %f.mp4 netcam_params decoder=vaapi,rtsp_transport=tcp,keepalive=off,tolerant_check=on
Here's what I use to GPU encode/decode multiple IP camera feeds using motion on a 15W haswell system with enough CPU left free for other tasks.