Main Menu

Recording capacity

Started by AJFC, June 04, 2023, 12:21:40 AM

Previous topic - Next topic

AJFC

I have noticed that my storage is filling quite fast although only having the IceBox for about a month, I delete recordings once they have been viewed so wonder if they are stored in a "trash" directory as they were on my Beyonwiz T4, is so how do I clear the "trash"?

Also is it possible to attach an external hard drive to save recordings I may wish to keep or to just store recordings?
Tony

IanL-S

It is possible to attach a USB HDD and copy the recordings to to. As I understand it, it will not copy the associated data file which includes program information, as it is stored elsewhere and it is very difficult to associate the data file with a particular recording as they do not use the same name.

You can also copy recordings via SFTP to a PC, but once again you do not get the assoicated data files.

It is possible to change the settings in TVHeadend to place recordings on an attached USB HDD (preferably formatted using ext4) or to a network share on PC or NAS. I have not tried any of these.
IceTV: IceBox + BYOB IceBox + 2xTRF-2400 + 2xTF7100HDPVRtPlus + SKIPPA [RIP] + T2 + U4 + V2
No IceTV: a few Toppys and T2
Synology NAS
Check out the oztoppy wiki and oztoppy Forum for Toppy help

raymondjpg

Quote from: IanL-S on June 04, 2023, 02:31:19 PMIt is possible to change the settings in TVHeadend to place recordings on an attached USB HDD (preferably formatted using ext4) or to a network share on PC or NAS. I have not tried any of these.
As far as I know it is not possible to configure TVHeadend to record to a network share or NAS, but there is a relatively straightforward set of instructions at https://wiki.libreelec.tv/how-to/mount_network_share that will enable you to do this. It worked for me with recording to a Windows network share. You'll find the system.d directory in Configfiles, and you'll need to SSH in to execute the storage-recordings.mount file, user name "root" password "icebox" (without the quotes, case sensitive).
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

DeltaMikeCharlie

Quote from: IanL-S on June 04, 2023, 02:31:19 PMit will not copy the associated data file which includes program information, as it is stored elsewhere and it is very difficult to associate the data file with a particular recording as they do not use the same name.
Ian,

The research that I have done so far on Tvheadend suggests that the metadata for a recording is stored within TVH, but is easily accessible via a HTML query.

What we refer to as a 'timer', TVH referrers to as a 'DVR Entry' via its HTTP/JSON API.  There are 4 main types of 'DVR Entry':  'scheduled' this is what we think of as a 'timer'; 'recording' this is a timer that is currently recording; 'failed' this is a failed recording; and 'completed' this is a finished recording and all of the metadata for that recording is held in this record.

What needs to be done in order to archive the metadata for future use in Kodi is to extract this metadata from TVH and convert it to a Kodi NFO file as a 'movie'.

screenshot00009.jpg

Here is an extract of the JSON.  There may be a way to filter by file name, I have not tried yet.

http://<icebox IP>:9981/api/dvr/entry/grid_finished&limit=99999

        }, {
            "uuid": "231963423e1531a525f72c63ba5c613c",
            "enabled": true,
            "start": 1685053200,
            "start_extra": 0,
            "start_real": 1685053170,
            "stop": 1685055600,
            "stop_extra": 0,
            "stop_real": 1685055600,
            "duration": 2400,
            "channel": "5b298b8e72b9c6d1548e16efd0faf3aa",
            "channel_icon": "imagecache/1356",
            "channelname": "10 Peach",
            "title": {
                "eng": "Seinfeld"
            },
            "disp_title": "Seinfeld",
            "subtitle": {
                "eng": "The Rye [Repeat]"
            },
            "disp_subtitle": "The Rye [Repeat]",
            "description": {
                "eng": "Jerry blabs about Elaine's latest boyfriend, inspiring the man in question to write a hit song about their romance. Meanwhile, Kramer is getting George into hot water with his future in-laws. Who knew a loaf of bread could provoke such drama?"
            },
            "disp_description": "Jerry blabs about Elaine's latest boyfriend, inspiring the man in question to write a hit song about their romance. Meanwhile, Kramer is getting George into hot water with his future in-laws. Who knew a loaf of bread could provoke such drama?",
            "pri": 2,
            "retention": 0,
            "removal": 0,
            "playposition": 0,
            "playcount": 0,
            "config_name": "8d0f5b7ae354d956d7fe5db25f5d0d24",
            "creator": "127.0.0.1",
            "filename": "/storage/recordings/Seinfeld/Seinfeld-10 Peach2023-05-2608-20.ts",
            "errorcode": 0,
            "errors": 0,
            "data_errors": 0,
            "dvb_eid": 0,
            "noresched": true,
            "norerecord": false,
            "fileremoved": 0,
            "autorec": "",
            "autorec_caption": "",
            "timerec": "",
            "timerec_caption": "",
            "parent": "",
            "child": "",
            "content_type": 0,
            "broadcast": 0,
            "url": "dvrfile/231963423e1531a525f72c63ba5c613c",
            "filesize": 924676872,
            "status": "Completed OK",
            "sched_status": "completed",
            "duplicate": 0
        }, {

An NFO is just an XML file.

https://kodi.wiki/view/NFO_files/Movies

I'll put this one on my 'to do' list for script ideas.  This would be fairly trivial to do in Python.

AJFC

Thank you all again, I shall have to wait for any advances made as some of what you have said is way above my head.
Regards
Tony

IanL-S

Quote from: DeltaMikeCharlie on June 04, 2023, 05:03:23 PM
Quote from: IanL-S on June 04, 2023, 02:31:19 PMit will not copy the associated data file which includes program information, as it is stored elsewhere and it is very difficult to associate the data file with a particular recording as they do not use the same name.
Ian,

The research that I have done so far on Tvheadend suggests that the metadata for a recording is stored within TVH, but is easily accessible via a HTML query.

What we refer to as a 'timer', TVH referrers to as a 'DVR Entry' via its HTTP/JSON API.  There are 4 main types of 'DVR Entry':  'scheduled' this is what we think of as a 'timer'; 'recording' this is a timer that is currently recording; 'failed' this is a failed recording; and 'completed' this is a finished recording and all of the metadata for that recording is held in this record.

.....

Delta Mike Charlie, there is also the data in \storage\recordings\.backup which I assume consolidates that information - this directory is created by the IceTV add-on, and it copies the data to that folder so that recordings can be recovered when a soft reset is done. Not sure why it also has files for timers that have not yet run.

Logistically if you only want data for completed recordings, getting it from TVHeadend directly is cleaner.

Ian
IceTV: IceBox + BYOB IceBox + 2xTRF-2400 + 2xTF7100HDPVRtPlus + SKIPPA [RIP] + T2 + U4 + V2
No IceTV: a few Toppys and T2
Synology NAS
Check out the oztoppy wiki and oztoppy Forum for Toppy help

DeltaMikeCharlie

Quote from: IanL-S on June 06, 2023, 01:39:24 PMDelta Mike Charlie, there is also the data in \storage\recordings\.backup which I assume consolidates that information - this directory is created by the IceTV add-on, and it copies the data to that folder so that recordings can be recovered when a soft reset is done. Not sure why it also has files for timers that have not yet run.
I checked against the example that I showed in my previous post and the name of the file in \storage\recordings\.backup is the uuid of the recording.

Perhaps a soft reset deletes ALL DVR entries, hence the requirement to restore the ones that have not triggered yet as well as completed recordings.  However, I have not personally validated that DVR entries are deleted during soft reset and restored afterwards.  The backups may be there out of an abundance of caution.

Daniel Hall at IceTV

I can confirm that all data stored for plugins is deleted as part of a soft reset, so the recording files would be kept on the hard drive, but not be accessible via the recordings page within tvheadend/kodi.

This is why the backups folder exists, so the IceTV plugin can restore that information after a soft reset.
Regards,

Daniel.
CTO.

jonno

I have a Beyonwiz T4 PVR which allows me to record direct to an external usb HDD. Is the IceBox able to do the same? All the posts seem to suggest recordings can only be copied to the external drive.

IanL-S

There is a setting that allows you to select the partition to which recordings are saved [I have not tried it]. You have to manually enter the path. The setting is in the TVHeadend www server - select configuration > recording, which brings up a dialog box, in the bottom half there is a setting called Storage Path - the default location is "/storage/recordings". The save button is NOT on the dialog box, but on the very left of the bottom line of the menu. I suggest cloning the default profile, and changing the path for the clone. Call the clone something like "record to USB HDD". You will then to be able to easily change between storage locations.

Do not have a USB drive attached to my IceBox but the path is probably something like /dev/sdb1 - I am not an expert on Linux so I am guessing. Once you have attached the USB drive, you can find the "actual" path in Kodi settings - go to System Information then to Storage, and details of all attached storage is displayed.

Ian
IceTV: IceBox + BYOB IceBox + 2xTRF-2400 + 2xTF7100HDPVRtPlus + SKIPPA [RIP] + T2 + U4 + V2
No IceTV: a few Toppys and T2
Synology NAS
Check out the oztoppy wiki and oztoppy Forum for Toppy help