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 … 26 27 28 29 30 … 102 Next »
PostProcessing.bat

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

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#1
2023-06-19, 04:30 AM
Hi Sub,

Just a quick question before I start to write an ooRexx script to replace PostProcessing.bat. Big Grin

When PostProcessing.bat is called is it called as "PostProcessing.bat" or " PostProcessing " (no extension) ? Huh 

I understand Rexx better than Windows CMD (bat)
Regards,
Mark

(Remember not to forget that which you don' t need to know.)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2023-06-19, 07:50 AM
It's called PostProcessing.bat on Windows, or PostProcessing.sh in Linux.
puck64
Offline

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#3
2023-06-19, 08:10 AM
Thanks Sub,

So the Windows NextPvr.exe uses "postprocessing.bat"

I sort of worked that out .... I wrote a rexx program (PostProcessing.rex) and renamed the bat file to .batold and had no joy. Sad
I then renamed ....batold to bat and called the rexx program from postprocessing.bat.
All is good till I try and use the channel number, its always 2
The filepath and filename are ok

Have I got the bat file right
here is my post processing.bat

"@ECHO off
setlocal EnableDelayedExpansion
ECHO Start Conversion1 of %~f1 ON %2  >> Conversion_Log.txt
call rexx Processing.rex %1% %2%
"
Regards,
Mark

(Remember not to forget that which you don' t need to know.)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#4
2023-06-19, 08:18 AM
Honestly, I know nothing about rexx. I'd imagine you'd have use a normal PostProcessing.bat, and call your rex program, somewhat like your example above.

I'm pretty sure command line arguments are like %1 and %2, not %2% etc used in your batch file. I'm no batch file expert though, so don't know if these trailing percent characters have some specific meaning. I wondered if that is why you always get "2" though
puck64
Offline

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#5
2023-06-19, 09:31 AM
Thanks again Sub,

I used to be a Mainframe PL/1 Programmer, Rexx is very much the same. So I use Rexx as a scripting language.

The little bit of DOS I know is what I can find on the Internet, and that is sparce. Smile

I will play with the Parms and see what happens Smile
Regards,
Mark

(Remember not to forget that which you don' t need to know.)
Bobins
Offline

Posting Freak

UK (North West)
Posts: 1,228
Threads: 139
Joined: Sep 2004
#6
2023-06-19, 09:41 AM
As far as I can remember (and I'm definitely rusty on command line programming)...

%1% and %2% would represent variables defined with the label 1 or 2. Your batch file doesn't define the variables before using %1% or %2%

Assuming you want to pass arguments 1 & 2 that are given to Postprocessing.bat to your rexx programme, I think you should be using %~1 and %~2

Not 100% sure but you may need to include those in quotes i.e. "%~1" and "~%2" (as I said a bit rusty on this  Wink )

call rexx Processing.rex "~%1" "~ %2"

Ray
NPVR Version= 7.0.2.250621
Intel i5 Ten Core 14400 + 16GB DDR5 in Gigabyte B760 AX Motherboard
Windows 11 Pro 64bit
TBS-6902 dual DVB-S tuner
TBS-6205 quad DVB-T tuner
500Gb System Disk (M2 Nvme SSD)
4Tb Media Store (2 x 2Tb M2 Nvme SSD Spanned)

Raspberry Pi3 B+, Pi4B (OSMC) & Pi5 (XBian) running Kodi v21.1
puck64
Offline

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#7
2023-06-19, 10:59 AM
Hi Bobins,

Well that put me on the right track Smile

All I had to do once I found that both variables came across as 1 was separate them Smile

NOTE:- Say in Rexx is the same as Echo in DOS/Windows Command

My PostUpdate.bat looks like this ....
@ECHO off
rem setlocal EnableDelayedExpansion
rexx Processing.rex %~1 %~2

AND my Rexx Program  (Processing.rex) looks like this ....

/* rexx */
trace off

parse arg passed

say 'passed = '||passed

full_path_fn = substr(passed,1,LASTPOS(" ",passed) - 1)

say 'full_path_fn = '||full_path_fn

j  = LASTPOS(".",full_path_fn)
fn = substr(full_path_fn,1,j - 1)

chan = substr(passed,LASTPOS(" ",passed) + 1)

say 'fn  = '||fn
say 'chan = '||chan
pause

j      = 0
Weather = 0

Weather = POS("Weather",fn)
Regards,
Mark

(Remember not to forget that which you don' t need to know.)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,164
Threads: 958
Joined: May 2006
#8
2023-06-19, 11:08 AM (This post was last modified: 2023-06-19, 11:21 AM by mvallevand.)
If you want to pass through the variables as is from the batch file to your application all you need is %*

Using call is for batch files, embedded spaces on the parameters will be fine and don't forget your paths.

Code:
@echo off
/pathto/rexx.exe  /pathto/Processing.rex %*

If you want it to run in the background or if is a GUI exe read up on the start command.

Martin
puck64
Offline

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#9
2023-06-19, 11:33 AM
Thanks Martin,

Another great Idea to try.

I don't usually use "rexx Processing.rex", its usually "Processing" as rexx is in my path
Regards,
Mark

(Remember not to forget that which you don' t need to know.)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,164
Threads: 958
Joined: May 2006
#10
2023-06-19, 11:38 AM
The environment for the server may be different than then your user environment and it certainly never hurts to fully qualify it.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  ffmpeg in postprocessing fails on spaces in filename Druhl 3 510 2025-03-29, 06:25 PM
Last Post: mvallevand
  postprocessing tsduck on recordings Druhl 3 453 2025-03-07, 02:24 AM
Last Post: mvallevand
  Help with PostProcessing.bat and Episode names TVHelp 3 446 2024-10-06, 10:16 PM
Last Post: mvallevand
  PostProcessing.bat, Can I do this? three6zerocool 15 2,240 2023-09-26, 11:39 AM
Last Post: three6zerocool
  PostProcessing.bat Boots315 6 1,184 2023-06-26, 01:08 AM
Last Post: Boots315
  Postprocessing Script folder and VideoredoTVsuite4 not working Spotspot 4 2,130 2020-06-24, 11:16 AM
Last Post: MCEabused
  PostProcessing.bat problem 4zm4r3d02 26 7,698 2020-02-16, 08:24 PM
Last Post: aderlopas

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

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

Linear Mode
Threaded Mode