GStreamer webcam mpeg4 live streaming via http

jerome picture jerome · Aug 23, 2012 · Viewed 9.5k times · Source

i was wondering how to encode video stream coming from a webcam in mpeg-4 containing H.264/AVC video, then stream it via http, using gstreamer ? The webcam is just a simple usb 2.0 webcam. The only example I've found is streaming mpeg-4 via rtsp, but the client I am using doesn't know about rtsp. Thanks for help.

Answer

av501 picture av501 · Aug 23, 2012

Gstreamer also has a http client: souphttpclientsink which can do a http put of the content you want to stream. The recieving server must be able to deal with the http put.

gst-launch videotestsrc ! x264enc ! souphttpclientsink location=<put the server location here>

The above works for me. Replace the testsrc with your capture and you need a server that will accept a http put on the location. Do a gst-inspect of souphttpclientsink for more details