2020-03-22, 09:02 PM
I probably could whip up a python script to do the basics. Does the Humax DVR create an output file with meta data.
Martin
Martin
2020-03-22, 09:02 PM
I probably could whip up a python script to do the basics. Does the Humax DVR create an output file with meta data.
Martin
2020-03-22, 09:35 PM
Martin
The only 'metadata' is that which is held in the filename eg Click_20200322_04300500.ts Gives the program is called 'Click', the start time was '04:30 22-03-2020' and the End Time was '05:00 22-03-2020' I know where the file is stored which would be '/home/pi/nas_recordings/Click' There is no series or episode information available (obviously). Regards. Chris Chris
Using Sub's template (at Port #9) I created an XML file to import avideo .ts file. The web app told me the file had been imported ('One recording imported') but when I viewed the Recordings section of the web app the program was not there. Checking the log files I can see an error (at 2020-03-23 09:42:59.569) which shows:
2020-03-23 09:42:47.487 [DEBUG][93] {"current": "5.0.2.200322","available": "5.0.2.200322"} 2020-03-23 09:42:59.430 [DEBUG][93] Got request [::ffff:192.168.1.50]: /import 2020-03-23 09:42:59.435 [DEBUG][93] Received import of type: text/xml 2020-03-23 09:42:59.435 [DEBUG][93] Import Recordings... 2020-03-23 09:42:59.566 [DEBUG][93] - adding:/home/pi/nas_recordings/Trucking Hell Extreme Road Rescue/Trucking Hell Extreme Road Rescue_20191014_14001500.ts 2020-03-23 09:42:59.569 [ERROR][93] Unexpected error saving scheduled recording: System.InvalidOperationException: Value must be set. at Microsoft.Data.Sqlite.SqliteParameter.Bind(sqlite3_stmt stmt) at Microsoft.Data.Sqlite.SqliteParameterCollection.Bind(sqlite3_stmt stmt) at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery() at NUtility.ScheduledRecording.Save() As you can see I am using the latest version of NPVR. I presume the the error 'System.InvalidOperationException: Value must be set' means something is missing from the XML file but what ? I have uploaded the full log file set for you see as well as the XML file I am using for the import. Chris
A bit further investion shows that the <Event> </Event> section in the XML is necessary. The revised XML import file shown below does allow the .ts file to be imported to NPVR
<?xml version="1.0" encoding="UTF-8"?> <recordings> <recording> <name>Trucking Hell Extreme Road Rescue</name> <channel>Imported</channel> <filename>/home/pi/nas_recordings/Trucking Hell Extreme Road Rescue/Trucking Hell Extreme Road Rescue_20191014_14001500.ts</filename> <status>READY</status> <startTime>2019-10-14T14:00:00.0000000Z</startTime> <endTime>2019-10-14T15:00:00.0000000Z</endTime> <Event> <Title>Trucking Hell Extreme Road Rescue</Title> <StartTime>2019-10-14T14:00:00.0000000Z</StartTime> <EndTime>2019-10-14T15:00:00.0000000Z</EndTime> </Event> </recording> </recordings> The imported video file shows up in Recordings and is playable. HOWEVER It seems that something else is going on (/Web app/Kodi client refreshs ?) in that the log files are then, on a regular basis, reporting the following for this imported file (and others): 2020-03-23 12:34:13.298 [ERROR][25] Unexpected error parsing EPGEvent xml: System.NullReferenceException: Object reference not set to an instance of an object. at NUtility.EPGEvent.Parse(String xml) 2020-03-23 12:34:13.298 [ERROR][25] xml: <Event> <Title>Trucking Hell Extreme Road Rescue</Title> <StartTime>2019-10-14T14:00:00.0000000Z</StartTime> <EndTime>2019-10-14T15:00:00.0000000Z</EndTime> </Event> Is this a problem ? I have uploaded the full log set for you see. Chris
2020-03-23, 01:29 PM
(This post was last modified: 2020-03-23, 02:05 PM by mvallevand.)
I think you need to add this markup
<Event/> Edit: I see you found that out however if you want to unnecessarily link to an Event (since you have no metadata) make sure you add a fake <OID> to the <Event> markup Martin
2020-03-23, 02:35 PM
It seem the minimum needed is:
<Event> <Title>Trucking Hell Extreme Road Rescue</Title> </Event> I haven't tried a blank title or a dummy OID though. Chris
2020-03-23, 02:49 PM
No as I posted an empty event worked for me <Event />
Martin
OK, success - kind of.
I can now successfully import my .ts files from my Humax recording using the following XML template, the metadata is obviously limited but its good enough for me. <?xml version="1.0" encoding="UTF-8"?> <recordings> <recording> <name>Catch-22</name> <channel>Imported</channel> <filename>/home/pi/nas_recordings/Catch-22/New_Catch-22_20190704_2102.ts</filename> <status>READY</status> <startTime>2019-07-04T21:00:00.0000000Z</startTime> <endTime>2019-07-04T22:00:00.0000000Z</endTime> <Event/> </recording> </recordings> Two minor problems remain: 1. The import XML file gives the Start Time as 21:00 and the End Time as 22:00 but when this file is mported the Start Time in the web app is shown as 10:00PM (22:00) and the End Time as 11:00PM (23:00) - see attached NPVR_Capture1 2. As I had 4 episodes of Catch-22 to import I created a seperate XML file for each episode and zipped them up into a zip file. I then imported the zip file into NPVR but nothing happened. On examining the log files I can see: 2020-03-24 08:56:42.697 [DEBUG][31] {"current": "5.0.2.200322","available": "5.0.2.200322"} 2020-03-24 08:56:52.098 [DEBUG][31] Got request [::ffff:192.168.1.50]: /import 2020-03-24 08:56:52.107 [DEBUG][26] Received import of type: application/x-zip-compressed 2020-03-24 08:56:52.108 [DEBUG][26] Catch-22-1.xml 2020-03-24 08:56:52.108 [DEBUG][26] Catch-22-2.xml 2020-03-24 08:56:52.108 [DEBUG][26] Catch-22-3.xml 2020-03-24 08:56:52.108 [DEBUG][26] Catch-22-4.xml 2020-03-24 08:57:13.949 [DEBUG][93] Got request [::ffff:192.168.1.80]: /service (recording.lastupdated) 2020-03-24 08:57:13.949 [DEBUG][93] method=recording.lastupdated Should this be possible or should I simply use one XML file containing all the episode details ? I have attached the full log file set for you to see. Regards. Chris
2020-03-24, 12:39 PM
(2020-03-24, 09:13 AM)ceejayemm Wrote: <?xml version="1.0" encoding="UTF-8"?>The times in the XML file are in UTC timezone (notice the "Z" at the end). I'm guessing that your timezone is UTC+1 based upon your statement that the starttime is displayed as 22:00 which is 21:00 UTC + 1 hour. (2020-03-24, 09:13 AM)ceejayemm Wrote: 2. As I had 4 episodes of Catch-22 to import I created a seperate XML file for each episode and zipped them up into a zip file. I then imported the zip file into NPVR but nothing happened. On examining the log files I can see:Just put them all in one XML file.
2020-03-24, 01:02 PM
I suspect that when you created your parse routine you did not account for the fact that 20190704_2102 is DST
It is only cosmetic so not worth much effort. Martin |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Import guide data from HD Homerun tuner | jonasx | 5 | 214 |
2024-10-14, 08:48 PM Last Post: mvallevand |
|
NextPVR Deleted All My Important Files on SSD | yngsadstn | 4 | 406 |
2024-09-15, 08:38 AM Last Post: mvallevand |
|
Recordings import issue | Jaggy | 4 | 271 |
2024-08-25, 12:03 AM Last Post: Jaggy |
|
How to Import Channels? | kerryball | 1 | 274 |
2024-07-09, 04:52 PM Last Post: sub |
|
Recording stream following short video clip | joshskey | 5 | 577 |
2023-11-12, 08:37 PM Last Post: mvallevand |
|
Issues with MPD Files | Paul92 | 4 | 617 |
2023-10-01, 06:22 AM Last Post: mvallevand |
|
Unable to Import Recordings | Markj2 | 2 | 707 |
2023-07-18, 01:32 AM Last Post: Markj2 |
|
Video quality on clients | ninkynonk | 7 | 636 |
2023-07-17, 10:06 PM Last Post: ninkynonk |
|
How to Import Channels? | HITFM885 | 6 | 966 |
2023-07-02, 01:37 AM Last Post: HITFM885 |
|
Monitor Folder to Add Files to Recordings? | samgreco | 9 | 1,055 |
2023-03-01, 09:34 PM Last Post: mvallevand |