Stream video (RTSP) from USB webcam using Raspberry Pi
I have a Raspberry Pi 2B+ and I'm trying to stream video from a USB camera using GStreamer. The camera's image format is MJPG 1280x720@25fps, and I'm trying to convert it to H264 so that it works on low-bandwidth connections. I have tried gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,format=MJPG,width=1280,height=720,framerate=25/1 ! decodebin ! vaapih264enc ! video/x-h264,stream-format=byte-stream ! rtph264pay ! tcpserversink host=0.0.0.0 port=8554
, but i got an error: WARNING: erroneous pipeline: no element "vaapih264enc"
. I installed GStreamer using apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
and I think the gstreamer-vaapi plugin was not included by default. How can I add it now?