Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want to perform HLS (HTTP Live Streaming) using Gstreamer

I would like to stream web cam video to http web page. I know how to read from web cam and archive it to file.

But how to stream via web. What is the pipeline for that?

like image 468
Prasanth Kumar Arisetti Avatar asked Jan 24 '16 12:01

Prasanth Kumar Arisetti


1 Answers

Use hlssink element from gst-plugins-bad:

gst-launch-1.0 videotestsrc is-live=true ! x264enc ! mpegtsmux ! hlssink

It will generate playlist and segments files. You need to provide HTTP access to these files, you can use any webserver, nginx or Apache, for example.

You can tweak hlssink's parameters to specify target location, segments count, etc. All options can be listed with:

gst-inspect-1.0 hlssink

If you need better low-level control, you'd better create your own web server with libsoup, manually split MPEG-TS into segments and add your own playlist endpoint.

like image 134
Kyrylo Polezhaiev Avatar answered Sep 29 '22 20:09

Kyrylo Polezhaiev