NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 3 4 5 6 7 56 Next »
Yet Another RenameRecordings Batch files

 
  • 0 Vote(s) - 0 Average
Yet Another RenameRecordings Batch files
SANGER_A2
Offline

Member

Posts: 51
Threads: 8
Joined: Nov 2007
#1
2011-07-16, 12:32 PM (This post was last modified: 2011-11-09, 08:14 PM by SANGER_A2.)
I've hosted a zip file of the batch files I use in my NextPVR installation on my website here. Hopefully they will be useful to someone either to steal bits of code from or to use in full. If you want to use one or more of them, feel free. Just please read them first to make sure they do what you want. If you find them useful clicking on an ad on my site or using the site search will get me a fraction of a cent from Google! Smile

Most of these should be extracted into the Next PVR scripts folder which varies between operating systems, but in WIndows XP (32 bit) is "C:\Documents and Settings\All Users\Application Data\NPVR\Scripts". The two in the folder "Put _These_In_Your_Recordings_Folder_Root" should be obvious where to put! :-

Start_check_InProgress.bat*- this is run by the task scheduler at about 22:00 each night. It runs check_InProgress.bat
check_InProgress.bat*- this checks to make sure that there are no recordings being made and that handbrake is not running, then it shuts down
StartupUpdateEPG.bat*- this runs every time my computer is turned of and updates the EPG
UpdateEPG.bat*- this is run by NextPVR before it updats the EPG and it runs XMLTV_console to update the XML file
UPDATED: RenameRecording.bat*- this is run by PostProcessing.bat and is used to rename recordings based on the NextPVR database and update the database to point to the new file if they have a title & a subtitle. If they don't, it leaves them alone.
UPDATED: PostProcessing.bat*- after a recording has been made, NextPVR runs this. It makes sure handbrake is not running and encodes the ts file to an mp4. It also deletes the original ts file if the encode worked. It then runs the automatic RenameRecordings.bat.
NEW: ManualRenameRecording.bat - I'm really pleased with this. Click here for full details.
NEW: ProcessAll.bat - This searches for all ts files within the folder (and subfolders) it is in and runs the PostProcessing.bat on them. I have it run at startup to catch any encodes missed out.
NEW: Start_Process_All.bat - this just waits for 60 seconds and then runs ProcessAll with low priority & hidden etc. I put a shortcut to this file into my startup folder.
NEW: restart_service.bat - I was finding that somethimes NextPVR would get in a loop or crash & the computer wouldn't turn off as it should or record new programs. All this does is stop & start the recording service. I use a scheduled task to run it at 4am every day. I don't record stuff at this time and the computer should be off by now anyway

You will also need the NScripthelper.exe file in your "C:\Program files\NextPVR\" folder. It's also on my site as well as elsewhere on this forum. Sub gave it to me and saved me hours of messing around with VB script. You can see his listing of the commands here. So thanks yet again to Sub, awesome dev!

You will also need to download PSTools if you want to be able to shutdown your computer as I do and tell the batch file where you extracted them to. I also use PRCView to check if Handbrake is running and you would need to download this and extract somewhere if you want the batch file to work.

Any questions feel free to post here...

Hopefully they are bug free now, but if not please let me know!
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#2
2011-07-16, 05:03 PM
wouldn't this sort of thing more commonly go in Community Announcements?
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#3
2011-07-16, 05:08 PM
Yep.

BTW, those links above dont seem to work.
SANGER_A2
Offline

Member

Posts: 51
Threads: 8
Joined: Nov 2007
#4
2011-07-16, 05:39 PM
Thanks guys. I've updated the links now and they work for me. When I made the page I missed out the t in nextpvr! Smile
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#5
2011-07-16, 06:56 PM
just for reference, the NScriptHelper is now part of the NextPVR installation as of 2.1.5. I've also linked sub's command reference in the Sticky.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
SANGER_A2
Offline

Member

Posts: 51
Threads: 8
Joined: Nov 2007
#6
2011-07-16, 07:24 PM
johnsonx42 Wrote:just for reference, the NScriptHelper is now part of the NextPVR installation as of 2.1.5. I've also linked sub's command reference in the Sticky.
Nice. Thanks. It's a really useful app. Some reference to using the "for..." command I used in my batch file to get the output into a variable might also be a good idea to add to the wiki.
JimF
Offline

Member

Posts: 217
Threads: 19
Joined: Oct 2005
#7
2011-07-17, 01:39 PM
I very much appreciate the RenameRecording.bat, which is just what I need. But I have not yet been able to get it to fly from PostProcessing.bat. Since I am running Win7 64-bit, I changed the SET commands to:

set DBPath=C:\Users\Public\NPVR\npvr.db3
set NSHelper="C:\Program Files (x86)\NPVR\NScriptHelper.exe"
set subtitle=
set title=

Is there anything else that I am missing?
HDHomeRun Prime, Win7 64-bit, NPVR 3.4.8
SANGER_A2
Offline

Member

Posts: 51
Threads: 8
Joined: Nov 2007
#8
2011-07-17, 03:23 PM
JimF Wrote:I very much appreciate the RenameRecording.bat, which is just what I need. But I have not yet been able to get it to fly from PostProcessing.bat. Since I am running Win7 64-bit, I changed the SET commands to:

set DBPath=C:\Users\Public\NPVR\npvr.db3
set NSHelper="C:\Program Files (x86)\NPVR\NScriptHelper.exe"
set subtitle=
set title=

Is there anything else that I am missing?
How are you calling it from postprocessing.bat? Are you using the "start" command or what? Also, have you tried running it on an encoded file and making sure it works?

I don't use the renamerecording batch any more. I have the code it uses inside my postprocessing.bat. You may wish to consider doing that instead.
JimF
Offline

Member

Posts: 217
Threads: 19
Joined: Oct 2005
#9
2011-07-17, 06:28 PM (This post was last modified: 2011-07-17, 06:40 PM by JimF.)
No luck so far. I tried using the "start" command, and also from within postprocessing.bat with nothing else in it, only the changes to the SET commands above.

Do I need to pass some parameter to it? I feel like I am missing something, but would try it on an encoded file if you can give me some idea how to do it.

By the way, I am using Schedules Direct for the program guide, and recording with HDHomeRun. Renaming worked fine with that setup and GB-PVR. And the postprocessing.bat is running according to the log; also, postprocessing.bat works fine to run comskip, though I removed that for this test.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#10
2011-07-17, 06:45 PM
perhaps if you post your postprocessing.bat we could see where things are going wrong?
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Generate NextPVR import XML from recorded TV .wtv files from WMC Jimixter 5 5,404 2021-05-06, 03:34 PM
Last Post: a1blues
  Generate missing thumbnails for video files imported into NextPVR Jimixter 0 2,616 2019-12-16, 07:28 PM
Last Post: Jimixter
  Files plugin tmrt 13 7,423 2014-01-09, 11:16 PM
Last Post: mvallevand
  Manual RenameRecording Batch File SANGER_A2 0 2,193 2011-10-08, 11:11 AM
Last Post: SANGER_A2
  NPVR Rename Recordings Batch File raceviper13 8 8,012 2011-04-23, 11:52 PM
Last Post: raceviper13
  Search DB batch util pBS 4 2,514 2009-09-03, 10:01 AM
Last Post: pBS
  Updated BDA scan files MixMan 1 2,208 2009-08-12, 08:19 PM
Last Post: martint123
  PostProcessing Dvr-MS files to remove comercial breaks crlorentzen 0 1,568 2008-09-13, 08:38 PM
Last Post: crlorentzen
  Batch to surely Hibernate & Update EPG dfdario 1 1,765 2008-03-09, 02:32 PM
Last Post: cakes
  NEW PLUG-IN: Files McBainUK 13 4,091 2007-06-05, 06:47 PM
Last Post: cybershaman

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

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

Linear Mode
Threaded Mode