NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 91 92 93 94 95 … 102 Next »
PostProcessing.bat problem

 
  • 0 Vote(s) - 0 Average
PostProcessing.bat problem
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,668
Threads: 170
Joined: Jun 2007
#21
2020-02-16, 02:08 PM
(2020-02-16, 05:47 AM)aderlopas Wrote: Or I might try to create mine to update db recordings table via command line sqllite3...
You would be better off using NScriptHelper. As I recall there is an option for renaming the file in the database. I'm not sure it works with v5's NScriptHelper yet though. Sub will probably need to verify that.
aderlopas
Offline

Senior Member

Posts: 313
Threads: 40
Joined: Dec 2013
#22
2020-02-16, 05:07 PM
(2020-02-16, 02:08 PM)BrettB Wrote:
(2020-02-16, 05:47 AM)aderlopas Wrote: Or I might try to create mine to update db recordings table via command line sqllite3...
You would be better off using NScriptHelper. As I recall there is an option for renaming the file in the database. I'm not sure it works with v5's NScriptHelper yet though. Sub will probably need to verify that.

Thanks, problem is I have no clue how NScriptHelper works...
I managed to found the recorded file table (scheduled_recording), but is the primary key (oid) being passed to the %1 parameter so that we can locate the record and update the filename once file has been moved? Can you help us @sub with a few internal information ?  Smile
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#23
2020-02-16, 05:20 PM
(2020-02-16, 05:07 PM)aderlopas Wrote:
(2020-02-16, 02:08 PM)BrettB Wrote:
(2020-02-16, 05:47 AM)aderlopas Wrote: Or I might try to create mine to update db recordings table via command line sqllite3...
You would be better off using NScriptHelper. As I recall there is an option for renaming the file in the database. I'm not sure it works with v5's NScriptHelper yet though. Sub will probably need to verify that.

Thanks, problem is I have no clue how NScriptHelper works...
Unfortunate NScriptHelper in v4 vs v5 have wildly different functionality, with only a little overlap. This is mostly due to the way v5 exposes NextPVR's http api to the user, rather than just set of small set of specific things that v4 did.

v4 had a rename. v5 doesn't at this stage (since the api doesn't have this). I'll look to add it though.

Quote:I managed to found the recorded file table (scheduled_recording), but is the primary key (oid) being passed to the %1 parameter so that we can locate the record and update the filename once file has been moved? Can you help us @sub with a few internal information ?  Smile
Parameters passed in to PostProcessing.bat, in this order, are:

recording filename,
channel number,
recording oid,
capture source oid,
show title
aderlopas
Offline

Senior Member

Posts: 313
Threads: 40
Joined: Dec 2013
#24
2020-02-16, 05:22 PM
(2020-02-16, 05:20 PM)sub Wrote:
(2020-02-16, 05:07 PM)aderlopas Wrote:
(2020-02-16, 02:08 PM)BrettB Wrote:
(2020-02-16, 05:47 AM)aderlopas Wrote: Or I might try to create mine to update db recordings table via command line sqllite3...
You would be better off using NScriptHelper. As I recall there is an option for renaming the file in the database. I'm not sure it works with v5's NScriptHelper yet though. Sub will probably need to verify that.

Thanks, problem is I have no clue how NScriptHelper works...
Unfortunate NScriptHelper in v4 vs v5 have wildly different functionality, with only a little overlap. This is mostly due to the way v5 exposes NextPVR's http api to the user, rather than just set of small set of specific things that v4 did.

v4 had a rename. v5 doesn't at this stage (since the api doesn't have this). I'll look to add it though.

Quote:I managed to found the recorded file table (scheduled_recording), but is the primary key (oid) being passed to the %1 parameter so that we can locate the record and update the filename once file has been moved? Can you help us @sub with a few internal information ?  Smile
Parameters passed in to PostProcessing.bat, in this order, are:

recording filename,
channel number,
recording oid,
capture source oid,
show title

Many thanks sub, is there a delimiter used? If so which one?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#25
2020-02-16, 05:26 PM
It quotes the parameter passed into the script, so that they end up as %1, %2, %3,%4 and %5
aderlopas
Offline

Senior Member

Posts: 313
Threads: 40
Joined: Dec 2013
#26
2020-02-16, 05:28 PM
(2020-02-16, 05:26 PM)sub Wrote: It quotes the parameter passed into the script, so that they end up as %1, %2, %3,%4 and %5

Oh perfect, so we don't have to split the environment variable.

I'll try and build a bat file, once I have made it working, I'll post it here...
aderlopas
Offline

Senior Member

Posts: 313
Threads: 40
Joined: Dec 2013
#27
2020-02-16, 08:24 PM (This post was last modified: 2020-02-22, 07:32 PM by aderlopas.)
Finished it and it is working. I placed sqlite3.exe tool under the same directory as npvr.db3. Note I also used xcopy /J as it copies unbuffered and works better with large files.
I also just change drive (send them to my sdcard) and keep exactly the same directory structure.
Here are the bat file contents:

============= start postprocessing.bat ====================
@ECHO OFF
REM %1 = recording filename
REM %2 = channel number
REM %3 = recording oid
REM %4 = capture source oid
REM %5 = show title
@ECHO ON
ECHO Finished recording %1 at %time% on %date% >> "C:\Users\Public\NPVR-data\logs\recordings.log"
xcopy "%~d1%~p1*.*" "D:%~p1" /e /f /J /Y >> "C:\Users\Public\NPVR-data\logs\recordings.log"
call "C:\Users\Public\NPVR-data\sqlite3.exe" "C:\Users\Public\NPVR-data\npvr.db3" "update `SCHEDULED_RECORDING` set `filename`='D:%~p1%~n1%~x1' where `oid`=%3;" ".exit" >> "C:\Users\Public\NPVR-data\logs\recordings.log"
rmdir "%~d1%~p1" /s /q
ECHO Post Processing Completed at %time% on %date% >> "C:\Users\Public\NPVR-data\logs\recordings.log"
============= end postprocessing.bat ====================
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issues watching one channel, new problem Ricknextpvr 21 396 2025-07-04, 02:32 AM
Last Post: mvallevand
  "Recording interrupted" problem started happening sharkbite 8 644 2025-06-02, 08:08 AM
Last Post: sharkbite
  Problem with encrypted channels achim_m 0 190 2025-05-03, 03:34 PM
Last Post: achim_m
  ffmpeg in postprocessing fails on spaces in filename Druhl 3 483 2025-03-29, 06:25 PM
Last Post: mvallevand
  postprocessing tsduck on recordings Druhl 3 441 2025-03-07, 02:24 AM
Last Post: mvallevand
  Transcoding Problem Version: 7.0.1.241229 Metroid 1 362 2025-01-25, 12:44 AM
Last Post: mvallevand
  Strange blastcfg.exe & blast.exe repeated digits problem fla 4 405 2025-01-18, 08:02 PM
Last Post: fla
  Audio connection problem at TV jamesefrye 1 295 2025-01-18, 02:07 AM
Last Post: sub
  Recording Auto Transcode Problem and HDHR Viewing Problems in v7 Metroid 8 1,215 2024-12-06, 04:42 AM
Last Post: mvallevand
  Problem losing thumbnail display. Bobins 4 424 2024-11-09, 12:07 PM
Last Post: Bobins

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

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

Linear Mode
Threaded Mode