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
  #1  
Old 08-18-2007, 03:40 PM
Folkboat's Avatar
Folkboat Folkboat is offline
Sage Advanced User
 
Join Date: Dec 2005
Location: Edgewater, FL
Posts: 120
Scheduling a Compression.

It's probably been addressed somewhere, however I can't find it.
Is there an option where a pre-recorded TV show could be scheduled for compression at a later time??
I can "send" a recording to "compression" however there isn't an option to schedule it.

SageMC, Sage 6

Regards
Reply With Quote
  #2  
Old 08-19-2007, 05:48 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Just curious, what's your use case for a feature like this?
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #3  
Old 08-19-2007, 07:53 PM
Khristopher Khristopher is offline
Sage Aficionado
 
Join Date: Aug 2007
Location: Edmonton, AB
Posts: 275
As a slight variant to this idea, I'd like to be able to schedule my recording compressions to happen between midnight, and 8am during off-peak time (user configurable time constraints).

Ideally I'd like the option to have a couple time "zones". Midnight to 8am, and 11am to 4pm as examples.
Reply With Quote
  #4  
Old 08-20-2007, 07:06 AM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
I am working on a scheduler for my VideoEdit plugin. One of the options is compression with the SageTV compression program but I still have much to do so I STILL am unable to specify when it will be done. Most likely someone else will beat me to it. You could also try Slugger's Sage Job Queue with an external app to compress.
Reply With Quote
  #5  
Old 08-20-2007, 10:03 AM
fyodor fyodor is offline
Sage Advanced User
 
Join Date: Sep 2006
Posts: 224
Quote:
Originally Posted by evilpenguin View Post
Just curious, what's your use case for a feature like this?
Many of us do not have separate machines for playback and recording/transcoding. It uses up a lot of system resources.
Reply With Quote
  #6  
Old 08-20-2007, 02:29 PM
Folkboat's Avatar
Folkboat Folkboat is offline
Sage Advanced User
 
Join Date: Dec 2005
Location: Edgewater, FL
Posts: 120
Indeed, compressing a recording during "prime time" utilizes system resources.

Transcoding a 2hr recorded TV movie to a DVD format can take a looooong
time on a slow system.

Automating the process just makes sense to me. OTOH its not an earth shattering issue!

Thanks
Reply With Quote
  #7  
Old 08-21-2007, 07:55 AM
FidgetyRat's Avatar
FidgetyRat FidgetyRat is offline
Sage Aficionado
 
Join Date: Jan 2006
Posts: 492
I agree it would be a nice feature, but I found that sage's transcoder does a pretty good job at resource management.

I recently recorded a 100 show marathon, during this time the following was constantly going on.

1) Recording the show
2) Show Analyzer
3) Compress previous recording to avi.
4) Whatever else I was doing at the time such as watching tv, or the server's other features

All of that on a 3.02 celeron and not a single hiccup.


Then again I don't deal in HD
__________________
Server: 2.6Ghz Pentium Dual Core, 2GB RAM. 3x PVR-150, 1.5TB HDD. Geforce 7300GS, Sage 7.0.15
Client: Jetway ION-Top - Dual core ATOM 1.6 & NVIDIA ION
NAS: QNAP TS-419P 3.7TB Raid-5

Special thanks to tmiranda for making my 24h time format dream a reality. See here for more details.
Reply With Quote
  #8  
Old 08-21-2007, 01:43 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Oh, I understand what you mean now, that makes a lot of sense. It shouldn't be too hard to add in a little extra logic to the autocompress code to only add jobs between specified hours. Since my head is already in that section of code i'll add that to my todo list and mess around with it this weekend.

Bear in mind, this would only be adding jobs. To actually stop it from processing jobs during those hours would require some support in the core. But in the use case, at midnight you'd add all your jobs for the day and unless you have *a lot* they'd prolly be done before you wake up.
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #9  
Old 08-21-2007, 01:54 PM
Khristopher Khristopher is offline
Sage Aficionado
 
Join Date: Aug 2007
Location: Edmonton, AB
Posts: 275
Quote:
Originally Posted by evilpenguin View Post
Oh, I understand what you mean now, that makes a lot of sense. It shouldn't be too hard to add in a little extra logic to the autocompress code to only add jobs between specified hours. Since my head is already in that section of code i'll add that to my todo list and mess around with it this weekend.
Thanks in advance for your effort!!

Quote:
Originally Posted by evilpenguin View Post
Bear in mind, this would only be adding jobs. To actually stop it from processing jobs during those hours would require some support in the core. But in the use case, at midnight you'd add all your jobs for the day and unless you have *a lot* they'd prolly be done before you wake up.
That's exactly how I (personally) had envisioned it working.
Reply With Quote
  #10  
Old 08-21-2007, 02:37 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Just curious, would people rather...

a) Just have it add jobs once a day
b) Have it add jobs as normal but for a limited period of time
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #11  
Old 08-21-2007, 03:50 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by evilpenguin View Post
Just curious, would people rather...

a) Just have it add jobs once a day
b) Have it add jobs as normal but for a limited period of time
I like to tell it when to start encoding and for how long... That's why I like yor EP compression.. I just setup a block of time in Dirmon. Each client and server is setup for different times of the day.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #12  
Old 08-21-2007, 04:15 PM
Khristopher Khristopher is offline
Sage Aficionado
 
Join Date: Aug 2007
Location: Edmonton, AB
Posts: 275
Thinking about this a little more, I think it might work best if jobs are queued throughout the day when compression is not allowed (let's say from 8am to 10pm).

Then at 10pm, the first job is started. Before going on to the next compression job however, it should check to see what time it is and if it is still within the time period that jobs are allowed (even if that job takes until 8:30am to finish). The next job would then not run because it would be past the allowable time.

Hope this makes sense.
Reply With Quote
  #13  
Old 08-21-2007, 04:28 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Quote:
Originally Posted by nyplayer View Post
I just setup a block of time in Dirmon. Each client and server is setup for different times of the day.
That's how I do it too

Quote:
Originally Posted by Khristopher View Post
Thinking about this a little more, I think it might work best if jobs are queued throughout the day when compression is not allowed (let's say from 8am to 10pm).

Then at 10pm, the first job is started. Before going on to the next compression job however, it should check to see what time it is and if it is still within the time period that jobs are allowed (even if that job takes until 8:30am to finish). The next job would then not run because it would be past the allowable time.

Hope this makes sense.
That makes sense, but its also not possible without changes to the SageTV core. Once the jobs are in Sage's internal compression queue the STV has no power over when it runs. (well it maybe possible, but it would be way too much work)
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)

Last edited by evilpenguin; 08-21-2007 at 04:32 PM.
Reply With Quote
  #14  
Old 08-21-2007, 04:33 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by BobPhoenix View Post
I am working on a scheduler for my VideoEdit plugin. One of the options is compression with the SageTV compression program but I still have much to do so I STILL am unable to specify when it will be done. Most likely someone else will beat me to it. You could also try Slugger's Sage Job Queue with an external app to compress.
If there was enough interest in it, I could probably modify my job queue plugin to also trigger compression jobs from within sage. Then you could set the constraints under which a recording gets sent off for compression (time of day, age of file, content of file, etc.). This assumes that you can send a recording off for compression via an API call, which I have not read up on, but it seems like it should be something doable via the API. I personally have no need for this functionality so I'll wait to see if it's a popular request before tackling it.
Reply With Quote
  #15  
Old 08-21-2007, 05:50 PM
Folkboat's Avatar
Folkboat Folkboat is offline
Sage Advanced User
 
Join Date: Dec 2005
Location: Edgewater, FL
Posts: 120
Is this cool or what.............

Asked if Sage could schedule the transcoding (compressing) of a recorded TV program - answer no not really.
Hmmm sounds like a good idea, we're gonna develope one just hang on, be a coupla days!!

Only other place I know of that reponds that quickly is Microsoft!! :-)

Thanks
Reply With Quote
  #16  
Old 08-24-2007, 11:43 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I've modified my Sage Job Queue plugin to support queuing of internal transcoding jobs. Since I can't transcode my own recordings, I need some people to test the functionality. I've tested everything but the actual API call that sends the media to the transcode queue since I can't transcode any of my recordings (I use an MVP with a not so powerful server so I can't afford to transcode my mpg files).

If you're familiar with my SJQ plugin then the sample rule pasted below should be enough to show you how to trigger a transcode job from SJQ. If you're not familiar with SJQ then you may want to read through this first.

Some notes about this build:
  • You must download the beta build from my web server; I didn't want to replace the known stable version in the download section here until some testing is complete
  • I've included gkusnick's tools jar in the zip file so you can ignore the install instrucitons saying you need to download it first
  • Download the v1.0.0b1 build from here.
  • Please send some feedback
  • Enjoy

Here is a sample rule that will allow you to trigger Sage transcode jobs via SJQ. This example restricts by time of day along with other values. See the SJQ document above for details on exactly what you can test for in your rules.

Code:
# Only submit transcode jobs between midnight and 6am
* TimeOfDay: 00:00:00 - 06:00:00
# Only transcode tv recordings
= IsTV: true
# Don't try to transcode a recording that's in progress
= IsActivelyRecording: false
# Don't transcode recordings that have already been watched
= IsWatched: false
# Only transcode recordings of Colbert
= Title: The Colbert Report
# TRANS is an job id used to prevent the same file from being transcoded more than once; use whatever you want here
# __TRANSCODE is the special exe name used to queue up transcoding jobs in the SageTV core
# "MPEG4..." is the name of a valid transcode format as defined in the SageTV core
# The true/false on the end is a flag used to determine if the core will delete the source file after
#     transcoding or leave it; true means remove the source and false means leave the source
# NOTE: The action line below MUST start with a tab character (not 5
# spaces as pasted in here)
     TRANS __TRANSCODE "MPEG4-High Quality AVI" true
Reply With Quote
  #17  
Old 08-24-2007, 02:58 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Never make a "tiny" code change just before zipping up the build.

The beta 1 build mentioned above will not work if using an external exe with spaces in the path name (though the transcode functionality does work as expected).

I've deleted the beta 1 build and replaced it with a beta 2 build. Hopefully external commands and the transcode command will play nicely together with this build.

My web server logs showed that only one person downloaded the beta 1 zip, whomever that was please upgrade to beta 2 asap.
Reply With Quote
  #18  
Old 08-24-2007, 03:49 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Slugger I gave it a shot seems to error out.


SJQ v1.0.0b2
Started: Fri Aug 24 14:48:44 PDT 2007

Reading ruleset from 'C:\Program Files\SageTV\SageTV\rules.sjq'
Action 'MPEG4-High Quality AVI' is not executable on line 18
java.io.IOException: Action 'MPEG4-High Quality AVI' is not executable on line 18
at slugger.sagetv.sjq.RulesParser.<init>(Unknown Source)
at slugger.sagetv.sjq.SageJobQueue.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
*** Sleeping until Fri Aug 24 15:02:00 PDT 2007 ***
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #19  
Old 08-24-2007, 04:01 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
Slugger I gave it a shot seems to error out.


SJQ v1.0.0b2
Started: Fri Aug 24 14:48:44 PDT 2007

Reading ruleset from 'C:\Program Files\SageTV\SageTV\rules.sjq'
Action 'MPEG4-High Quality AVI' is not executable on line 18
java.io.IOException: Action 'MPEG4-High Quality AVI' is not executable on line 18
at slugger.sagetv.sjq.RulesParser.<init>(Unknown Source)
at slugger.sagetv.sjq.SageJobQueue.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
*** Sleeping until Fri Aug 24 15:02:00 PDT 2007 ***
Can I get a copy of your rules.sjq file?
Reply With Quote
  #20  
Old 08-24-2007, 04:06 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I am using a client on my test machine. Just trying to encode 1 file.

Code:
# Only submit transcode jobs between midnight and 6am
* TimeOfDay: 06:00:00 - 20:00:00
# Only transcode tv recordings
= IsTV: true
# Don't try to transcode a recording that's in progress
= IsActivelyRecording: false
# Don't transcode recordings that have already been watched
= IsWatched: false
# Only transcode recordings of Planet of the Apes
= Title: Beneath the Planet of the Apes
# TRANS is an job id used to prevent the same file from being transcoded more than once; use whatever you want here
# __TRANSCODE is the special exe name used to queue up transcoding jobs in the SageTV core
# "MPEG4..." is the name of a valid transcode format as defined in the SageTV core
# The true/false on the end is a flag used to determine if the core will delete the source file after
#     transcoding or leave it; true means remove the source and false means leave the source
# NOTE: The action line below MUST start with a tab character (not 5
# spaces as pasted in here)
	TRANS__TRANSCODE "MPEG4-High Quality AVI" true
__________________
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; 08-24-2007 at 04:08 PM.
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
Which compression utility is the best? davephan General Discussion 7 01-03-2007 06:57 AM
Disabling audio compression davephan SageTV Software 1 11-12-2006 10:40 PM
Where do I get H.264 compression? jettman General Discussion 15 03-23-2006 04:58 PM
Newbie question about remote scheduling skenzer SageTV Software 5 03-16-2006 09:41 PM
XP Disk Compression Helps? joe123 SageTV Software 10 02-23-2006 08:46 AM


All times are GMT -6. The time now is 12:09 AM.


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