I'm trying to do compress webcam image with vaapi***enc and stream the image with UDP protocol.
Are there any good samples or references ?
All of examples I could find don't try both of vaapi and UDP video streaming at the same time.
On the other hand, I could find out video streaming without using vaapi, like
Sender :
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480 ! timeoverlay ! tee name="local" ! queue ! autovideosink local. ! queue ! jpegenc! rtpjpegpay ! udpsink host=127.0.0.1 port= 5000
Receiver :
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink
But, I have no idea about how to use vaapijpegenc, or vaapih264enc instead of ***enc which doesn't utilize GPU.
If I just replaced jpegenc with vaapijpegenc, I get the follows.
- ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error
- streaming task paused, reason not-negotiated (-4)
How can I solve this problem ? Any samples or references ??
Thanks in advance.