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 … 24 25 26 27 28 … 101 Next »
PostProcessing.bat

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

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#11
2023-06-21, 04:24 AM (This post was last modified: 2023-06-21, 04:25 AM by puck64.)
Hi All,
Thanks for your support, GREAT as usual Smile

Here are my PostProcessing.bat  and my Processing.rex.

I supply these 2 batch files to help others who might be able to use them as a guide
Regards,
Mark

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

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#12
2023-06-21, 04:38 AM (This post was last modified: 2023-06-21, 09:27 AM by puck64.)
Hmmmmm ... Don' know where the 2 files went Sad

Copy and past works Smile

BTW Ampersand (&) don't appear to be liked in a call Sad

EG. "The Young & The Restless" Processing.rex just sees "The Young"

Doesn't matter I only used it as a test  Smile


PostProcessing.bat
@ECHO off
rem setlocal EnableDelayedExpansion
Processing.rex %~1 %~2
EXIT

Processing.rex
/* rexx */
trace off

parse arg passed

file = "Processing_Rex.Log"
logfile=.stream~new(file)        /* Create a new stream object        */
logfile~open("both append")      /* Open for read, write with append  */

logfile~lineout('Passed Parms - '||passed)

full_path_fn = substr(passed,1,LASTPOS(" ",passed) - 1)
path        = substr(passed,1,LASTPOS("\",passed) - 1)
fn          = substr(full_path_fn,LASTPOS("\",full_path_fn) + 1)
chan        = substr(passed,LASTPOS(" ",passed) + 1)

logfile~lineout('full_path_fn - '||full_path_fn)
logfile~lineout('path        - '||path)
logfile~lineout('fn          - '||fn)
logfile~lineout('chan        - '||chan)


j      = 0
Weather = 0
w_xml  = ''
out    = ''

Weather = POS("Weather",fn)

Select
    when (Weather = 1) then do
          logfile~lineout('We got weather - start')
          out = path||"\Weather"
          'FFMPEG  -i "'|| full_path_fn ||'" -vcodec libx264 -profile:v high -level 41 -preset fast -tune film -color_primaries 1 -color_trc 1 -colorspace 1 -movflags +faststart -map_metadata -1 -crf 23 -aspect 1.778 -vf "scale=1280:720, format=yuv420p, yadif=0:-1:0, hqdn3d=4.0:3.0:6.0:4.5" -acodec aac -ab 256k -ar 48000 -ac 2 -filter:a volume=3dB -y  "'out||'.mp4'
          logfile~lineout('We got weather - end')
          end
    when (chan = 1  | chan = 15 |,
          chan = 20 | chan = 24 |,
          chan = 30 | chan = 31 |,
          chan = 70 | chan = 74 |,
          chan = 90 | chan = 95) then do
          logfile~lineout('We got HDTV - start')
          'FFMPEG  -i "'|| full_path_fn ||'" -vcodec libx264 -profile:v high -level 41 -preset fast -tune film -color_primaries 1 -color_trc 1 -colorspace 1 -movflags +faststart -map_metadata -1 -crf 21 -aspect 1.778 -vf "scale=1920:1080, format=yuv420p, yadif=0:-1:0, hqdn3d=4.0:3.0:6.0:4.5" -acodec aac -ab 384k -ar 48000 -filter:a volume=3dB -y "'fn||'.mp4'
logfile~lineout('We got HDTV - end')
          end
    otherwise do
          logfile~lineout('We got SDTV - start')
          'FFMPEG  -i "'|| full_path_fn ||'" -vcodec libx264 -profile:v high -level 41 -preset fast -tune film -color_primaries 1 -color_trc 1 -colorspace 1 -movflags +faststart -map_metadata -1 -crf 17 -aspect 1.778 -vf "scale=1280:720, format=yuv420p, yadif=0:-1:0, hqdn3d=4.0:3.0:6.0:4.5" -acodec aac -ab 256k -ar 48000 -ac 2 -filter:a volume=3dB -y "'fn||'.mp4'
          logfile~lineout('We got SDTV - end')
          end
    end /* select */

if SysFileExists(fn||'.mp4')
then do
    SysFileDelete(full_path_fn)
    end

if Weather = 1
then do
    w_xml = substr(full_path_fn,1,LASTPOS(".",full_path_fn))||'xml'
    SysFileDelete(w_xml)
    SysFileDelete(full_path_fn)
    end

logfile~lineout('===================================')
logfile~lineout(' ')
logfile~close

EXIT
Regards,
Mark

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

Administrator

NextPVR HQ, New Zealand
Posts: 106,655
Threads: 767
Joined: Nov 2003
#13
2023-06-21, 04:50 AM
(2023-06-21, 04:38 AM)puck64 Wrote: Hmmmmm ... Don' know where the 2 files went Sad
Attachments need to be zipped.
puck64
Offline

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#14
2023-06-21, 04:59 AM
Thanks Sub,

Zips attached Smile
Regards,
Mark

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

Posting Freak

Ontario Canada
Posts: 52,828
Threads: 954
Joined: May 2006
#15
2023-06-21, 06:59 AM
Perhaps .rex files are not associated as a filetype for the system account or the default folder is not where you think it is.. I suggest you follow my instructions and supply the paths. Even then it is possible that rexx is not installed or configure for all users and you might need to change NextPVR to run with your users name.

Martin
puck64
Offline

Member

Australia
Posts: 130
Threads: 24
Joined: Aug 2015
#16
2023-06-21, 09:26 AM
Hi Martin,

All is working now, except for the ampersand (&), but that will be for another day Smile
Regards,
Mark

(Remember not to forget that which you don' t need to know.)
« 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
  ffmpeg in postprocessing fails on spaces in filename Druhl 3 282 2025-03-29, 06:25 PM
Last Post: mvallevand
  postprocessing tsduck on recordings Druhl 3 271 2025-03-07, 02:24 AM
Last Post: mvallevand
  Help with PostProcessing.bat and Episode names TVHelp 3 333 2024-10-06, 10:16 PM
Last Post: mvallevand
  PostProcessing.bat, Can I do this? three6zerocool 15 1,930 2023-09-26, 11:39 AM
Last Post: three6zerocool
  PostProcessing.bat Boots315 6 1,054 2023-06-26, 01:08 AM
Last Post: Boots315
  Postprocessing Script folder and VideoredoTVsuite4 not working Spotspot 4 1,999 2020-06-24, 11:16 AM
Last Post: MCEabused
  PostProcessing.bat problem 4zm4r3d02 26 7,365 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