Page 1 of 1
How to enable the recording of a rtsp stream?
Posted: 25 Sep 2012 10:26
by rafaware
I've looked at the documentation and i can not find any option to enable the recording of a rtsp streaming
Any ideas?
I need direct streaming recording, without re-encoding
Thanks in advance
Re: How to enable the recording of a rtsp stream?
Posted: 25 Sep 2012 11:16
by Jean-Baptiste Kempf
Like the VLC record button?
Re: How to enable the recording of a rtsp stream?
Posted: 25 Sep 2012 11:25
by rafaware
Yes.
It re-encodes the stream? That is, if the rtsp stream is h264, the outputfile is h264? A dummy dump to disc
Thanks in advance
Re: How to enable the recording of a rtsp stream?
Posted: 25 Sep 2012 13:10
by Jo2003
You can use an mrl option to get the file written down to disk.
After creating the media you can add following option:
Code: Select all
:sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst='/path/to/save/file.ts'}}
This will show the stream as well as save the stream in ts format to file "/path/to/save/file.ts".
In C you'd use:
Code: Select all
libvlc_media_t * pMedia = libvlc_media_new_location(p_instance, "url://of_rtsp/stream");
if (pMedia)
{
libvlc_media_add_option (pMedia, ":sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst='/path/to/save/file.ts'}}");
}
Playing this media will show the stream and save it to disk.
Best regards,
Jo2003
Re: How to enable the recording of a rtsp stream?
Posted: 25 Sep 2012 13:20
by rafaware
Thanks!!
It's too easy!. One last question: Is posible to stop and re-start recording without stopping the media live view?
Thanks in advance
Re: How to enable the recording of a rtsp stream?
Posted: 25 Sep 2012 14:23
by Jo2003
So far I haven't found a way to do this.
Re: How to enable the recording of a rtsp stream?
Posted: 22 Oct 2012 13:44
by rafaware
Hi again
Is there any plan to include this option in the library?
Thanks in advance
Re: How to enable the recording of a rtsp stream?
Posted: 22 Oct 2012 17:36
by Rémi Denis-Courmont
Even if that were the case, it is unlikely that the guy/gal that would be working on it at this very moment would stumble upon this forum post...
Re: How to enable the recording of a rtsp stream?
Posted: 22 Oct 2012 17:45
by rafaware
So where should I ask?
Re: How to enable the recording of a rtsp stream?
Posted: 22 Oct 2012 20:18
by Rémi Denis-Courmont
I don't think there is such a magic place.
You'll know that it's done when it's been done or when you do it.