NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) v
« Previous 1 … 4 5 6 7 8 … 20 Next »
Comskip Transcode NZ Freeview Help required

 
  • 0 Vote(s) - 0 Average
Comskip Transcode NZ Freeview Help required
Waynesm
Offline

Member

Posts: 107
Threads: 27
Joined: Mar 2009
#1
2016-07-13, 01:54 AM (This post was last modified: 2016-07-21, 12:14 AM by Waynesm.)
As
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#2
2016-07-14, 01:29 AM
Not quite understanding exactly what the question is, or what you are trying to do, however, you have problems in the batch file with the way it's coded.

The tag :eof has special meaning in a batch file, you should change all references of :eof to something else, maybe :eoj or something.

I think you are saying:
  • Channels 1-12 - run comskip. Use specific comskip.ini that's tuned to that specific channel.
  • Channels 5-12 - re-encode with NPVR Encoder.
  • All other - run comskip, do not re-encode, use generic comskip.ini file

Is that what you are describing?
Waynesm
Offline

Member

Posts: 107
Threads: 27
Joined: Mar 2009
#3
2016-07-14, 06:37 AM
Thank you.
I have replaced :eof with goto :eoj and all seems to be working.
Yes I only record on channels 1 to 4 fast turnaround programs eg news docos and specials.
Use the Plus 1 versions of those channels for other programs.
My main question was would a For next type routine be any better for channel selection and comskip ini assignment be any better? or even worthwhile.
Thanks again
Waynesm
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#4
2016-07-15, 01:36 AM
I'm glad the :eof changes helped.

Couple notes:
I don't think a for loop helps in this situation, you are not trying to iterate over a collection of items, you have a single channel you want to perform a specific set of steps on.
This process may work better in PostProcessing.bat, unless you want to leverage the comskip files while watching (semi)-live TV

I've tried to simplify the logic in the following file. I have not tested this, so it may not work exactly right the first time, but it may give you an idea how to streamline the batch file:
Code:
@Echo off
GoTo :BEGIN
=================================================================================================
ParallelProcessing.bat
    Run as soon as a recording begins. Commonly used for adding commercial skipping functionality
    (comskip) or transcoding.
    
-------------------------------------------------------------------------------------------------
Arguments:
1.filename        - the full path and file name of the recording file.
2.channelNumber   - the channel number it was recorded from.
3.oid             - unique identifier to the scheduled_recordings table, applicable even if
                    filename (%1) changes
4.capture Oid     - unique identifier to the device used for recording
5.recording title - the title of the recording

-------------------------------------------------------------------------------------------------
Modification History
Date    By         Description
------ ---------- -------------------------------------------------------------------------------
103015 JavaWiz    Initial Template
071316 Waynesm Added code from various posts including NPVR Encoder by Revenz
=================================================================================================
:BEGIN
    SETLOCAL
    Set SCRIPTNAME=%0
    Set BASEDIR=c:\Users\Public\NPVR
    Set LOGFILE=%BASEDIR%\Logs\BatchProcessing.log
    Set COMSKIP_DIR=c:\Comskip
    
    Set FILENAME=%1
    Set CH_NUM=%2
    Set OID=%3
    Set DEV_OID=%4
    Set REC_TITLE=%5
    
    Call :LOGMSG  Recording started - filename: %FILENAME%  ChannelNUM: %CH_NUM%  OID: %OID%  DeviceOID: %DEV_OID%  Title: %REC_TITLE%
    
    REM If channel logo file exists, create parameter for comskip call
    If EXIST %COMSKIP_DIR%\Channel%CH_NUM%.logo.txt (
        Set CHNL_LOGO_PARM=--logo=Channel%CH_NUM%.logo.txt
    ) Else (
        Set CHNL_LOGO_PARM=
    )

    REM Set comskip.ini file`
    If EXIST %COMSKIP_DIR%\Channel%CH_NUM%.ini (
        Set COMSKIP_INIPARM=--ini=Channel%CH_NUM%.ini
    ) Else (
        Set COMSKIP_INIPARM=
    )

:COMSKIP
    Call :LOGMSG  BEGIN Comskip processing for %FILENAME%
    cd /d %COMSKIP_DIR%
    Comskip %COMSKIP_INIPARM% %CHNL_LOGO_PARM%
    Call :LOGMSG  END   Comskip processing for %FILENAME%
    
        REM Only re-encode channels 5-12
    If %CH_NUM% LEQ 4 GoTo  :ENDJOB
    If %CH_NUM% LEQ 13 GoTo :CHK_HANDBRAKE
    GoTo :ENDJOB
    
:CHK_HANDBRAKE
    REM Loop until no HandBrake processes are running
    tasklist | find /c "HandbrakeCLI" > %OID%.txt
    set /p count= <%OID%.txt
    if %count% geq 1 (
      echo ...%count% HandbrakeCLI running now, waiting 15 secs >>processing.log
      sleep 15
      goto :CHK_HANDBRAKE
    )
    del %OID%.txt

:ENCODE    
    cd /d "C:\Users\Public\NPVR\Scripts
    Call :LOGMSG  BEGIN NextPvrEncoder processing for %FILENAME%
    NextPvrEncoder\NextPvrEncoder %FILENAME%
    Call :LOGMSG  END   NextPvrEncoder processing for %FILENAME%

    GoTo :ENDJOB

--------------------------------------------------------------    
:LOGMSG
    echo %*
    echo %date:~4% %time% [%SCRIPTNAME%] %* >> %LOGFILE%
    Goto :EOF
    
--------------------------------------------------------------    
:ENDJOB
    Call :LOGMSG  Recording Ended - filename: %FILENAME%  
    
    REM taskkill /F /IM Comskip.exe
    Exit
Waynesm
Offline

Member

Posts: 107
Threads: 27
Joined: Mar 2009
#5
2016-07-15, 03:26 AM
Hi,
Many thanks for this.
Will try out ASAP
Cheers
Waynesm
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  comskip parallel processing not updating skips in Kodi Deihmos 1 351 2025-04-13, 04:13 AM
Last Post: mvallevand
  Comskip + NextEnd VCR58 12 2,456 2023-06-30, 02:26 PM
Last Post: mvallevand
Lightbulb How to get Comskip working on Linux wmarler 12 11,406 2022-03-04, 01:19 PM
Last Post: thool
  comskip - parallel proc - Invalid frame dimensions 2leftfeet 7 2,591 2021-05-02, 01:35 AM
Last Post: EdwardWelch
  Comskip problem RTKAT 4 3,962 2018-08-26, 09:12 PM
Last Post: RTKAT
  Comskip, NextPVR and Plex buckeyestargazer 4 7,898 2017-06-16, 07:58 PM
Last Post: scJohn
  comskip postprocessing cllgnc89 7 5,369 2016-01-18, 04:27 AM
Last Post: cllgnc89
  comskip failures ydekmekji 7 4,380 2015-11-22, 01:21 AM
Last Post: ACTCMS
  comskip not running on certain files tron999 5 3,242 2014-10-11, 01:50 AM
Last Post: tron999
  what comskip file does npvr use? jam_zhou 1 1,876 2014-08-19, 06:15 PM
Last Post: mulletback

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

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

Linear Mode
Threaded Mode