SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #321  
Old 01-25-2009, 09:17 AM
Grasshopper Grasshopper is offline
Sage Aficionado
 
Join Date: Nov 2003
Posts: 314
Newbie assistance?

I have Sage Job Queue installed and working (I think). I have Comskip also installed and can manually run it by dragging a recorded show file onto it; I haven't tuned the commercial skipping yet, but it appears to work okay. But I'm at a loss when it comes to using Sage Job Queue to automate the comskip process. Can someone post an example of a ruleset (am I even talking about the right thing?) for a very simple comskip call without a lot of complex conditions? I have a very simple Sage server setup, running on a WHS box. I don't need to process on another pc, just the server is fine.
  #322  
Old 01-25-2009, 09:32 AM
scott2020 scott2020 is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 128
Quote:
Originally Posted by scott2020 View Post
Is it possible to use SJQ to run compression jobs off of the main server? I have my server auto compressing my selected series recordings, but it takes a long time on my older server. It would be great to be able to tell SJQ to run the compress job on another client like we do for comskip.
Scott
I'm sorry, I am a total moron! The post right above my question had a starting point to run a transcode job. Perhaps looking at the command lines on other programs will give some insight as to keeping the episode information and such.

After the compress/transcode job is done, I assume comskip will need to be run again? The jobs I did run on the server wiped out the comskip results obviously since the file is much different.
Scott
__________________
Server - Intel Pentium 3.2 - 3 GB RAM - WinXP SP3 - Headless
80GB system drive - 500GB Recordings - 2TB NAS
(1) HVR-2250 Analog Cable & Clear QAM (1) HD Homerun clear QAM
(1) KWorld 115 ATSC Tuner OTA
(1) HD200 HDMI to Samsung 50" Plasma
(1) MediaMVP to 19" in bedroom

SageTV 7.0.23 release
  #323  
Old 01-25-2009, 11:14 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Wheemer View Post
How can I make multiple copies of comskip run on each client?
Configure the client to run multiple tasks simultaneously. The setup is described in the wiki doc.

Quote:
I also would like to have the captions processed at the same time as the commercials...

An example of how that might be done would be great.
No clue on this one; I assume it's a command line option to comskip or sa? If it is a command line option then simply pass that option when calling comskip or sa. Someone else may have an answer on this one.

Quote:
This plugin rocks... can have any of the spare computers I have on my network do some of the processing work.

Also how do I get it to fire off the commands as soon as it starts recording?
Ok, this one's not in the wiki... will add a new doc shortly. On the settings grid, change the RunType setting from 'AfterRec' to 'DuringRec'. When set to 'DuringRec' the QueueLoader will run 10 seconds after the start of each recording, which will queue up the jobs, but it may be up to 5 more minutes before a client comes along and starts the queued job.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #324  
Old 01-25-2009, 11:28 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Grasshopper View Post
I have Sage Job Queue installed and working (I think). I have Comskip also installed and can manually run it by dragging a recorded show file onto it; I haven't tuned the commercial skipping yet, but it appears to work okay. But I'm at a loss when it comes to using Sage Job Queue to automate the comskip process. Can someone post an example of a ruleset (am I even talking about the right thing?) for a very simple comskip call without a lot of complex conditions? I have a very simple Sage server setup, running on a WHS box. I don't need to process on another pc, just the server is fine.
The wiki doc has some simple examples that should help you on your way. (I just added another example showing a typical rule for setting up comskip/showanalyzer.)
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #325  
Old 01-25-2009, 11:31 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by scott2020 View Post
I'm sorry, I am a total moron! The post right above my question had a starting point to run a transcode job. Perhaps looking at the command lines on other programs will give some insight as to keeping the episode information and such.

After the compress/transcode job is done, I assume comskip will need to be run again? The jobs I did run on the server wiped out the comskip results obviously since the file is much different.
Scott
I'm not 100% sure, but as long as the new file keeps the airing id in the name of the file, Sage should be able to make the connection, but, again, don't quote me on that.

If you need to rerun comskip, then you can just add that command line to the same task configuration (a task can run more than one command).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #326  
Old 01-25-2009, 03:28 PM
Wheemer's Avatar
Wheemer Wheemer is offline
Sage Icon
 
Join Date: Dec 2004
Location: Deer Lake, NL, Canada
Posts: 1,493
I think I figured it out, does this look ok?

CLIENT:
// TASK definition
:MAXPROCS 5
COMSKIP{
:MAX 2
"C:\\comskip.bat \"%c%\""
}
CC{
:MAX 3
"C:\\cc.bat \"%c%\""
}

SERVER:
//
if [IsTV == "true" && FileExists != "%d%\\%p%.edl"]
{
COMSKIP}
if [IsTV == "true" && FileExists != "%d%\\%p%.smi"]
{
CC}
  #327  
Old 01-25-2009, 03:34 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Wheemer View Post
I think I figured it out, does this look ok?

CLIENT:
// TASK definition
:MAXPROCS 5
COMSKIP{
:MAX 2
"C:\\comskip.bat \"%c%\""
}
CC{
:MAX 3
"C:\\cc.bat \"%c%\""
}

SERVER:
//
if [IsTV == "true" && FileExists != "%d%\\%p%.edl"]
{
COMSKIP}
if [IsTV == "true" && FileExists != "%d%\\%p%.smi"]
{
CC}
That looks pretty good. As defined, the client will run up to 5 tasks simultaneously, no more than 3 CC tasks and no more than 2 COMSKIP tasks simultaneously.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #328  
Old 01-25-2009, 04:55 PM
scott2020 scott2020 is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 128
Quote:
Originally Posted by Slugger View Post
I'm not 100% sure, but as long as the new file keeps the airing id in the name of the file, Sage should be able to make the connection, but, again, don't quote me on that.

If you need to rerun comskip, then you can just add that command line to the same task configuration (a task can run more than one command).
Great, thanks. It looks like if the filename is the same with the airing ID Sage can figure it out, even with the file type and ext changing.

Now my problem is I can't get Handbrake to convert my MPEG files recorded by Sage. Right off the bat I get audio time sync errors and it drops audio frames and so on. The result is OK video and choppy audio. I'll have to keep working on that. My other DVD rips and MPEG files from Tivo work, but the Sage recordings don't.

Quote:
}
CC{
:MAX 3
"C:\\cc.bat \"%c%\""
}
@Wheemer,
What does your CC.BAT do?
__________________
Server - Intel Pentium 3.2 - 3 GB RAM - WinXP SP3 - Headless
80GB system drive - 500GB Recordings - 2TB NAS
(1) HVR-2250 Analog Cable & Clear QAM (1) HD Homerun clear QAM
(1) KWorld 115 ATSC Tuner OTA
(1) HD200 HDMI to Samsung 50" Plasma
(1) MediaMVP to 19" in bedroom

SageTV 7.0.23 release
  #329  
Old 01-25-2009, 11:46 PM
Wheemer's Avatar
Wheemer Wheemer is offline
Sage Icon
 
Join Date: Dec 2004
Location: Deer Lake, NL, Canada
Posts: 1,493
Hey, here's the contents:

cc.bat

c:
cd C:\Program Files\CCExtractor
start /b /w /belownormal ccextractorwin.exe -sami -utf -s --stream 15 "%~f1"


comskip.bat

c:
cd C:\Program Files\ComSkip
start /b /w /belownormal comskip.exe --ini="C:\Program Files\ComSkip\comskip.ini" -n "%~f1"
set comskiperror=%ERRORLEVEL%
if %comskiperror% EQU 1 exit 0
if %comskiperror% NEQ 1 exit 1
  #330  
Old 01-26-2009, 03:58 PM
Grasshopper Grasshopper is offline
Sage Aficionado
 
Join Date: Nov 2003
Posts: 314
Okay, forgive me for being dense. Here's my ruleset, shamelessly copied from the wiki:

if [IsTV == "true" && IsActivelyRecording == "false" && IsWatched == "false" && FileExists != "%d%/%p%.edl" && Filename =$ ".mpg"]
{
:PRIORITY 10
COMSKIP
}

This has resulted in an active job queue consisting of several hundred tasks, all of which are Waiting and a task ID of "COMSKIP". This is as I want it, at least for now.

But nothing's processing, all the tasks are Waiting. Must I designate the server as a client in some way? Must I write a comskip.bat file?

Desperately seeking a clue.
  #331  
Old 01-26-2009, 04:10 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by Grasshopper View Post
Okay, forgive me for being dense. Here's my ruleset, shamelessly copied from the wiki:

if [IsTV == "true" && IsActivelyRecording == "false" && IsWatched == "false" && FileExists != "%d%/%p%.edl" && Filename =$ ".mpg"]
{
:PRIORITY 10
COMSKIP
}

This has resulted in an active job queue consisting of several hundred tasks, all of which are Waiting and a task ID of "COMSKIP". This is as I want it, at least for now.

But nothing's processing, all the tasks are Waiting. Must I designate the server as a client in some way? Must I write a comskip.bat file?

Desperately seeking a clue.
Yes, you must install the task client package. The server does not act as a client (for external tasks). To clear the built up queue of tasks, you must install one or more instances of the task client and configure the task client(s) to complete the type of tasks queued up by the server.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #332  
Old 01-26-2009, 06:45 PM
scott2020 scott2020 is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 128
Quote:
Originally Posted by Wheemer View Post
Hey, here's the contents:

cc.bat

c:
cd C:\Program Files\CCExtractor
start /b /w /belownormal ccextractorwin.exe -sami -utf -s --stream 15 "%~f1"


comskip.bat

c:
cd C:\Program Files\ComSkip
start /b /w /belownormal comskip.exe --ini="C:\Program Files\ComSkip\comskip.ini" -n "%~f1"
set comskiperror=%ERRORLEVEL%
if %comskiperror% EQU 1 exit 0
if %comskiperror% NEQ 1 exit 1

Thanks for posting that. I want to write a batch file that will process the original mpg file into an AVI. I have done this on my test machine using mencoder, because Handbrake I couldn't figure out. mencoder will convert the Sage mpg files with no problem but Handbrake kept complaining about time sync and needing to go back in time, etc. I can process a 1/2 hour show in 15 minutes or so, vs. taking several hours on my P4 2.8 machine using SageMC Video Tools. I guess what I need to do is process the original file to a new one, delete the original file, and then comskip the new file. I haven't tried to comskip an AVI file and I don't think that will work. I'd hate to lose my comskip on compressed shows so we'll see!
Scott
__________________
Server - Intel Pentium 3.2 - 3 GB RAM - WinXP SP3 - Headless
80GB system drive - 500GB Recordings - 2TB NAS
(1) HVR-2250 Analog Cable & Clear QAM (1) HD Homerun clear QAM
(1) KWorld 115 ATSC Tuner OTA
(1) HD200 HDMI to Samsung 50" Plasma
(1) MediaMVP to 19" in bedroom

SageTV 7.0.23 release
  #333  
Old 01-26-2009, 07:49 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 3,968
scott2020,

I encode to XVID using mencoder and I use the edl from the original mpg and that works fine. I do not change the framerate when I encode to avi I use the original FPS. Maybe you can post your mencoder command line.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
  #334  
Old 01-26-2009, 10:43 PM
scott2020 scott2020 is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 128
Quote:
Originally Posted by nyplayer View Post
scott2020,

I encode to XVID using mencoder and I use the edl from the original mpg and that works fine. I do not change the framerate when I encode to avi I use the original FPS. Maybe you can post your mencoder command line.
I think I may have a bad test... I don't see the edl files from the original at all so I think I screwed up along the way. I am encoding another one right now and I'll see how that works. The command line I use I took mostly from the profile settings in SageMC Video Tools settings. The %1's are the filename passed on the batch file command line.

Code:
C:\Mencoder\mencoder.exe %1 -oac mp3lame -ovc xvid -xvidencopts bitrate=1500:threads=4:autoaspect:trellis:chroma_me:chroma_opt:hq_ac:quant_type=h263 -o %1.avi
__________________
Server - Intel Pentium 3.2 - 3 GB RAM - WinXP SP3 - Headless
80GB system drive - 500GB Recordings - 2TB NAS
(1) HVR-2250 Analog Cable & Clear QAM (1) HD Homerun clear QAM
(1) KWorld 115 ATSC Tuner OTA
(1) HD200 HDMI to Samsung 50" Plasma
(1) MediaMVP to 19" in bedroom

SageTV 7.0.23 release
  #335  
Old 01-26-2009, 11:05 PM
scott2020 scott2020 is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 128
I just finished up an episode of Friends and left the original edl files and such in place, but playing back in SageMC shows no "empty" spots on the timeline for the commercial skip.

I'm sorry, this is probably getting off topic at this point. Maybe we can PM or start another one at some point.

Scott
__________________
Server - Intel Pentium 3.2 - 3 GB RAM - WinXP SP3 - Headless
80GB system drive - 500GB Recordings - 2TB NAS
(1) HVR-2250 Analog Cable & Clear QAM (1) HD Homerun clear QAM
(1) KWorld 115 ATSC Tuner OTA
(1) HD200 HDMI to Samsung 50" Plasma
(1) MediaMVP to 19" in bedroom

SageTV 7.0.23 release
  #336  
Old 01-27-2009, 08:08 AM
edbmdave edbmdave is offline
Sage Aficionado
 
Join Date: Apr 2004
Location: Dallas
Posts: 365
Using Handbrake..

These are working for me. I convert to mp4 (Ipod)

Server rules:
// Comskip MPEG scan
if [IsTV == "true" && IsActivelyRecording == "false" && FileExists == "%d%\\%p%.mpg" && FileExists != "%d%\\%p%.edl"]
{
:PRIORITY 10
COMSKIP
}


// Transcode
if [IsTV == "true" && IsActivelyRecording == "false" && FileExists == "%d%\\%p%.mpg" && FileExists == "%d%\\%p%.edl" && FileExists != "%d%\\%p%.AUTOCOMPRESS"]
{
:PRIORITY 5
CONVERT
}


Client Configuration:

:MAXPROCS 2
:MAPDIR "D:\\Media\\Videos" "\\\\server\\video01"
:MAPDIR "E:\\Media\\Videos" "\\\\server\\video02"

COMSKIP {
:CPU LOW
:MAX 1
"C:\\ComskipMonitor\\comskip.bat" "%c%"
}

CONVERT {
:CPU LOW
:MAX 1
"C:\\handbrake\\handbrake.bat" "%d%\\%p%.mpg" "%d%\\%p%.mp4"
}

Batch files:

Handbrake.BAT:
cd c:\handbrake
c:
start /b /w handbrakecli.exe -v -Z "iPhone & iPod Touch" -I -d -i %~f1 -o %~f2
set HBError=%ERRORLEVEL%
if %HBError% EQU 0 DEL /Q /F %~f1

CompSkip.BAT:
cd c:\ComskipMonitor\comskip80_007
c:
start /b /w comskip.exe -n "%~f1"
set comskiperror=%ERRORLEVEL%
if %comskiperror% EQU 1 exit 0
if %comskiperror% NEQ 1 exit 1
  #337  
Old 01-27-2009, 06:02 PM
scott2020 scott2020 is offline
Sage Advanced User
 
Join Date: Jun 2008
Posts: 128
Thanks for those batch files. The version of Handbrake I am using is 0.9.3 I believe, whatever the latest one is. It won't convert with those command lines without making horrible choppy audio. It gives loads of time sync errors and whatnot. I might try the 0.9.2 version and see if that works.

Code:
Encoding: task 1 of 1, 1.59 % (35.17 fps, avg 61.36 fps, ETA 00h14m25s)[18:00:06
] sync: audio 0 time went backwards 0 ms, dropped 4 frames (next 2749198, curren
t 2749198)
[18:00:06] sync: adding 96 ms of silence to audio 0  start 2769358, next 2760718

Signal 2 received, terminating - do it again in case it gets stuck
[18:00:06] sync: audio 0 time went backwards 0 ms, dropped 4 frames (next 277223
8, current 2772238)
[18:00:06] sync: adding 96 ms of silence to audio 0  start 2792398, next 2783758

[18:00:06] sync: audio 0 time went backwards 0 ms, dropped 3 frames (next 279527
8, current 2795278)
[18:00:06] sync: adding 96 ms of silence to audio 0  start 2812558, next 2803918

[18:00:06] sync: audio 0 time went backwards 0 ms, dropped 4 frames (next 281543
8, current 2815438)
__________________
Server - Intel Pentium 3.2 - 3 GB RAM - WinXP SP3 - Headless
80GB system drive - 500GB Recordings - 2TB NAS
(1) HVR-2250 Analog Cable & Clear QAM (1) HD Homerun clear QAM
(1) KWorld 115 ATSC Tuner OTA
(1) HD200 HDMI to Samsung 50" Plasma
(1) MediaMVP to 19" in bedroom

SageTV 7.0.23 release
  #338  
Old 01-27-2009, 06:37 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 3,968
Slugger,

In the server settings is the RunDelay in seconds?
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
  #339  
Old 01-27-2009, 06:53 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
Slugger,

In the server settings is the RunDelay in seconds?
MaxDelay is in minutes. As a data point, running the QueueLoader more than once every 60 seconds tends to bring out perf issues with SageTV. If you're going to run it on an interval, I really recommend setting it no lower than 2 minutes (I believe there's even a safe guard in place to prevent it going lower than 2 mins).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
  #340  
Old 01-27-2009, 06:57 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 3,968
Slugger,

It's not the maximum delay it's RunDelay... I have the server to scan During record. I would like to delay the scan for at least 5 minutes after start of record.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: Sage Job Queue (SJQ) v3 Slugger SageTV Customizations 1355 07-25-2013 07:44 AM
Sage Job Queue (SJQ) new release notifications Slugger Customization Announcements 3 12-17-2009 09:59 AM
Sage Job Queue Completed tasks problem raffmanlt SageTV Customizations 2 08-18-2009 07:34 PM
Comskip Monitor VS Sage Job Queue SJQ personalt SageTV Customizations 6 03-02-2009 10:27 AM
Plugin: SJQ v1.1.0RC1 Available - Testers Needed Slugger SageTV Customizations 35 04-21-2008 08:12 AM


All times are GMT -6. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.