Loop recording IP Camera

*nix specific usage questions
Remex
New Cone
New Cone
Posts: 1
Joined: 22 Apr 2022 09:13

Loop recording IP Camera

Postby Remex » 24 Apr 2022 16:15

Hello,
I want to record my IP camera but I have no idea what to do when my storage is out of space. I thought about recording 1 hour videos and just delete that which are useless. Is it possible to do a loop for example for 1 hour? I'll turn on recording and then VLC will end it after hour and start new after that and that will be looped. Or maybe you have better idea to store my video from IP camera, because software specifed to IP cameras doesn't recognize my camera, I can only record screen or capture camera by rtsp.


P.S.
I'm doing it at my raspberry pi 4 with 2gb ram

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: Loop recording IP Camera

Postby chubinou » 25 Apr 2022 19:20

you can use the "run-time" property to define for how long the recording should run, note that it doesn't seems to work with some v4l2 devices

something like this

vlc <yourinput> --run-time 10 ':sout=#transcode{vcodec=h264,acodec=aac}:file{dst=/home/your/output.mkv}'

look for vlc streaming / stream output documentation online.

otherwise *maybe* you can achieve this with logrotate (https://linux.die.net/man/8/logrotate) by stoping/starting VLC each time it rotates


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests