NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
« Previous 1 2 3 4 5 6 … 9 Next »
Keeping DB and Post Processed Files in Sync

 
  • 0 Vote(s) - 0 Average
Keeping DB and Post Processed Files in Sync
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#1
2022-06-08, 06:45 PM
Hi. Can anyone clarify how I can keep post-processed files in the recorded DB. I record a TV program and postprocessing.sh is called to remove commercials. This creates a new reduced file size with the extension changed from .ts to .mkv. The comskip is running in a separate docker container (on synology NAS) compared to the npvr v5 docker container, and as part of the process, deletes the original .ts file. 

At this stage, npvr has lost the recording from the DB and I can no longer see any recorded tv programs. If I create a symlink from the new .mkv file to the older .ts file, will that restore the recordings DB.

I did try modifying the XML that was created, by changing the filename, and amended the path to the new .mkv file within the XML, but that did not work. What is the XML file used for anyway?

If anyone knows how to post-process recording into a .mkv file and keep the database synced, then could you please let me know.

Thanks
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,771
Threads: 954
Joined: May 2006
#2
2022-06-08, 07:57 PM (This post was last modified: 2022-06-08, 07:58 PM by mvallevand.)
There is a config.xml setting to not remove a record from the database when the ts file is not found.

<AutoRemoveMissingRecordings>false</AutoRemoveMissingRecordings>

If you don't even want to check also

<CheckForRenamedRecordings>false</CheckForRenamedRecordings>

If you don't delete the record NextPVR "should" load mp4 and mkv it files.

The xml file can be used for importing back into NextPVR. My NextTool utility https://github.com/sub3/NextPVR/wiki/NextTool will use this with your mkv files to recreate a lost database record using the --import option

NextTool with the --file option should also be able to replace the ts entry with the mkv name

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#3
2022-06-08, 08:52 PM
In your PostProcessing script you could also use nscripthelper to tell NextPVR to update the file name of the recording in the database.
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#4
2022-06-08, 11:22 PM (This post was last modified: 2022-06-09, 12:02 AM by ChrisHammond56.)
Thanks chaps. I went with the NextTool idea, and it looks like the --importxml is working. I had said I already modified the recording XML with the updated recording name, and once imported, the recording appears in the GUI.

I do have a few questions. The symlinks..

ln -s runtimes/linux-x64/native/libe_sqlite3.so
ln -s runtimes/linux-x64/native/libSkiaSharp.so

Are they persistent across docker reboots/updates. For example, when the next NextPVR docker update is available and I pull it, will those links be lost and have to be created again.

Same question for installing NextTool. Will that persist on a docker update? I current have it installed into the /app folder (as per synology NAS docker install)

Thanks
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,771
Threads: 954
Joined: May 2006
#5
2022-06-09, 12:10 AM
It will need to be reinstalled, but you could create a script. When NextPVR v6 comes out I will try and make it more persistent, I've down that already for some other tools. Of course keeping binaries on the host kind of defeats the point of running a Docker.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#6
2022-06-09, 09:00 AM
Ok, that's fine. I can create the batch file and update as required.

Just some last questions.

1. With the newly imported XML (pointing to mkv not ts), does that mean checking scheduled recordings against existing recordings will match and hence, not record? As I understand it, the UID is a unique program schedule identifier that NPVR uses to match.
2. This is off-topic but I already have a library of recordings, is there a way (I can write bash/python files) to get the broadcast UID for my existing recordings so that NPVR will exclude them from re-recording based on the scheduler? I already have a partial script that uses the TVDB to lookup the series, but the UID for an episode doesn't seem to match the one generated by NPVR. I use Schedules Direct for EPG if that helps?

Thanks Again.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,771
Threads: 954
Joined: May 2006
#7
2022-06-09, 12:54 PM
1. NextTool imports the unique_id field from the XML so they won't be re-recorded but using --file or NScriptHelper to update the database works too.

2. The SD unique id is the same as the Gracnote or TMSID from zap2it.com (sometimes the TVDB API did return it sometimes but I stopped using it) and you can use that. I don't support the unique field from NFO files but I could add that. I do have some pyhton scripts that help but honestly it takes more time to lookup it up and enter it then to delete them as they get scheduled. There order is a bit arbitrary and not entirely sequential. Also shows can have different IDs for different years.

Martin
ChrisHammond56
Offline

Junior Member

Posts: 39
Threads: 5
Joined: Mar 2015
#8
2022-06-09, 11:17 PM
Thanks Martin. I am OK with (1)

2. The SD unique id is the same as the Gracnote or TMSID from zap2it.com (sometimes the TVDB API did return it sometimes but I stopped using it) and you can use that.
- I agree. TVDB doesn't seem to provide the same detail as TMSID, particularly for the UID. I have attempted to use Zap2It.com but the site seems to be permanently down (from the UK at least). Do you find that issue?

I don't support the unique field from NFO files but I could add that.
- Would be beneficial. I was thinking of writing a script that converted an NFO into an XML for NPVR Import uses for my current recordings, but the UID is the blocker.

I do have some pyhton scripts that help but honestly it takes more time to lookup it up and enter it then to delete them as they get scheduled.
- I don't really like this idea. I would have to scan my series recordings for each episode to see if I have it (tedious), and then keep removing the scheduled recording each and every time the episode was broadcast. The flip would be to let the recording happen, and then I could import the XML (with UID) into the DB and then, hopefully, the re-recording would stop.

There order is a bit arbitrary and not entirely sequential. Also shows can have different IDs for different years.
- I am OK with different IDs for different years

So, I am a bit stuck at present. Creating an XML for existing recordings is easy, but the issue is the UID for the episode. I don't want to re-record all my shows, but I cannot see any way to obtain a recording UID for past broadcasts. Do you know of any?

Thanks
Chris
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,666
Threads: 170
Joined: Jun 2007
#9
2022-06-09, 11:28 PM
(2022-06-09, 11:17 PM)ChrisHammond56 Wrote: - I don't really like this idea. I would have to scan my series recordings for each episode to see if I have it (tedious), and then keep removing the scheduled recording each and every time the episode was broadcast. The flip would be to let the recording happen, and then I could import the XML (with UID) into the DB and then, hopefully, the re-recording would stop.

Actually, you would only need to remove the scheduled recording once for each episode (either before or after it records) since that will put its unique ID into the "recently deleted" table and prevent the recurring recording from trying to schedule it again.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,771
Threads: 954
Joined: May 2006
#10
2022-06-09, 11:38 PM (This post was last modified: 2022-06-09, 11:40 PM by mvallevand.)
I have never had and issue with https://tvlistings.zap2it.com but I am in Canada.  Does this work for you to get the series ID

https://tvlistings.zap2it.com/api/showMo...ryCode=USA

Deleted scheduled recordings are counted as duplicates so It is a one time delete per episode as long are you set your delete history longer than the config.xml default.  This is primarily for collectors too since using the new flag is the typical way to record series.  Searching an id and entering it in an NFO file will be harder.

I will update NextTool to support the unique field.

How many imported recordings are you talking?

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Program Files jrockow 6 891 2024-04-04, 08:22 PM
Last Post: jrockow
  Where to set up post processing? daphatty 1 1,076 2020-07-23, 09:57 PM
Last Post: mvallevand
  Recording zero size files vintdiesel 8 3,211 2019-07-02, 09:03 PM
Last Post: vintdiesel

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

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

Linear Mode
Threaded Mode