NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 140 141 142 143 144 … 433 Next »
Recording naming pattern - channel name?

Recording naming pattern - channel name?
buckeyestargazer
Offline

Junior Member

Posts: 20
Threads: 7
Joined: Nov 2015
#1
2016-03-04, 02:53 PM
I've searched a fair amount and can't figure this one out. Is it possible to include the channel name somewhere in the file naming pattern for recorded shows? Currently when I record an OTA show it is named like "Blindspot_20160303_20002100.ts" and I want to include something like "Blindspot_CBS2-HD_20160303_20002100". I need the channel info somewhere in the name so I can use different comskip ini's for different channels to strip out commercials correctly.
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,667
Threads: 170
Joined: Jun 2007
#2
2016-03-04, 03:54 PM
buckeyestargazer Wrote:I need the channel info somewhere in the name so I can use different comskip ini's for different channels to strip out commercials correctly.

Are you calling Comskip from PostProcessing.bat (or ParallelProcessing.bat)? If so, the 2nd parameter is the channel number of the recording. See this sample PostProcessing.bat for some examples:
Code:
@echo off
Rem PostProcessing.bat
Rem This script will be run automatically by NextPVR when found after a recording is finished

cd C:\Users\Public\NPVR\Scripts\

Rem The script is called with four parameters
Rem %1 is the fully qualified name of the recorded mpeg file.
Rem %2 is the channel number of the recording
echo Postprocessing.bat invoked for recording %1 (OID %3) from channel %2 at %date% %time% >>..\logs\postprocessing.log

Rem The part below can be used to not run Comskip on certain channels, please modify for your conveniance.
Rem The channel numbers that should be skipped are the numbers between the double quotes ("").
Rem You can add "if" lines as much as you want
Rem To disable this behaviour use channel numbers outside the normal range, put a "rem" before the "if" or delete the "if" lines

Rem list of channels to not run comskip on
Rem if "%2" == "27" goto eof
Rem if "%2" == "36" goto eof

Rem If desired, limit the number of simultaneous instances of comskip running concurrently (to limit CPU or disk I/O)

:next
set /a "delay=%2%%60"
echo   ---  sleeping a pseudo-random number of seconds (%delay%) to avoid simultaneous execution >>..\logs\postprocessing.log
timeout %delay%

:check
tasklist | find /c "comskip" > ..\logs\%3.txt
set /p count= <..\logs\%3.txt
if %count% geq 1 (
  echo ...%count% comskips running now, waiting 1 minute >>..\logs\postprocessing.log
  timeout 60
  goto check
)
del ..\logs\%3.txt

rem continuing now

Rem this trick also makes it possible to have dedicated comskip.ini file for certain channels.
Rem if "%2" == "79" goto channel79
Rem if "%2" == "72" goto channel72
Rem if "%2" == "65" goto channel65
Rem use the default comskip.ini for all other channels
goto generic

:channel79
comskip --ini=channel79.ini %1
goto continue
:channel72
comskip --ini=channel72.ini %1
goto continue
:channel65
rem This is an example of how to reuse a previously learned logo to prevent Comskip from learning the wrong logo
comskip --ini=channel65.ini --logo=channel65.logo.txt %1
goto continue

:generic
Rem The actual run of Comskip. Only one parameter, the name of the mpeg file to process.
Rem Comskip will read its settings from the Comskip.ini found in the same directory as Comskip.exe
Rem Both are supposed to be in the GBPVR default program directory. (C:\Program Files\devnz\gbpvr\)
echo Launching comskip on %1 at %date% %time% >>..\logs\postprocessing.log
"c:\program files (x86)\Comskip\comskip.exe" %1
:continue

Rem Once the commercials have been identified you can run comclean to delete the commercials from the recording.
Rem Do this only when you are not using the Skip function in the GBPVR viewer.
Rem To enable comclean remove the word "Rem" from the following line.
rem call comclean %1

:eof
Rem Now run CCextractor to get the subtitles
Rem echo Launching ccextractor at %date% %time% >>.\logs\postprocessing.log
Rem "C:\program files\ccextractor\ccextractorwin.exe" -srt %1 -o "%~dpn1.srt"


REM ok, ready to rename the file... but first check to make sure no one is watching it!
REM try renaming the file to the same name, see if gets an error
:checkopen
ren %1 "%~nx1"
if errorlevel 1 goto waitandcheck
goto rename
:waitandcheck
REM if we got here, the rename failed so wait a minute and try again
sleep 60
goto checkopen

:rename
Rem Run imageGrabLite to get any new image files and rename the recording files
"C:\Program Files (x86)\NPVR\imageGrabLite.exe" --oid %3 --zap2it --rename --nfo

echo PostProcessing.bat for %1 completed at %date% %time% >>..\logs\postprocessing.log
buckeyestargazer
Offline

Junior Member

Posts: 20
Threads: 7
Joined: Nov 2015
#3
2016-03-04, 04:44 PM
Thanks for the reply. I'm actually using MCEBuddy to process the recordings, which uses comskip. Unfortunately I don't have a clue what postprocessing.bat and parallelprocessing.bat mean.

However if the second set of numbers indicates the channel, I think I might be able to set up MCEBuddy to use a certain comskip ini for certain channels. Instead of the actual channel designation (like "CBS2-HD" etc) I can use that second set of numbers to tell MCEBuddy which ini file to use.

But now you've got me curious about using nextpvr and comskip. Can you point me to any resources that explains how to do it? Is it possible to watch a recording at the same time it is being processed by comskip?
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,667
Threads: 170
Joined: Jun 2007
#4
2016-03-04, 06:21 PM
buckeyestargazer Wrote:Unfortunately I don't have a clue what postprocessing.bat and parallelprocessing.bat mean.

ParallelProcessing.bat gets executed by NextPVR when it begins a recording. PostProcessing.bat gets executed after a recording completes. You can put whatever commands you'd like in those files. (Note: I don't believe that any shell files are installed when you do a NextPVR install, so you would need to create one or both of them.) See this page in the wiki for more details.
BrettB
Offline

Posting Freak

Saint Paul, MN, USA
Posts: 2,667
Threads: 170
Joined: Jun 2007
#5
2016-03-04, 06:23 PM
buckeyestargazer Wrote:But now you've got me curious about using nextpvr and comskip. Can you point me to any resources that explains how to do it? Is it possible to watch a recording at the same time it is being processed by comskip?

See this page in the wiki for more information about using Comskip with NextPVR.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording movies / TV to XBMC directory stucture spinnaker 10 3,549 2024-06-03, 03:56 AM
Last Post: Rod Hutchinson
  Not recording errors vidwiz 4 999 2024-04-17, 05:39 PM
Last Post: mvallevand
  Add Series/Episode Info to Recording Metadata andrewj 2 1,076 2023-11-20, 03:42 PM
Last Post: sub
  IR Server Suite Channel Changer BTJustice 26 27,259 2023-01-11, 08:49 PM
Last Post: Frapo
  Device Update - Channel Mapping chezmorris 10 4,698 2022-07-01, 01:59 PM
Last Post: mvallevand
  Recording to a network drive woes. 2leftfeet 12 7,196 2022-04-05, 08:03 PM
Last Post: mvallevand
  device needed for recording David209 2 1,734 2021-04-04, 08:47 AM
Last Post: David209
  PC not going to sleep after recording LeoL 7 3,271 2021-04-01, 07:17 PM
Last Post: Handy.Man
  HDHomerun recording bizzarely not working Jean0987654321 3 2,038 2021-03-27, 03:23 PM
Last Post: Jean0987654321
  IPTV Channel Mapping jrockow 15 7,837 2021-03-07, 09:45 PM
Last Post: jrockow

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

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

Linear Mode
Threaded Mode