How to configure Folder(s) on HDD to assign limited size to it to control total size of recorded live streaming for playback service for past days
I have Intel Server(as the CPUZ on diagram) which has only 3 bays(16TB each)
I’m planning to record around 30 live channels for playback service for past 14 days or more if able.
1. Can I configure/set as overwrite from the oldest recorded file to record new/next one( e.g. On 15th, overwrite recorded file of 1st of month. On 16th, overwrite recorded file of 2nd of month)
2. Can I configure/set ‘Each Folder’ as overwrite from the oldest recorded file to record new one when size of folder exceeds 2TB? (to assign max storage size of folder as 2TB)
RE: How to configure Folder(s) on HDD to assign limited size to it to control total size of recorded live streaming for playback service for past days - Added by Hugh Phoenix-Hulme about 1 year ago
Not sure exactly what you'd do in Windows, but this is some really basic OS scripting outside of Tvheadend.
I do more-or-less the same thing for my ONVIF cameras. The cameras each have an RTSP server, so I use openrtsp to receive the stream which enables me to limit the duration of each file.
If you use curl you can use the --max-file-size command line parameter.
What you would do is create a batch script, powershell script, whatever, for each source - or one that you can pass parameters into. The batch script would have an infinite loop. On each iteration you would call curl with the URL for the channel (probably using the pass or htsp profile) and a maximum size, and the output file including whatever information you need - e.g. date, time, channel name. On termination, you would check the size of all the files in the directory ("folder") and if it exceeds a certain amount (e.g. 2TB), delete the oldest. Then the loop goes back to the start.