How do I set the time span to record a stream?

This forum is about all development around libVLC.
yasdnil1
New Cone
New Cone
Posts: 9
Joined: 13 May 2011 22:55

How do I set the time span to record a stream?

Postby yasdnil1 » 09 Jun 2011 18:07

I'm streaming from a camera (rtsp://xxx) to a file (xx.mp4). I want the file to be a certain length (4 days or whatever). I want it to record forever, keeping the file the same length. So, delete from the beginning of the file and add to the end of the file (keeping it 4 days). How do I do that? Is there a media option to set? Would it be a vlcArg I pass in? I'm coding in Java. Please explain how to do it, providing the code*. Thanks.

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

Re: How do I set the time span to record a stream?

Postby Rémi Denis-Courmont » 09 Jun 2011 19:06

Someone would need to write a plugin for automatic time slicing of the stream output.

At the moment, you need to stop and restart "playback" to start a new file.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

yasdnil1
New Cone
New Cone
Posts: 9
Joined: 13 May 2011 22:55

Re: How do I set the time span to record a stream?

Postby yasdnil1 » 10 Jun 2011 16:43

What are the ways I would do the stop and start?
What's the best way?
I don't think I want to overwrite the file, so how would I just stop a file then start a new one (using the same stream as the input)?
Is there some kind of roundabout way I can add and delete from a file? Maybe using:
* --input-repeat=
* --start-time=
* --stop-time=
* --run-time=
(preliminary tests show I'm missing around 30 seconds of video using stop-time & run-time setting them in libVlcArgs and passing them into the factory)
How would I set those values (stop-time, run-time) in mediaOptions, & pass that into playMedia?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests