Page 1 of 1

SOUT using VLC for security camera type acquistion

Posted: 13 Nov 2006 01:15
by quandt
I'd like to use VLC to record security camera output (24 hours a day 7 days a week). But have files saved every N number of minutes.

Ideally, I'd love to set a timer, have the file name be something like "file%02d.mpg" with VLC replacing the c-string with an incrementing value....

Thoughts? I could script it, but then I possibly loose some time between the time I close down one instance, and start another.



bquandt@heuris.com

Posted: 15 Nov 2006 06:17
by quandt
Since noone responded before I figured out a simple method, I thought I'd share the simple method with others that might be looking into this.

If you use the telnet interface/VLM (documented in the streaming how), and then use something like the below for the script things work pretty well. I just need to set up mulitple schedules a few more schedules which pick up on the next recording session, and as long as I overlap things by a few seconds I will not miss anything.

for those that can't see what is going on below:
- the input is from a multi-cast stream, which ideally I'd have another VLC client reading from my camera and doing the broadcast
- the output is to a file (rather then what the streaming docs originally thought it would be used for).

Things to figure out now include how to only capture things when there is motion (so as to save LOTS of disc space). There's a fair amount of research into determining motion within compressed streams (without decomprssing) wonder if anyone has done anything with VLC on this...?



new my_out broadcast enabled
setup my_out input udp://@239.0.0.1
setup my_out output #standard{access=file,mux=ts,dst="c:\\tmp\\reallytmp\\VLCOUTPUT\\vlcraw3.m2t"}
control my_out play


new my_sched schedule enabled
setup my_sched date 2006/11/14-21:05:00
setup my_sched append control my_media play

new my_stop schedule enabled
setup my_stop date 2006/11/14-21:10:00
setup my_stop append control my_media stop

Posted: 19 Nov 2006 18:38
by dionoea
The developement version VLC now has special format strings that make it easy to generate a file with a timestamp in it's name. See http://wiki.videolan.org/index.php/Docu ... mat_String

Concerning motion triggered recording, that currently isn't possible but it sure would be a good plugin idea.

Posted: 12 Dec 2006 20:06
by StevieG
BTW, the Format String Wiki page has month and minutes backwards according to the man page (and according to my testing).

Here are the correct values:

%m : month
%M : minute

I used this to set time stamps in filenames in vlc-0.9.0-svn-20061122-1309-win32 and it worked for me.

Re:SOUT using VLC for security camera type acquistion

Posted: 14 Dec 2006 11:24
by cspCoppola
Hi quandt,

I have a security system myself and the recording part was done by a colleague in 5 minutes chunks.
The system works fine but I have a problem when it comes to show the recorded images to our clients.
Do you happen to know how to merge the separate files in one full length video?
It is really hard to look for stuff in the files one by one till you find the image of your interest like say
someone stilling something, what is exactly what the system is all about. Any help will be appreciated.

TIA,

Coppola.

Posted: 14 Dec 2006 14:35
by Jean-Baptiste Kempf
--sout-keep does not help ?

Posted: 14 Dec 2006 15:06
by cspCoppola
I tryed with:

vlc aplaylist.m3u --sout #std{access=file,dts=afile.asf} --sout-keep vlc:quit

But the resulting file has no image when played!

Should I use a transcode section?
I want to keep the same content and only merge the files.

Thanks for your fast reply! :D

Coppola.