NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support v
« Previous 1 … 36 37 38 39 40 … 44 Next »
Import video files

 
  • 0 Vote(s) - 0 Average
Import video files
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,174
Threads: 958
Joined: May 2006
#11
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
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#12
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
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#13
2020-03-23, 10:02 AM (This post was last modified: 2020-03-23, 10:03 AM by ceejayemm.)
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


Attached Files
.zip   Trucking Hell Extreme Road Rescue2.zip (Size: 441 bytes / Downloads: 2)
.zip   logs-20200323-0943.zip (Size: 1.53 MB / Downloads: 2)
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#14
2020-03-23, 01:16 PM (This post was last modified: 2020-03-23, 01:17 PM by ceejayemm.)
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


Attached Files
.zip   logs-20200323-1311.zip (Size: 1.65 MB / Downloads: 1)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,174
Threads: 958
Joined: May 2006
#15
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
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#16
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
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,174
Threads: 958
Joined: May 2006
#17
2020-03-23, 02:49 PM
No as I posted an empty event worked for me <Event />

Martin
ceejayemm
Offline

Member

UK
Posts: 150
Threads: 27
Joined: Sep 2019
#18
2020-03-24, 09:13 AM (This post was last modified: 2020-03-24, 09:19 AM by ceejayemm.)
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


Attached Files
.zip   logs-20200324-0857.zip (Size: 1.67 MB / Downloads: 1)
.zip   NPVR_Capture1.zip (Size: 10.36 KB / Downloads: 0)
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,670
Threads: 170
Joined: Jun 2007
#19
2020-03-24, 12:39 PM
(2020-03-24, 09:13 AM)ceejayemm Wrote: <?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
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:

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 ?
Just put them all in one XML file.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,174
Threads: 958
Joined: May 2006
#20
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
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  m3u import unstable tom_tav 7 79 2025-07-12, 07:23 PM
Last Post: sub
  Successful import from MythTV DB to NextPVR Allan 0 340 2025-02-10, 09:51 PM
Last Post: Allan
  Import guide data from HD Homerun tuner jonasx 5 976 2024-10-14, 08:48 PM
Last Post: mvallevand
  NextPVR Deleted All My Important Files on SSD yngsadstn 4 856 2024-09-15, 08:38 AM
Last Post: mvallevand
  Recordings import issue Jaggy 4 682 2024-08-25, 12:03 AM
Last Post: Jaggy
  How to Import Channels? kerryball 1 532 2024-07-09, 04:52 PM
Last Post: sub
  Recording stream following short video clip joshskey 5 890 2023-11-12, 08:37 PM
Last Post: mvallevand
  Issues with MPD Files Paul92 4 1,124 2023-10-01, 06:22 AM
Last Post: mvallevand
  Unable to Import Recordings Markj2 2 965 2023-07-18, 01:32 AM
Last Post: Markj2
  Video quality on clients ninkynonk 7 1,070 2023-07-17, 10:06 PM
Last Post: ninkynonk

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode