How to use VA-API in gstreamer?
Víctor M. Jáquez L.
vjaquez at igalia.com
Fri Jun 30 10:52:12 UTC 2017
On 06/30/17 at 01:15am, CC wrote:
> Hi,
>
> I find the software h264 encode and decode will cause high cpu usage, so I
> want to use VA-API.
> <https://gstreamer.freedesktop.org/modules/gstreamer-vaapi.html> .
>
> This is my origin command using avdec_h264 and x264enc.
>
> gst-launch-1.0 -v udpsrc port=12347 !
> application/x-rtp,payload=107,encoding-name=H264 ! rtph264depay !
> video/x-h264, framerate=30/1 ! h264parse ! avdec_h264 ! videoconvert !
> videoscale ! video/x-raw, width=640, height=480 ! queue ! videoconvert !
> queue ! x264enc bitrate=1000 key-int-max=60 bframes=0 byte-stream=false
> aud=true tune=zerolatency ! h264parse ! video/x-h264,profile=main ! queue !
> mux. udpsrc port=12345 !
> application/x-rtp,payload=111,encoding-name=OPUS,clock-rate=48000,
> channels=2 ! rtpopusdepay ! opusparse ! opusdec ! queue ! voaacenc
> bitrate=128000 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw !
> queue ! flvmux streamable=true name=mux ! queue ! rtmpsink
> location=rtmp://192.168.1.165:1935/myapp/testav
>
> I try to replace avdec_h264 and x264enc with vaapih264dec and
> vaapih264enc. But it seems not working.
What's the error?
Using videoconvert and videoscale with vaapi is a bad idea, is better to
use vaapipostproc.
And the parameters of x264enc are different from the vaapih264enc, it is not a
1:1 replacement.
vmjl
More information about the gstreamer-devel
mailing list