How to enable the recording of a rtsp stream?

This forum is about all development around libVLC.
rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

How to enable the recording of a rtsp stream?

Postby rafaware » 25 Sep 2012 10:26

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: How to enable the recording of a rtsp stream?

Postby Jean-Baptiste Kempf » 25 Sep 2012 11:16

Like the VLC record button?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Re: How to enable the recording of a rtsp stream?

Postby rafaware » 25 Sep 2012 11:25

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

Jo2003
Blank Cone
Blank Cone
Posts: 67
Joined: 08 Feb 2010 13:29

Re: How to enable the recording of a rtsp stream?

Postby Jo2003 » 25 Sep 2012 13:10

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

rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Re: How to enable the recording of a rtsp stream?

Postby rafaware » 25 Sep 2012 13:20

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

Jo2003
Blank Cone
Blank Cone
Posts: 67
Joined: 08 Feb 2010 13:29

Re: How to enable the recording of a rtsp stream?

Postby Jo2003 » 25 Sep 2012 14:23

So far I haven't found a way to do this.

rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Re: How to enable the recording of a rtsp stream?

Postby rafaware » 22 Oct 2012 13:44

Hi again

Is there any plan to include this option in the library?

Thanks in advance

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: How to enable the recording of a rtsp stream?

Postby Rémi Denis-Courmont » 22 Oct 2012 17:36

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...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

rafaware
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Sep 2012 14:19

Re: How to enable the recording of a rtsp stream?

Postby rafaware » 22 Oct 2012 17:45

So where should I ask?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: How to enable the recording of a rtsp stream?

Postby Rémi Denis-Courmont » 22 Oct 2012 20:18

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests