IP Camera live stream to HLS

Simon Nilsson simon.nilsson at videocent.com
Tue Jan 19 02:50:00 PST 2016


Hi Tim, thanks for your response. I think I managed to get it working, I
don't know how. This leads me to my next issue, not really related to
gstreamer but with hlssink. I need to serve the files produced by hlssink
using http. I'm using a library called Crow as http server. Crow doesn't
have built-in support for serving files so I had to implement it my self
using the following code:

if (fs::exists(filepath)) {

ifstream file(filepath.string(), ifstream::binary);

if (file.is_open()) {
res.set_header("Content-Type", getMimeType(filepath));
res.set_header("Accept-Ranges", "bytes");
res.body.assign(std::istreambuf_iterator<char>(file),
std::istreambuf_iterator<char>());
res.end();
file.close();
return;
}

}

The problem with this is I occacionaly get error that hlssink fails to
unlink the files, probably because the http server is currently reading
them. Is there some way of syncronizing with hlssink to get around this
race condition?


Med vänliga hälsningar / Best regards,

[image: Videocent AB] <http://videocent.com/>

Simon Nilsson / Programmer
simon.nilsson at videocent.com / +46761342073

Videocent AB
videocent.com

On Sun, Jan 17, 2016 at 11:28 PM, Tim Müller <tim at centricular.com> wrote:

> On Sun, 2016-01-17 at 16:05 +0100, Simon Nilsson wrote:
>
> Hi Simon,
>
> > Please I could really need some assistance with this. I tried
> > replacing the hlssink with a filesink to output a .ts file. This file
> > plays fine in most media players (e.g. Windows Media Player) but does
> > not play in VLC. I have uploaded the file to dropbox if someone would
> > like to take a look at it. https://dl.dropboxusercontent.com/u/765394
> > 2/test.ts ;
>
> It might also be useful to see what exactly you're feeding into
> GStreamer. Perhaps you could do this:
>
>  appsrc ! gdppay ! filesink location=foo.gdp
>
> and capture that for ~10-30 seconds or so and put it on dropbox for us.
> Thanks!
>
>  Cheers
>   -Tim
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160119/22e2c1e9/attachment-0001.html>


More information about the gstreamer-devel mailing list