SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Hardware Support Discussions related to using various hardware setups with SageTV products. Anything relating to capture cards, remotes, infrared receivers/transmitters, system compatibility or other hardware related problems or suggestions should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #81  
Old 11-19-2005, 07:45 AM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Quote:
Originally Posted by lonndoggie
Your encoder is basically going to act like the MyIR app--which will start MyHD when it's time to record if MyHD is not already running. And if it is running, then it should just start sending messages to it.
No, the encoder starts MyHD when the encoder starts and stops it when the encoder stops.

Quote:
So the problem isn't so much startng MyHD as a service, its being able to do a winexec (or other process-launch API call) to get it running if it's not already. Yes?
No, the problem is that MyHD won't run without access to some user's desktop.

Quote:
What happens if you have MyHD set to do background recording and you have your encoder try to start MyHD? There is that system tray icon, so maybe that's an issue, but other than that, it's pretty much silent.
I don't know. I've never used MyHD's own scheduler, but I'm not sure what you're getting at here.

Quote:
In another line of (possibly faulty) reasoning, if one was running logged in, and had MyHD running, your service could find that instance of MyHD and simply start sending it commands--yes? And if not, if there is an API call to start a process thread logged in under the logged in user (instead of the service user), then that would do the trick. This is how I figured you could have Sage service running and MyHD on the same box, with the user always logged in.
Again, I'm not sure what problem you're trying to solve with this description.

Quote:
If you did figure out how to run MyHD as a service, would that effectively tie MyHD up--I'd have to stop the service to use it to watch TV ouside Sage? Yeah, I know, why would I--well, I do like to use it to watch DVDs, too.
Actually, I manage MyHD the whole time, so my encoder may not be for you if you want to use it for rendering.

If tying up the MyHD is a problem for people, I can make an alternative configuration that launches (or locates) MyHD only when it needs to record, however there are two caveats
1) it will be significantly slower to start and stop recordings
2) you must run the encoder prior to launching MyHD due to the way that MyHD seeks out its TCP/IP server (the encoder) upon startup.
Reply With Quote
  #82  
Old 11-19-2005, 07:48 AM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Quote:
Originally Posted by valnar
This may sound stupid, but do most people here run Sage, MyHD or in general have their HTPC on Windows 2000/2003 Server? I fail to see the big deal about running Salsbst's program as a service vs an application? I personally run XP and have it setup to log into the Windows desktop straight from bootup.

What am I missing here?

-Robert
The deal is that you want to use this encoder, then you shouldn't run Sage as a service if you don't the encoder as a service. Whether or not that's a big deal depends on your DNA, I guess. It's a big deal to me, which is why I'm doing my best to make it work as well as it can given the limitations imposed by MyHD.exe.

My HTPC clients run WinXP Pro, My HTPC server runs Win2k3 Server.
Reply With Quote
  #83  
Old 11-19-2005, 11:03 AM
lonndoggie's Avatar
lonndoggie lonndoggie is offline
Sage User
 
Join Date: May 2004
Location: Encinitas, CA
Posts: 42
Quote:
Originally Posted by salsbst
No, the encoder starts MyHD when the encoder starts and stops it when the encoder stops.
Well, that's the design decision you've made, which may not work so well for some folks (see below). Alternatively, you could instead start MyHD from the encoder when it's time to record, just as MyIR starts MyHD, and shut it down when the recording's over.

Quote:
Originally Posted by salsbst
No, the problem is that MyHD won't run without access to some user's desktop.
Right--and if you could launch it upon encoder start via a process-run API call that could allow it to start to run within the context of a logged-in user, then you could have the combo of Sage-as-a-service running your encoder working for users who, like valnar and myself, always boot up logged in anyway. Not sure you can do that, however, I think usually you launch a new process within the context of the currently running process--but maybe not. Have you tried that?

Quote:
Originally Posted by salsbst
I don't know. I've never used MyHD's own scheduler, but I'm not sure what you're getting at here.
Interesting. Probably would do you good to have some experience with it. Do you know about the background recording option, and how it's execution differs from not having that option turned on? The point is that MyHD really does operate in the background when a recording is kicked off with that option, except for a tray icon--it doesn't grab the sound card or draw any windows. Starting it that way might allow MyHD to work within one of the many "run this app as a service" programs.

Quote:
Originally Posted by salsbst
Again, I'm not sure what problem you're trying to solve with this description.
Easy--I want it to work for my setup, where I'm logged in all the time (log in at bootup) *and* I can run Sage as a service (so I don't miss recordings when someone in the house manages to shut down the Sage app--running not logged in isn't the only reason to want Sage running as a service, y'know).
  • IF you can launch MyHD from a service while the user's logged in, and MyHD will happily attach itself to the logged in user's gui, then that works for me.
  • IF you can launch MyHD from a service in background recording mode, wrapped in one of those "run app as a service" programs--e.g., starting and stopping the service when needed--then you'll solve your problem of wanting to run not logged in.

Quote:
Originally Posted by salsbst
Actually, I manage MyHD the whole time, so my encoder may not be for you if you want to use it for rendering.
Yeah. So if MyHD is "running" the whole time, isn't it grabbing the soundcard? Might make it tough to use MyHD and an analog tuner card in the same box.

Quote:
Originally Posted by salsbst
If tying up the MyHD is a problem for people, I can make an alternative configuration that launches (or locates) MyHD only when it needs to record, however there are two caveats
1) it will be significantly slower to start and stop recordings
2) you must run the encoder prior to launching MyHD due to the way that MyHD seeks out its TCP/IP server (the encoder) upon startup.
1) is why MyHD's scheduler always starts MyHD one minute before the scheduled recording is to begin. That said, it probably takes less than 2 seconds to get rolling.
2) not sure why the encoder wouldn't run all the time, and we could stop it when we want to use MyHD for other things. Maybe.

As a sage (pun intended) engineering manager I once worked with said, "It's always easy for the guy who ISN'T doing the work" (e.g., me). Just kicking around ideas, I'm excited about your work and how it'll work in the context of my setup. MyHD under Sage has been a DREAM of mine for a while.
Reply With Quote
  #84  
Old 11-19-2005, 12:42 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Quote:
Originally Posted by lonndoggie
Well, that's the design decision you've made, which may not work so well for some folks (see below). Alternatively, you could instead start MyHD from the encoder when it's time to record, just as MyIR starts MyHD, and shut it down when the recording's over.
For non-service use, I'll give you an option to start and stop MyHD for each recording, but I wouldn't want to be in charge of teaching a family about when they are and are not allowed to use the MyHD to watch things.

Quote:
and if you could launch it upon encoder start via a process-run API call that could allow it to start to run within the context of a logged-in user, then you could have the combo of Sage-as-a-service running your encoder working for users who, like valnar and myself, always boot up logged in anyway. Not sure you can do that, however, I think usually you launch a new process within the context of the currently running process--but maybe not. Have you tried that?
I'm trying to understand the problem this would solve, but I keep drawing blanks. Sure, I can launch the process within the context of pretty much any user, but there must be a desktop user on the system *somewhere*. The MyHD.exe process *cannot function* if there is no user logged into a desktop session.

Quote:
Interesting. Probably would do you good to have some experience with it. Do you know about the background recording option, and how it's execution differs from not having that option turned on? The point is that MyHD really does operate in the background when a recording is kicked off with that option, except for a tray icon--it doesn't grab the sound card or draw any windows. Starting it that way might allow MyHD to work within one of the many "run this app as a service" programs.
I do start it in the tray, the recordings are done in the background. Does their scheduler work if no user is logged into the system? If so, then maybe I should be playing with it.

Quote:
Easy--I want it to work for my setup, where I'm logged in all the time (log in at bootup) *and* I can run Sage as a service (so I don't miss recordings when someone in the house manages to shut down the Sage app--running not logged in isn't the only reason to want Sage running as a service, y'know).
Please convince MIT to make MyHD.exe able to run as a service with no logged on user.

Quote:
IF you can launch MyHD from a service while the user's logged in, and MyHD will happily attach itself to the logged in user's gui, then that works for me.
Sage starts recordings (if there are any) as soon as it starts. You cannot wait for a user to log in, even automatically.

Quote:
IF you can launch MyHD from a service in background recording mode, wrapped in one of those "run app as a service" programs--e.g., starting and stopping the service when needed--then you'll solve your problem of wanting to run not logged in.
You can't do that, or rather, I can't. Please prove me wrong, I'd be grateful.

Quote:
Yeah. So if MyHD is "running" the whole time, isn't it grabbing the soundcard? Might make it tough to use MyHD and an analog tuner card in the same box.
No, it's not grabbing the sound card.

Quote:
not sure why the encoder wouldn't run all the time, and we could stop it when we want to use MyHD for other things. Maybe.
You can't launch MyHD when the encoder isn't running if you want that MyHD session to be able to handle Sage recordings later on.
Reply With Quote
  #85  
Old 11-19-2005, 01:31 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by salsbst
The deal is that you want to use this encoder, then you shouldn't run Sage as a service if you don't the encoder as a service.
Trying not to be thick, but why?

Why can't your encoder run as an app started with a user logon, and SageTV as a service?

Why can't your encoder run as an app on the same machine as SageTV running as a service?

I mean I understand the ideal solution is to have a MyHD recording soluiton that runs as a service (nobody needs to be logged on and such), but what I don't understand is why you make running it as an app such a big deal, and what Sage running as a service or not has to do with that.
Reply With Quote
  #86  
Old 11-19-2005, 04:45 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Sage tries to start a recording when it feels like it, and that can include the moment it first starts up. It does not wait for a user to be logged on first.

I'm not stopping anyone from running Sage as a service and the encoder as an app, so if you guys want to go ahead and do it that way, fine by me.
Reply With Quote
  #87  
Old 11-19-2005, 05:02 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Ok, after consideration, if you want to run Sage as a service and must run the MyHD encoder as an app, you should set the sage service *not* to autostart.

In the user's startup folder, put a script that does this:

a) launch the encoder app
b) start sage service
c) start sage app (if desired)

That should address the problems of not having the encoder before starting the SAge service.

You should probably also stop the sage service before logging off that user.
Reply With Quote
  #88  
Old 11-19-2005, 05:29 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
FWIW, when I was running Stealth's network encoder, I would frequently (nightly) shut down the PC it was running in, while my SageTV server ran 24-7. There were, as far as I can tell, no ill effects.
Reply With Quote
  #89  
Old 11-19-2005, 05:39 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
That's odd. I see Sage marking the encoder as dead if it doesn't respond properly to messages from Sage.
Reply With Quote
  #90  
Old 11-19-2005, 05:44 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
It might do that, but it always would pick it up again shortly after I started the remote PC. At least it seemed to.
Reply With Quote
  #91  
Old 11-19-2005, 11:36 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Yeah, I've got a networked encoder in my main PC that's seperate from my Sage Server, I also regularly have to reboot or otherwise disable the card in this machine so it's not available to the Sage server. Sage easily readjusts the recording schedule to reflect the missing card and all. Then, when it's available again, it picks it up and readjusts the schedule. It's not always perfect, and occasionally the Sage service has to be kicked (usually when I get impatient), but it actually works reasonably well most of the time.

Anyway, I think we'll all be eager to get some time with it and see how it works out for our specific applications.
Reply With Quote
  #92  
Old 11-20-2005, 11:25 AM
lonndoggie's Avatar
lonndoggie lonndoggie is offline
Sage User
 
Join Date: May 2004
Location: Encinitas, CA
Posts: 42
Quote:
Originally Posted by salsbst
For non-service use, I'll give you an option to start and stop MyHD for each recording, but I wouldn't want to be in charge of teaching a family about when they are and are not allowed to use the MyHD to watch things.
Most families, no. My family, we're pretty geeked-out. We're already used to the problem of watching a DVD then a MyHD recording kicks in, which kicks us out. Sage's recording schedule is easier to get to and comprehend than MyHDs, so that'd be a big improvement! But this is in our situation, and I realize mebbe I'm asking for things that won't be widely applicable.

Quote:
Originally Posted by salsbst
I'm trying to understand the problem this would solve, but I keep drawing blanks. Sure, I can launch the process within the context of pretty much any user, but there must be a desktop user on the system *somewhere*. The MyHD.exe process *cannot function* if there is no user logged into a desktop session.
I think you stopped drawing blanks when you posted this:
Quote:
Originally Posted by salsbst
Ok, after consideration, if you want to run Sage as a service and must run the MyHD encoder as an app, you should set the sage service *not* to autostart...
Quote:
Originally Posted by salsbst
I do start it in the tray, the recordings are done in the background. Does their scheduler work if no user is logged into the system? If so, then maybe I should be playing with it.
No it doesn't, you're doing the background recording thing...maybe (see below).

Quote:
Originally Posted by salsbst
Please convince MIT to make MyHD.exe able to run as a service with no logged on user.
I'll get right on it.

Quote:
Originally Posted by salsbst
You can't do that, or rather, I can't. Please prove me wrong, I'd be grateful.
I'll get right on it.

Quote:
Originally Posted by salsbst
No, it's not grabbing the sound card.
Good. However, this depends on how you have MyHD configured. I have it set to send audio to the soundcard's SPDIF output, not it's own, which is why this could be a problem for those of us who want to use MyHD directly as well. I reckon this depends more on how MyHD is configured than the commands you send it to start and stop recording. Do you have the background recording option set in MyHD? If not, give that a try--it might make a difference as to how MyHD starts up, but only when you're starting MyHD for each recording. When that happens, there is the tray icon, which will let you bring up the MyHD console and let you watch the video, but there is no way to get the sound output--so that is different. If, however, MyHD is already running and a scheduled recording goes off, it does not go into background mode, it stays in the foreground. This is why I think it may be worthwhile for you to fiddle with starting and stopping MyHD for each recording--this true background mode *may* be able to run within a service wrapper (but I'll admit, highly unlikely).

Quote:
Originally Posted by salsbst
You can't launch MyHD when the encoder isn't running if you want that MyHD session to be able to handle Sage recordings later on.
So...I'd have to stop MyHD, then start the encoder? It has to launch a new instance, it won't find an existing one? OK, I can deal with that, good to know.

Thanks again--

LDog
Reply With Quote
  #93  
Old 11-20-2005, 06:15 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
It's not that the encoder can't find an instance of MyHD, it's that MyHD won't know to look for an instance of the encoder. The encoder is a TCP server, and MyHD is a TCP client. Don't ask why, or at least don't ask me why.
Reply With Quote
  #94  
Old 11-22-2005, 02:14 AM
lonndoggie's Avatar
lonndoggie lonndoggie is offline
Sage User
 
Join Date: May 2004
Location: Encinitas, CA
Posts: 42
Quote:
Originally Posted by salsbst
It's not that the encoder can't find an instance of MyHD, it's that MyHD won't know to look for an instance of the encoder. The encoder is a TCP server, and MyHD is a TCP client. Don't ask why, or at least don't ask me why.
That does blow what's left of my mind. So MyHD polls for commands? Man...I would've assumed that MyHD just uses Windows messages, but I guess not.

I guess the MyIR app must be server it normally talks to...which means it can't be running or else it and your encoder will both be listening to the same port.

Anyway, if MyHD is a TCP client, if its server shows up it should be able to find it. You'd think. At least you can stop and start MyIR and MyHD still works. I think.
Reply With Quote
  #95  
Old 11-22-2005, 04:52 AM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
I suppose you may be right, lonndoggie. I am actually only repeating something that someone else said. I have never validated that MyHD will *not* find an encoder if the encoder starts after MyHD. I guess I'll have to try that.

BTW, work has been keeping me away from this, and I'm going out of town for Thanksgiving tomorrow, so...
Reply With Quote
  #96  
Old 11-22-2005, 10:28 AM
lonndoggie's Avatar
lonndoggie lonndoggie is offline
Sage User
 
Join Date: May 2004
Location: Encinitas, CA
Posts: 42
Y'know, as I think about it, this explains some of MyHD's behavior:
  • MyIR starts MyHD one minute before a recording (or so), and then the recording starts a bit later...no doubt the deal is that MyHD wakes up and starts polling for work, possibly at one minute intervals.
  • If MyHD wakes up and starts to record in background mode, and we're there and realize it's a repeat and we'd like to kill the recording and watch something else, we have to close MyHD to get it out of background mode (e.g., no sound), then restart it and change channels; after a minute or so, MyHD starts recording again (this time in foreground), which you can stop and go back to your channel without shutting down. No doubt the polling thing again.

This would seem to indicate that you can shut down and restart MyHD as needed.

EDIT: Ah, but that isn't the problem, it's starting and stopping the encoder. I can try that, with MyIR.

Happy Thanksgiving--

LDog

Last edited by lonndoggie; 11-22-2005 at 10:53 AM.
Reply With Quote
  #97  
Old 11-30-2005, 05:50 PM
AndyS AndyS is offline
Sage Aficionado
 
Join Date: Apr 2004
Location: Orange County, CA
Posts: 383
Any updates on this?

Andy.


EDIT: This is really just a bump - I'm not expecting any progress really........

Last edited by AndyS; 11-30-2005 at 06:01 PM.
Reply With Quote
  #98  
Old 11-30-2005, 06:43 PM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Thanks for the bump, I guess

No update. I'm swamped with work this week. Hopefully I'll have dug myself out of the hole by the weekend.
Reply With Quote
  #99  
Old 12-10-2005, 02:23 PM
ajuhawk's Avatar
ajuhawk ajuhawk is offline
Sage Aficionado
 
Join Date: Sep 2004
Posts: 330
Ping: Still swamped? I know I have been...but hoping you haven't been
Reply With Quote
  #100  
Old 12-11-2005, 07:17 AM
salsbst's Avatar
salsbst salsbst is offline
SageTVaholic
 
Join Date: Jun 2003
Posts: 2,592
Ugh, yes, still swamped. I'm starting to suspect that this may not happen in December .
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


All times are GMT -6. The time now is 10:47 AM.


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