Periodic Snapshot of Stream
Posted: 24 May 2013 02:51
Hi,
I was wondering if it's possible to save a periodic JPEG snapshot of an RTP stream to disk with VLC?
I have an IP security camera which I can configure to provide an MJPEG stream at 1-12fps, and I'd to end up with a folder containing a series of jpeg files taken from the stream at, say, 10 second intervals, named with a timestamp.
I don't want to just save the stream at 1fps because I need to record 24 hours a day for several years from a number of cameras, and minimising storage space while maximising snapshot quality is important.
It'd also be great if the snapshot would save the actual JPEG encoded in the MJPEG stream, rather than re-encoding the frame, as image quality is important.
An example of what I'd like to end up with:
I can capture the raw 1fps stream ok using something like this, but at no less than 1fps, because that's as low as the camera allows the framerate to be set:
Secondarily, I would also settle for being able to take the camera's MJPEG stream and save it to disk at a lower framerate like 0.1fps, i.e. dropping all frames except one every 10 seconds. I'd prefer the JPEG snapshot approach though, as the video files sometimes become unplayable when saved to disk if something goes wrong during recording, and it's hard to tell if it's working correctly until after the recording is stopped, so saving snapshots every 10 seconds seems a bit more robust to stream errors and network outages etc.
Any help in the right direction here is most appreciated - I've spent a day or so trying various command line options and settings in the GUI streaming options, but haven't managed to get quite what I'm after.
Thanks in advance,
Sam.
I was wondering if it's possible to save a periodic JPEG snapshot of an RTP stream to disk with VLC?
I have an IP security camera which I can configure to provide an MJPEG stream at 1-12fps, and I'd to end up with a folder containing a series of jpeg files taken from the stream at, say, 10 second intervals, named with a timestamp.
I don't want to just save the stream at 1fps because I need to record 24 hours a day for several years from a number of cameras, and minimising storage space while maximising snapshot quality is important.
It'd also be great if the snapshot would save the actual JPEG encoded in the MJPEG stream, rather than re-encoding the frame, as image quality is important.
An example of what I'd like to end up with:
Code: Select all
2013-05-24 17.30.00.jpg
2013-05-24 17.30.30.jpg
2013-05-24 17.31.00.jpg
2013-05-24 17.31.30.jpg
...
Code: Select all
vlc.exe "rtsp://111.222.333.444/live.sdp" :sout=#file{dst="%logtime% stream.mp4"}}
Any help in the right direction here is most appreciated - I've spent a day or so trying various command line options and settings in the GUI streaming options, but haven't managed to get quite what I'm after.
Thanks in advance,
Sam.