SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #661  
Old 04-21-2010, 02:01 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Slugger View Post
There's a misplaced ':' on line 4 of your client config. If you can't spot it then paste your client config here and I'm sure someone else will see it.
Ah, I see what I did wrong. Thanks.

Edit:

This is so much more flexible than using dirmon! I have been having to rely on a specific set of file names (show titles) in ShowAnalyzer to determine which profile should be used. Now I can choose which ini file to use based on the channel number so that any show recorded on that channel uses the special ini rather than relying on the file name. Much better.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD

Last edited by Taddeusz; 04-21-2010 at 02:06 PM.
Reply With Quote
  #662  
Old 04-21-2010, 09:39 PM
zzmystique's Avatar
zzmystique zzmystique is offline
Sage Advanced User
 
Join Date: May 2004
Location: New Zealand
Posts: 211
I'm using QFIX on all my recordings and need a little help with some rules, to get them to complete successfully.

1. Detecting if a recording is in multiple parts. (only seems to QFIX myfile-0.ts not myfile-1.ts etc..)
2. Detecting if the recording to be QFixed is currently being viewed.

here is the relevant part of the server ruleset.

// QuickStreamFix all recordings
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && Filename =$ ".ts" && FileExists != "%d%/%p%.QFixed"]{
:SCANMEDIA "true"
:RUNQLOADER "true"
:PRIORITY 100
QSF
}

What do I add to the above ruleset to detect multiple parts and check if the file is in use?

Cheers.
__________________
ZZMystique
My setup: Server: SageTV v7, Intel i5, 8GB, 180GB SSD, 4TB HDD, Win7HP & (DVB Viewer Pro with DVB Viewer for SageTV using 2xTBS6281 DVB-T2).

Last edited by zzmystique; 04-21-2010 at 09:49 PM. Reason: more info added
Reply With Quote
  #663  
Old 04-22-2010, 04:46 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by zzmystique View Post
I'm using QFIX on all my recordings and need a little help with some rules, to get them to complete successfully.

1. Detecting if a recording is in multiple parts. (only seems to QFIX myfile-0.ts not myfile-1.ts etc..)
2. Detecting if the recording to be QFixed is currently being viewed.

here is the relevant part of the server ruleset.

// QuickStreamFix all recordings
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && Filename =$ ".ts" && FileExists != "%d%/%p%.QFixed"]{
:SCANMEDIA "true"
:RUNQLOADER "true"
:PRIORITY 100
QSF
}

What do I add to the above ruleset to detect multiple parts and check if the file is in use?

Cheers.
It should be running the command on all file segments, not just the first one. If it's not then that's a bug. Which version are you running?
__________________
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...
Reply With Quote
  #664  
Old 04-22-2010, 05:34 AM
zzmystique's Avatar
zzmystique zzmystique is offline
Sage Advanced User
 
Join Date: May 2004
Location: New Zealand
Posts: 211
Quote:
Originally Posted by Slugger View Post
It should be running the command on all file segments, not just the first one. If it's not then that's a bug. Which version are you running?
It is only doing the first file, not all of them.

I'm running version 3.0.2.790 with the upgraded SageTV common-logging jar files.

Edit: have updated to the latest version (version v3.0.2.792) and made the following changes to my ruleset.

// Merge multiple file segments before processing other tasks
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && Filename =$ ".ts" && $.GetNumberOfSegments{} != "1" && FileExists == "%c%.xml"]{
:SCANMEDIA "true"
:PRIORITY 20
MERGESPLITFILES
}


// QuickStreamFix all recordings
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && Filename =$ ".ts" && FileExists != "%d%/%p%.QFixed" && $.GetNumberOfSegments{} == "1" && (TimeOfDay < "19:00" || TimeOfDay > "23:00")]{
:SCANMEDIA "true"
:RUNQLOADER "true"
:PRIORITY 10
QSF
}

Is there a better way to check for split files? Also check whether the file to be QSFixed is currently in use?

Cheers
__________________
ZZMystique
My setup: Server: SageTV v7, Intel i5, 8GB, 180GB SSD, 4TB HDD, Win7HP & (DVB Viewer Pro with DVB Viewer for SageTV using 2xTBS6281 DVB-T2).

Last edited by zzmystique; 04-23-2010 at 05:17 AM. Reason: more info
Reply With Quote
  #665  
Old 04-22-2010, 07:54 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by zzmystique View Post
Is there a better way to check for split files?
GetNumberOfSegments will return the number of segments for the passed mediafile... so you could use that to make sure that it the qsfix only runs on single item media files...

Quote:
Also check and whether the file to be QSFixed is currently in use?
you could do conceivably do this with some custom java methods that loop through each UIContext, compare the currently loaded mediafile against the passed mediafile, and return true/false. I do not know of any single Sage method or internal SJQ test that does this...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #666  
Old 04-22-2010, 08:34 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I'd manually run the GetNumberOfSegments API call in Studio against a media file and ensure that Sage believes there is more than 1 segment. SJQ will only run the command against each segment if Sage API tells SJQ that there is more than one. Last time I tested this it worked and was confirmed as working by someone else. I rarely, if ever, have multi segmented recordings to test this with, but you can see if SJQ is trying to run the command because you'll see the header lines in the log for the task for each segment.

There currently is no test to determine if a specific media file is in use by a client/extender. As suggested, a custom java test would be needed (or an internal test added to SJQ). The latter is unlikely to happen anytime soon (I'm currently working on other things right now and SJQ enhancements aren't at the top of the list). With that said, I would encourage you to add a feature request ticket at the proj site if it's something you really want added.
__________________
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...
Reply With Quote
  #667  
Old 04-22-2010, 10:14 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
zzmystique

You could add the following to the top of your QFIX batchfile. It will do a fake move... It will exit the job with a bad condition code if the file is in use .. task will fail. I am not sure if you have SJQ to reque failed jobs. If not you would have to manually delete the failed entry

Code:
move "%~f1" "%~d1%~p1"
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 exit 1
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #668  
Old 04-22-2010, 04:43 PM
zzmystique's Avatar
zzmystique zzmystique is offline
Sage Advanced User
 
Join Date: May 2004
Location: New Zealand
Posts: 211
Quote:
Originally Posted by nyplayer View Post
zzmystique

You could add the following to the top of your QFIX batchfile. It will do a fake move... It will exit the job with a bad condition code if the file is in use .. task will fail. I am not sure if you have SJQ to reque failed jobs. If not you would have to manually delete the failed entry

Code:
move "%~f1" "%~d1%~p1"
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 exit 1
Thanks - have many .tmp files from incomplete QFIX jobs.

Yes I have SJQ setup to reque failed jobs, so will give your suggestion a try.

Cheers
__________________
ZZMystique
My setup: Server: SageTV v7, Intel i5, 8GB, 180GB SSD, 4TB HDD, Win7HP & (DVB Viewer Pro with DVB Viewer for SageTV using 2xTBS6281 DVB-T2).
Reply With Quote
  #669  
Old 04-22-2010, 07:49 PM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
I gave up on offloading the Comskip processing with the SJQC on a second computer. I did have a Windows firewall and Norton firewall, but I disabled both and still had the same types of errors. Changing the properties file didn't help either. Perhaps the SJQC is not able to function on a separate computer. I don't know if the SJQC has ever been tested by anyone in that configuration.

I do know if I used SJQ to re-name each file that is recorded to include the source channel name, in the file name, such as naming "RushHour3-4040927-0.ts" to "RushHour3-4040927-0-HBO2.ts", then I could easily selectively Comskip files on the remote server by detecting the channel names within each file name. If it was a non-commercial channel, the file would not be processed.

Dave
Reply With Quote
  #670  
Old 04-22-2010, 11:42 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by davephan View Post
I gave up on offloading the Comskip processing with the SJQC on a second computer. I did have a Windows firewall and Norton firewall, but I disabled both and still had the same types of errors. Changing the properties file didn't help either. Perhaps the SJQC is not able to function on a separate computer. I don't know if the SJQC has ever been tested by anyone in that configuration.

I do know if I used SJQ to re-name each file that is recorded to include the source channel name, in the file name, such as naming "RushHour3-4040927-0.ts" to "RushHour3-4040927-0-HBO2.ts", then I could easily selectively Comskip files on the remote server by detecting the channel names within each file name. If it was a non-commercial channel, the file would not be processed.

Dave
I only use SJQ processing on a remote client my server does not do comskip or mediashrink my clients do it.... also QFIX vrdcut etc... The only time my server does any processing is when a cleint is not connected.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 04-22-2010 at 11:47 PM.
Reply With Quote
  #671  
Old 04-23-2010, 04:49 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Using remote clients with SJQ definitely works - I do it myself all the time. The easiest way to troubleshoot this is to try and load the SJQ GUI from one of your remote client hosts. If you can load the web site then the firewall issues are resolved and that means it's a configuration problem - check the sjqc.properties file again b/c if the web gui is loading then this is likely the problem.
__________________
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...
Reply With Quote
  #672  
Old 04-23-2010, 05:13 AM
zzmystique's Avatar
zzmystique zzmystique is offline
Sage Advanced User
 
Join Date: May 2004
Location: New Zealand
Posts: 211
Smile

The $.GetNumberOfSegments{} in the ruleset and adding

move "%~f1" "%~d1%~p1"
set checkuse=%ERRORLEVEL%
if %checkuse% NEQ 0 exit 1

to the beginning of the QFix batch file is working great. It has enabled me to remove the time restriction in the ruleset - if the file is in use it just repeatedly reques the job until the file is no longer being used.

I may still submit the feature request though, as it would be a useful check for the _MOVEREC internal job.

Thanks Guys
__________________
ZZMystique
My setup: Server: SageTV v7, Intel i5, 8GB, 180GB SSD, 4TB HDD, Win7HP & (DVB Viewer Pro with DVB Viewer for SageTV using 2xTBS6281 DVB-T2).

Last edited by zzmystique; 04-23-2010 at 05:21 AM.
Reply With Quote
  #673  
Old 04-23-2010, 08:23 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Do you have a lot of split recordings? I'm curious to get some more feedback on if the task is definitely not being run on the additional segments. I'd like to see your task log on such an instance, if possible. As I said, last time I tested this (when I had a multi-segmented recording) it worked for me and was confirmed by another user.
__________________
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...
Reply With Quote
  #674  
Old 04-23-2010, 10:53 AM
broconne broconne is offline
Sage Aficionado
 
Join Date: Feb 2009
Location: Cary, NC
Posts: 306
Set Working Directory

I checked the manual, and I searched the forum.. Is there a way in the SJQ client to set the working directory prior to executing a command?
Reply With Quote
  #675  
Old 04-23-2010, 12:02 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by broconne View Post
I checked the manual, and I searched the forum.. Is there a way in the SJQ client to set the working directory prior to executing a command?
No, at least not directly. It could be achieved by wrapping your exe into a batch file and setting the working directory in the batch file prior to calling the target exe.
__________________
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...
Reply With Quote
  #676  
Old 04-23-2010, 12:35 PM
broconne broconne is offline
Sage Aficionado
 
Join Date: Feb 2009
Location: Cary, NC
Posts: 306
Quote:
Originally Posted by Slugger View Post
No, at least not directly. It could be achieved by wrapping your exe into a batch file and setting the working directory in the batch file prior to calling the target exe.
Thanks, a batch file works. Would be a nice feature if you are looking for feature requests :-)
Reply With Quote
  #677  
Old 04-23-2010, 12:57 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by broconne View Post
Thanks, a batch file works. Would be a nice feature if you are looking for feature requests :-)
Open a feature request ticket at the project web site. Most feature requests will be put on the back burner as my SageTV dev time is almost over for another year, but feature requests definitely have absolutely no chance of happening without a ticket.
__________________
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...
Reply With Quote
  #678  
Old 04-24-2010, 06:57 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Slugger,

Sorry if this has been asked before, but how do I uninstall this? Do I just delete the .xml in the jetty\contexts directory and then restart Sage? Do I need to do anything with the .war file?

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #679  
Old 04-24-2010, 07:26 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by tmiranda View Post
Slugger,

Sorry if this has been asked before, but how do I uninstall this? Do I just delete the .xml in the jetty\contexts directory and then restart Sage? Do I need to do anything with the .war file?

Tom
Delete the xml file in the contexts dir. Once that's done, SJQ will stop. You don't need to remove the war file, but you can. If you want to delete the war then you may have to restart Sage in order to delete it (especially on Windows) due to Jetty holding a lock on the war file.
__________________
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...
Reply With Quote
  #680  
Old 04-24-2010, 08:10 AM
davephan's Avatar
davephan davephan is offline
Sage Icon
 
Join Date: Mar 2004
Location: Minnesota
Posts: 1,911
I tried offloading the Comskip process to the second computer using SJQC again. I had the c:\sjqc\sjqc.properties configured correctly on the SageTV computer. However, I notice that the c:\sjqc\sjqc.properties file was not configured correctly on the second computer.

The second computer's sjqc.properties file parameters, "buffer" and "port" were not configured correctly. They are now configured the same as the SageTV computer's sjqc.properties file:
buffer=65000
port=8500

The SJQ web GUI works as it did before from the second computer, and the SJQC connects from the second computer, which it didn't connect before the changes made to the sjqc.properties file stored on the second computer.

I tried running Comskip from the second computer manually. I ran the Comskip against a mapped drive to the SageTV computer. Each video recording drive is mapped on the second computer to the same drive letters that are used on the SageTV computer. Comskip did work successfully when manually running Comskip on a mapped drive file.

After a recording completes, the recording appears in the SJC GUI (on the second computer) list waiting to be assigned to the client on the second computer. The file is assigned to the SJQC on the second computer. However, the Comskip process fails.

Here is a log from a failed Comskip processed file:

Code:
Sat Apr 24 08:45:43 CDT 2010: Starting task with priority 5/1/10
Executing command line: C:/comskip/comskip.exe "E:\Video\SellThisHouse-ProspectParkNJ-1706071-0.mpg"
Comskip 0.80.031, made using:
mpeg2dec-0.4.0 - by Michel Lespinasse <walken@zoy.org> and Aaron Holtzman
No such file or directory - could not open file E:\Video\SellThisHouse-ProspectParkNJ-1706071-0.mpg

The commandline used was:
C:\comskip\comskip.exe E:\Video\SellThisHouse-ProspectParkNJ-1706071-0.mpg
Opening E:\Video\SellThisHouse-ProspectParkNJ-1706071-0.mpg
I manually check to make sure the E:\Video\SellThisHouse-ProspectParkNJ-1706071-0.mpg" file exists on the mapped drive. The file exists. I then try manually running Comskip on the second computer against the E:\Video\SellThisHouse-ProspectParkNJ-1706071-0.mpg stored on the SageTV computer. Comskip processes the 30 minute program in 2 minutes, 32 seconds, creating a TXT and EDL file, finding three commercial blocks.

I don't think anything is wrong in my SJQC configuration file:

Code:
COMSKIP {
   :RESOURCES 50 # Up to 2 comskip can be run simultaneously (every client has exactly 100 resources available)

   # CPU priority to be used for this task process; one of LOW, NORMAL, HIGH (case sensitive)
   :CPU "NORMAL"   # Default is NORMAL if not specified

   # Comskip returns 1 on success instead of the universally accepted zero; tell SJQ that
   # a return code of 1 means success instead of the default value of zero
   :RETURNCODE 1

   "C:/comskip/comskip.exe \"%c%\""
}
I think my ruleset is good too:

Code:
if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && ($.GetAiringChannelName{} !% "KTCADT.*|CSPAN.*|ENCR.*|ENCORE|HBO.*|MPLEX|IFC|SUNDAE|INDIE|RETR|FLIX|TCM")] {
   COMSKIP
}
So, at least the SQJC is now connecting from the second computer to the SJQ running on the SageTV computer, but the Comskip jobs are failing for some reason.

Dave

Last edited by davephan; 04-24-2010 at 08:16 AM.
Reply With Quote
Reply


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

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
Sage Job Queue (SJQ) new release notifications Slugger Customization Announcements 3 12-17-2009 09:59 AM
Plugin: Sage Job Queue (SJQ) Slugger SageTV Customizations 991 12-11-2009 03:52 PM
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:09 PM.


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