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 … 406 407 408 409 410 … 433 Next »
comskip is skipping comskipping

comskip is skipping comskipping
soccerdad
Offline

Posting Freak

Posts: 1,198
Threads: 137
Joined: Feb 2005
#11
2010-06-19, 12:06 PM
pBS Wrote:use this: comskip "%~1"

I tried this and get the same results as my screen shot. It stops at the break after Recordings
[SIZE="1"] Server= Asus M3A78-EM, 4 gigs ram, AMD A64 5200+, Windows 7 home premium 32, 1 HVR-1800, 1 PCH A-100, Test Rig, Biostar 880g+, AMD X2 260, 4 gb ram, Windows, 7 Home Premium 32, 1 DCR-2650 cablecard tuner [/SIZE]
[SIZE="1"][/SIZE]
ElihuRozen
Offline

Senior Member

Massachusetts, USA
Posts: 514
Threads: 51
Joined: Apr 2006
#12
2010-06-19, 04:31 PM
Use the "%~1" like pBS said, but call it with quotes around the full file name, like this:
PostProcessing.bat "D:\Recordings D\Maury\Maury_20100618_16001700.ts" 7

Running a command with spaces in a parameter from a command line leads to different behavior than running it from a program where you can logically separate the parameters. The program can specify each parameter as a separate item; that way, it doesn't need the quotes around the file name. The text from "D:\Rec" all the way to "700.ts" is assigned as parameter 1. On the other hand, on the command line, the processor doesn't know to put all that text together unless you add the quotes.
soccerdad
Offline

Posting Freak

Posts: 1,198
Threads: 137
Joined: Feb 2005
#13
2010-06-19, 05:21 PM
I think I am starting to understand the quotes, but I don't (don't think I) have any control of putting the quotes on the file name since this is something that sub has the program create. There might be a way to write a command that first looks at the number at the end and forces it to be 4 digits, then edits off the 4 digits and runs comskip but that is way past my abilities. I read all the great information sites from reddwarf, but have not hacked out one that works. Believe me I have tried over 20 batch files, looking for patterns without success. The closest to working was the one by speising but it only works for single digit channels.
[SIZE="1"] Server= Asus M3A78-EM, 4 gigs ram, AMD A64 5200+, Windows 7 home premium 32, 1 HVR-1800, 1 PCH A-100, Test Rig, Biostar 880g+, AMD X2 260, 4 gb ram, Windows, 7 Home Premium 32, 1 DCR-2650 cablecard tuner [/SIZE]
[SIZE="1"][/SIZE]
soccerdad
Offline

Posting Freak

Posts: 1,198
Threads: 137
Joined: Feb 2005
#14
2010-06-19, 05:28 PM
Well I came up with a brute force work around. I let it try 4 different times and let the ones that don't work just die. Ugly, but it seems to work for all 4 channel number lengths. This works starting it from a comand line with the string sub sends, I think it will also work automagically at the end of the program. I will test it.

c:
cd \Users\Public\NPVR\
SET FILE=%*
SET FILE=%FILE:~0,-2%
comskip.exe "%FILE%"
SET FILE=%*
SET FILE=%FILE:~0,-3%
comskip.exe "%FILE%"
SET FILE=%*
SET FILE=%FILE:~0,-4%
comskip.exe "%FILE%"
SET FILE=%*
SET FILE=%FILE:~0,-5%
comskip.exe "%FILE%"
[SIZE="1"] Server= Asus M3A78-EM, 4 gigs ram, AMD A64 5200+, Windows 7 home premium 32, 1 HVR-1800, 1 PCH A-100, Test Rig, Biostar 880g+, AMD X2 260, 4 gb ram, Windows, 7 Home Premium 32, 1 DCR-2650 cablecard tuner [/SIZE]
[SIZE="1"][/SIZE]
GSpanFan
Offline

Junior Member

Posts: 47
Threads: 10
Joined: Apr 2005
#15
2010-06-19, 05:30 PM (This post was last modified: 2010-06-19, 05:35 PM by GSpanFan.)
I think the issue here is that when soccerdad is testing his code he is doing it from the command line and could enter the quotes himself. However, it appears to me that NPVR calls the PostProcessing.bat without quotes like this:

PostProcessing.bat D:\Recordings D\Maury\Maury_20100618_16001700.ts 7


I say this because my postprocessing.log file is full of remarks like:

Postprocessing.bat invoked on G:\TV recorded from channel Recordings\The

for the post processing of a file a "G:\TV Recordings\The Late Show\..."


I think that unless there is some way (e.g. something in the config.xml file) to change the way NPVR passes variables to post processing, it is then necessary to find a way in the postprocessing.bat to identify the file and channel variables.
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#16
2010-06-19, 05:48 PM
GSpanFan Wrote:I think the issue here is that when soccerdad is testing his code he is doing it from the command line and could enter the quotes himself. However, it appears to me that NPVR calls the PostProcessing.bat without quotes like this:

PostProcessing.bat D:\Recordings D\Maury\Maury_20100618_16001700.ts 7

I say this because my postprocessing.log file is full of remarks like:

Postprocessing.bat invoked on G:\TV recorded from channel Recordings\The

for the post processing of a file a "G:\TV Recordings\The Late Show\..."


I think that unless there is some way (e.g. something in the config.xml file) to change the way NPVR passes variables to post processing, it is then necessary to find a way in the postprocessing.bat to identify the file and channel variables.


Exactly.

@Sub: I'v done a bit of investigating, there's absolutly nothing wrong with Comskip or Postprocessing.bat, the problem is that Nrecord does not put the filename in quotes when it calls Postprocessing.bat. That way %1 ends up beeing only the part of the recorded filename up to the first space.

"I'd rather have a bottle in front of me than a frontal lobotomy"
soccerdad
Offline

Posting Freak

Posts: 1,198
Threads: 137
Joined: Feb 2005
#17
2010-06-19, 05:50 PM
Well it is ugly but my bat file posted above does work just fine! I just tested it on a 2 digit channel and it worked automatically. So I am good to go from the processing side.

Thanks to all for your input. There are obviously lots of ways to skin a cat (and a great pvr program Wink )
[SIZE="1"] Server= Asus M3A78-EM, 4 gigs ram, AMD A64 5200+, Windows 7 home premium 32, 1 HVR-1800, 1 PCH A-100, Test Rig, Biostar 880g+, AMD X2 260, 4 gb ram, Windows, 7 Home Premium 32, 1 DCR-2650 cablecard tuner [/SIZE]
[SIZE="1"][/SIZE]
ElihuRozen
Offline

Senior Member

Massachusetts, USA
Posts: 514
Threads: 51
Joined: Apr 2006
#18
2010-06-20, 05:58 PM
Sub will be releasing a new version that fixes this in a day or so, but I came up with another solution in the interim if anybody wants it. Basically, I wrote an AutoIt script that uses regular expressions to join all the pieces of the first argument together & then calls PostProcessing with the fixed first argument in quotes and the channel as the second argument. You could add a few lines at the begining of PostProcessing.bat to check for more than 2 arguments & call my script if there are more than 2. If there are not more than 2 arguments, just continue and know that argument 1 is the file and argument 2 is the channel.

I attached a zip file with the compiled script. (Note if you want to modify the script, it will not work unless it is compiled into an executable like this.) This is what the script looks like:
Code:
#NoTrayIcon

If ($CmdLine[0] < 2) Then
    Exit
EndIf
$array = StringRegExp($CmdLineRaw, "(.*) ([0-9]*)", 1)
ShellExecute("PostProcessing.bat",  '"' & $array[0] & '" ' & $array[1])

This is an example of the start of PostProcessing.bat:
Code:
@echo off
if .%3.==.. goto CorrectArgs
fixArgs %*
exit /b
:CorrectArgs
echo %1 > test.log
When sub fixes this problem, this PostProcesing will still work. This assumes that the compiled script is called fixArgs.exe & the script assumes that the batch file is PostProcessing.bat. The trick is that PostProcessing.bat exits after calling the script & the script executes a new instance of it.

Another alternative instead of the script above would be to loop in the batch file putting the pieces of the file name together until you run out of arguments. It would look like this:
Code:
@echo off

setlocal

set FILENAME=%1

shift
:here
if .%2.==.. goto gotIt
set FILENAME=%FILENAME% %1
shift
goto here

:gotIt
set CHANNEL=%1

echo %FILENAME%
Note that you would have to use %FILENAME% in the rest of the batch file for the file name and that it would not have quotes around it.
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#19
2010-09-25, 04:40 AM (This post was last modified: 2010-09-25, 07:24 AM by jksmurf.)
ElihuRozen Wrote:Sub will be releasing a new version that fixes this in a day or so .... .... When sub fixes this problem, this PostProcesing will still work....

Does anyone know if this was fixed in the current version, because it looks like I have the same issue as the OP. When I take the debug error and run from the command line it works, but doesn't do so automatically :confused:

k.

Code:
2010-09-25 11:48:31.269    [DEBUG][6]    About to switch AnalogRecorder to target:
D:\GBPVRVids\La Liga Goals(1145)\La Liga Goals(1145)_20100925_11301200.ts
2010-09-25 11:48:31.270    [DEBUG][6]    Temp at 25/09/2010 11:48:41 a.m.
2010-09-25 11:48:31.270    [DEBUG][6]    Started recording (68:D:\GBPVRVids\La Liga Goals(1145)\La Liga Goals(1145)_20100925_11301200.ts)
2010-09-25 11:48:31.394    [DEBUG][6]    No C:\Users\Public\NPVR\Scripts\ParallelProcessing.bat
2010-09-25 11:52:00.251    [DEBUG][6]    Stopping recording (67). Past end time of recording.
2010-09-25 11:52:00.252    [INFO][6]    DigitalRecorder.StopStream() handle: 1
2010-09-25 11:52:00.253    [INFO][6]    No more streams active. Stopping device.
2010-09-25 11:52:00.254    [DEBUG][6]    Graph stopping...
2010-09-25 11:52:00.850    [DEBUG][6]    Graph reports state 'Stopped'
2010-09-25 11:52:00.850    [DEBUG][6]    Graph stopped
2010-09-25 11:52:00.856    [DEBUG][6]    Removing filter  MPEG-2 Sections and Tables
2010-09-25 11:52:00.857    [DEBUG][6]    Removing filter  BDA MPEG2 Transport Information Filter
2010-09-25 11:52:00.858    [DEBUG][6]    Removing filter  MPEG-2 Demultiplexer
2010-09-25 11:52:00.858    [DEBUG][6]    Removing filter  NPVR TS Mon
2010-09-25 11:52:00.859    [DEBUG][6]    Removing filter  Capture
2010-09-25 11:52:00.860    [DEBUG][6]    Removing filter  Tuner
2010-09-25 11:52:00.860    [DEBUG][6]    Removing filter  Network Provider
2010-09-25 11:52:01.026    [DEBUG][6]    Starting: C:\Users\Public\NPVR\Scripts\PostProcessing.bat [B][color=red]"D:\GBPVRVids\Mandarin MOD Top 10\Mandarin MOD Top 10_20100925_11001150.ts" 1[/color][/B]
2010-09-25 12:02:00.141    [DEBUG][6]    Stopping recording (68). Past end time of recording.
2010-09-25 12:02:00.141    [INFO][6]    AnalogRecorder stream count now 0
2010-09-25 12:02:00.142    [DEBUG][6]    Graph stopping...
2010-09-25 12:02:00.211    [DEBUG][6]    Graph stopped
2010-09-25 12:02:00.211    [DEBUG][6]    Removing filter  NPVR Writer2
2010-09-25 12:02:00.212    [DEBUG][6]    Removing filter  NPVR Writer
2010-09-25 12:02:00.212    [DEBUG][6]    Removing filter  Infinite Pin Tee Filter
2010-09-25 12:02:00.212    [DEBUG][6]    Removing filter  MainConcept (HCW) MPEG Multiplexer-Plus
2010-09-25 12:02:00.213    [DEBUG][6]    Removing filter  MPEG-2 Demultiplexer
2010-09-25 12:02:00.213    [DEBUG][6]    Removing filter  Hauppauge WinTV PVR PCI II Encoder
2010-09-25 12:02:00.214    [DEBUG][6]    Removing filter  Hauppauge WinTV PVR PCI II Capture
2010-09-25 12:02:00.215    [DEBUG][6]    Removing filter  Hauppauge WinTV PVR PCI II Crossbar
2010-09-25 12:02:00.215    [DEBUG][6]    Removing filter  Hauppauge WinTV PVR PCI II TvAudio
2010-09-25 12:02:00.215    [DEBUG][6]    Removing filter  Hauppauge WinTV PVR PCI II TvTuner
2010-09-25 12:02:00.439    [DEBUG][6]    Starting: C:\Users\Public\NPVR\Scripts\PostProcessing.bat [color=red][B]"D:\GBPVRVids\La Liga Goals(1145)\La Liga Goals(1145)_20100925_11301200.ts" 635[/B][/color]
2010-09-25 12:21:33.051    [DEBUG][13]    OnStop()
2010-09-25 12:21:33.356    [INFO][13]    RecordingService.Shutdown()
2010-09-25 12:21:33.447    [INFO][6]    DigitalRecorder.StopAllStreams()
2010-09-25 12:21:33.447    [INFO][6]    DigitalRecorder.StopAllStreams()
2010-09-25 12:21:33.647    [DEBUG][13]    OnStop() complete...
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#20
2010-09-25, 06:03 AM
how do you know it isn't working? By that I mean the log seems to make it clear that your PostProcessing.bat is being called. Do you have any logging in your PostProcessing.bat to see what's actually going on? In the NextPVR sticky thread I gave an example PostProcessing.bat that does a good amount of logging to "processing.log" in the same directory with comskip. This helped me quite a bit in debugging my .bat file.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Comskip Playback Odd Behavior kirschey 3 1,753 2021-09-27, 06:16 PM
Last Post: sub
  tsreader4 skipping issues dlindyds 63 14,783 2021-09-05, 03:23 AM
Last Post: rizarefaldi
  Fast-forward and comskip issues manic_biker 11 3,950 2021-07-12, 02:17 AM
Last Post: Robazz
  Comskip edl files ignored dbguru 3 2,277 2019-10-24, 06:11 PM
Last Post: mvallevand
  Issue with Beast IPTV recording - Skipping + Doesn't record full show abrupt ending russmehta01 3 3,067 2019-02-26, 09:20 PM
Last Post: sub
  VideoReDo vs Comskip drmargarit 2 1,581 2019-02-07, 12:08 AM
Last Post: drmargarit
  Npvr not skipping comskip break points glb1945 3 1,439 2018-11-18, 01:51 AM
Last Post: ga_mueller
  Installed NPVR on New PC, Comskip Now Not Working GWCowling323 12 4,263 2018-10-11, 04:44 PM
Last Post: mvallevand
  Blocky, skipping recordings on some channels at some times of day - OK rest of time martinu 2 1,481 2018-06-29, 04:51 PM
Last Post: martinu
  Video lag on comskipping and live tv unpause (4.1.1) GuruSR 11 3,469 2018-05-14, 01:12 AM
Last Post: NND

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

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

Linear Mode
Threaded Mode