restreamer
restreamer copied to clipboard
DVR to disk
Is there currently a option to have the DVR persist data. Currently it seem to me that the data is stored in memory. For replaying the last few minutes this is very nice and fast. But i would love to have a option to write the files also to disk to allow for a longer DVR time without having to add/use more RAM.
Hey @Pimmetje Good idea! Added to the roadmap 👍
Hey @Pimmetje It was a good idea! It is included in v2.2.0 and can be activated here: https://docs.datarhei.com/restreamer/knowledge-base/manual/edit-livestream/processing-and-control#2-storage
Just change the storage from In-memory to Disk and save.
Cheers.
Hey @jstabenow Thanks for this! Question what is the storage strategy? cq When are files read from disk? It would be nice to minimize the IO so keep like x minutes in memory for example. And than write the files in batches and do a rollover in the memory.
I have tested the DVR feature. It seems to work. Please note that all files are currently placed in the same folder. Placing a lot of files in one folder is not recommended as listing it will take a lot of time.
If possible place the files in a date format folder structure like cameraID/YYYY/MM/DD/file_xyz.ts
If that is hard place make a subfolder for every camera.
I have tested it now with some longer recordings. Restarting restreamer gave some trouble. (camera streams did not want to start). After moving the files in batches to another folder and starting restreamer all came back to life. It safe to say the DVR needs some more love.
It seems to me when i have DVR to disk enabled VLC wil start from the beginning of the stream. It would be nice if that is configurable. Or by default start live.
Sorry for the late response.
Hey @jstabenow Thanks for this! Question what is the storage strategy? cq When are files read from disk? It would be nice to minimize the IO so keep like x minutes in memory for example. And than write the files in batches and do a rollover in the memory.
You can set the disc cache here: Settings > Storage > Disk cache
But beware: There is a problem, as we do not yet have a “blocklist” for mime-types in the latest release. Accordingly, you must enter “.ts” so the HLS manifest (.m3u8) is not cached. It is fixed in the next release.
I have tested the DVR feature. It seems to work. Please note that all files are currently placed in the same folder. Placing a lot of files in one folder is not recommended as listing it will take a lot of time.
If possible place the files in a date format folder structure like cameraID/YYYY/MM/DD/file_xyz.ts
If that is hard place make a subfolder for every camera.
The folder structure is a great idea. Let's build in.
I have tested it now with some longer recordings. Restarting restreamer gave some trouble. (camera streams did not want to start). After moving the files in batches to another folder and starting restreamer all came back to life. It safe to say the DVR needs some more love.
Can you tell how long the stream ran? Then I'll check it out.
It seems to me when i have DVR to disk enabled VLC wil start from the beginning of the stream. It would be nice if that is configurable. Or by default start live.
Once the stream has ended, FFmpeg marks the HLS manifest as “is finished,” which is like a VOD. As soon as the stream runs again, the stream is “live.”
You can set the disc cache here: Settings > Storage > Disk cache
it was on 0 unlimited. What does disk cache do? Will it keep some parts in memory? Because that is not clear to me from the settings menu
But beware: There is a problem, as we do not yet have a “blocklist” for mime-types in the latest release. Accordingly, you must enter “.ts” so the HLS manifest (.m3u8) is not cached. It is fixed in the next release.
I added .ts to cache types now
I have tested it now with some longer recordings. Restarting restreamer gave some trouble. (camera streams did not want to start). After moving the files in batches to another folder and starting restreamer all came back to life. It safe to say the DVR needs some more love.
Can you tell how long the stream ran? Then I'll check it out.
about 36 hours on a full hd recording to a harddisk.
It seems to me when i have DVR to disk enabled VLC wil start from the beginning of the stream. It would be nice if that is configurable. Or by default start live.
Once the stream has ended, FFmpeg marks the HLS manifest as “is finished,” which is like a VOD. As soon as the stream runs again, the stream is “live.”
~~I also seems to be running from the beginning when the stream is live.~~
Now it seem to work them i tested it.
Thanks for your time. It's appreciated!
Hi @Pimmetje We are closing your issue https://github.com/datarhei/restreamer/issues/381.
This may be due to the following reasons:
- Problem/inquiry has been solved
- The ticket remained unanswered by you for a more extended time
- The problem was explained and handled in another ticket
You can reopen this ticket at any time!
Please do not open related tickets twice. Always answer/ask in the original issue with the same problem.
Your datarhei team //Sven