|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#241
|
|||
|
|||
It works
Your latest version works. No more error message, the card is tuning on scheduled recordings from Sage and writing the files to the sage server. Whatever you changed fixed my problem.
|
#242
|
||||
|
||||
I'm happy to hear that it's working now. The MyHD records cleaner QAM than anything else that I've tested. I hope it works out for you.
|
#243
|
|||
|
|||
Hey, long time MyHD user here.
I've been using SageTV since Sep last year and it has great wife approval, except for the hassle of dealing with MyHD outside Sage. So your encoder seems like the perfect solution! I just need some help to get it working perfectly. I got it working somewhat. It records and displays MyHD like it should, but I'm having problems whenever I change channels from an hd channel to another hd channel. It works pretty good when I'm switching from a SD channel to an hd channel and vice-versa. Let me describe with a bit more detail. When I'm watching a sd channel and change to an hd one, I can see the channel change in sage, channel change in MyHD, MyHD starts recording and I see the video in sage. If I try to change to another hd channel, I can see the channel change in sage, MyHD stops recording and that's it! Sage hangs there, and MyHD never changes channel or starts recording again. Two interesting things I noticed: - If I open the log file after I do this channel change, there's no new entry there. It doesn't even show that MyHD stopped recording, even though it did! - Since sage is hanging there (not locked, just not showing anything), I usually just close it. When I do that, MyHD changes the channel and starts recording! And you see a change on the log file. It doesn't show an error, it just shows the other recording stopping and the new one starting. The time stamp is the moment I closed sage, not when I originally changed channels. So, my first guess was a timing issue, so I tried to play with all the timings. Since the recording stops just fine when I change the channel, I thought the most obvious choice would be postRecordDelayMilliseconds and postStopDelayMilliseconds. But I tried different settings and it never worked. I then tried the other two delays, but still didn't work. Any suggestion? Is it really a timing issue or something else I'm missing? Sorry for the long post! |
#244
|
||||
|
||||
Quote:
Also, could you set the log level in the config to debug (as per instructions above in this thread), then start the encoder and reproduce the problem, then post the log file? I think it's probably a timing problem, but the behavior of Sage locking the encoder makes me think it's a timing problem that is exposing a threading problem. The threading problem, if it exists, is likely to be a bug in my code. |
#245
|
|||
|
|||
Quote:
Quote:
Quote:
Oh, and an update, I'm having the same problem whenever I'm watching a channel and another shows starts. It stops recording, but the new recording never starts. So, while I wouldn't rule out a problem with channel change (I have "always tune channel" on, fwiw), it seems the problem is getting a recording to stop and another to start right away. Thanks for the help! If anything, this encoder shows how great QAM within Sage is! I might break and replace my MyHD with a HD Homerun ... |
#246
|
|||
|
|||
Here's the logfile.
You can see that after I change the channels, logfile gets stuck with the message "Attempted to delete MyHD hard link. Sleeping for 75 milliseconds before trying again." and the hard link never gets deleted. Let me post part of the logfile showing the moment I tried to switch channels: Code:
2007-02-03 20:11:05,689 [272848] DEBUG com.stusals.sagetv.encoding.Encoder [Process] - GET_FILE_SIZE F:\Sagetv\Cops-FloridaHeatSpecialEditionNo2-510801-0.mpg 2007-02-03 20:11:05,892 [272848] DEBUG com.stusals.sagetv.encoding.Encoder [Process] - GET_FILE_SIZE F:\Sagetv\Cops-FloridaHeatSpecialEditionNo2-510801-0.mpg 2007-02-03 20:11:05,892 [272848] DEBUG com.stusals.sagetv.encoding.Encoder [Process] - GET_FILE_SIZE F:\Sagetv\Cops-FloridaHeatSpecialEditionNo2-510801-0.mpg 2007-02-03 20:11:05,892 [272848] DEBUG com.stusals.sagetv.encoding.Encoder [Process] - GET_FILE_SIZE F:\Sagetv\Cops-FloridaHeatSpecialEditionNo2-510801-0.mpg 2007-02-03 20:11:34,267 [272848] DEBUG com.stusals.sagetv.encoding.Encoder [Process] - Received empty message from SageTV. 2007-02-03 20:11:34,267 [275724] DEBUG com.stusals.sagetv.encoding.Encoder [Process] - SWITCH 262|F:\Sagetv\CSIMiami-Nailed-515682-0.mpg 2007-02-03 20:11:34,267 [275724] DEBUG com.stusals.myHD.encoding.MyHDEncoder [Process ProcessRequest {Invoke} StopRecording] - Enter 2007-02-03 20:11:34,267 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - About to stop recording. 2007-02-03 20:11:34,267 [275724] DEBUG com.stusals.myHD.encoding.Messenger [Process ProcessRequest {Invoke} StopRecording SendMessage] - STOP 2007-02-03 20:11:34,267 [275724] DEBUG com.stusals.myHD.encoding.Messenger [Process ProcessRequest {Invoke} StopRecording SendMessage] - Pausing for 150 milliseconds. 2007-02-03 20:11:34,423 [275724] DEBUG com.stusals.myHD.encoding.Messenger [Process ProcessRequest {Invoke} StopRecording] - Pausing for 1000 milliseconds. 2007-02-03 20:11:35,423 [275724] DEBUG com.stusals.myHD.encoding.Controller [Process ProcessRequest {Invoke} StopRecording] - Stopped recording s:\myhd\0203-201104.tp 2007-02-03 20:11:35,423 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - Stopped recording. 2007-02-03 20:11:35,423 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - Attempted to delete MyHD hard link. Sleeping for 75 milliseconds before trying again. 2007-02-03 20:11:35,501 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - Attempted to delete MyHD hard link. Sleeping for 75 milliseconds before trying again. 2007-02-03 20:11:35,564 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - Attempted to delete MyHD hard link. Sleeping for 75 milliseconds before trying again. 2007-02-03 20:11:35,642 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - Attempted to delete MyHD hard link. Sleeping for 75 milliseconds before trying again. 2007-02-03 20:11:35,720 [275724] DEBUG com.stusals.myHD.encoding.Job [Process ProcessRequest {Invoke} StopRecording] - Attempted to delete MyHD hard link. Sleeping for 75 milliseconds before trying again. Thanks |
#247
|
|||
|
|||
Help?
Can't get this to work and I'm considering the HDHomerun right now. Thanks, |
#248
|
||||
|
||||
Is F: a local drive or a mapped drive?
What OS is running the encoder, and if F: is on a different machine, what OS is that? |
#249
|
|||
|
|||
It's a local drive. I'm using XP.
Thanks |
#250
|
||||
|
||||
Do you by any chance have s: defined in SageTV as a recording drive? It looks like it's hung trying to delete the ghost copy of the recording from the s: drive, as if Sage might have locked it.
|
#251
|
|||
|
|||
Nope. Checked that last night and the only sagetv folder I have is F:\Sagetv.
Thanks! |
#252
|
||||
|
||||
Ok, here's another theory. I seem to remember when I was experimenting with the timings that one problem came up which I don't fully understand, but I'll share it with you anyway, since it may be the same problem you are experiencing.
Basically, there appears to be a point, after SageTV asks the encoder to start recording something, that if it does *not* see a file where it expects to find it, it will do "something weird". I'm not really clear on what the weirdness is, but I seem to remember that sometimes it seemed that the hard links were becoming undeletable if SageTV had too long to wait before recordings started. Anyway, food for thought.... But my main point: what happens if you schedule two recordings for the MyHD back to back on different channels -- as opposed to changing channels on live TV? Could you run that scenario in debug mode? I didn't realize it, but it seems that the live TV channel change issues a "SWITCH" command to the encoder, while back to back recordings issue "STOP" then "START". It may be that there is a bug in my SWITCH logic. |
#253
|
|||
|
|||
having problems getting this to work
I assume that this product will allow me to use SageTV and its awesome TV guide to record shows on unencrypted QAM and OTA using my myHD MDP-130 card. (Although it also sounds like I need to watch the recordings in myHD’s terrible software.)
I would absolutely love to get this working but I am having problems. I have read the wiki and this humongous forum thread but I am stuck. SageTV does not seem to be communicating with the stusals app and the myHD is not recording anything. When I tell Sage to record a show, it does nothing. When I launch the stusals program and myHD, the two stop responding to input. No channel tunes in. No file is recorded. I cannot quit the myHD app. SageTV continues to work but not myHD. I don’t really understand how this is supposed to work so im not sure what to try next. I assume that to get this to work you need three things running: SageTV, stusals application, and myHD software. I further assume that you only run the SageRecorder software once to get the config data. Other symptoms/facts: I tried to follow the wiki instructions. I set the encoder to be HTPC:10101. I added an M drive to my PC and then enabled it for file sharing so I could write new files to it. I made myHD record to the M drive and I added the M drive to SageTV as a recording directory. The stusals log file has 2 lines: myHD encoder starting andWhen I look at my video sources in Sage, I see: MDP100 Capture on HTPC:10101 TV tuner Functioning: false Network encoder: true Input type TV tuner RF channel NA Cable/Antenna Cable EPG lineup: Comcast digital [ use existing lineup? No lineup?] Tuner control NA When I try to play a channel, Sage tells me “ERROR -10: No encoders can tune the selected station”. SageTV does not seem to see the encoder as active. IT doesn’t seem to be talking to stusals. After playing with this for a while, I am confused about the whole channel mapping issue – getting a channel listed in Sage to map to a channel in the myHD. But I may have a problem evern before that since Sage does not seem to think it is functioning. Any help is MUCH appreciated |
#254
|
||||
|
||||
Quote:
Quote:
Quote:
Quote:
See if you can set the MyHD encoder to debug-level logging (instructions for editing its config file to do this can be found above) and repeat your attempt, making extra sure that you are allowing the encoder to launch MyHD and that the MyIRC or whtaever its called isn't running. |
#255
|
|||
|
|||
First of all, thanks so much for your help salsbt!
Quote:
Quote:
Once I disabled myIRC, I managed to get things working but I had some confusion with the network drives. In fact, it ended up erasing a bunch of my files since I was already using S:/ and S:/myhd. Just to be clear, Sage should point to S:/ and myHD should point to S:/myhd, correct? So if I put my Sage files into S:/sagefiles then myHD needs to point to S:/sagefiles/myhd? The reason I ask is that my Sage is using two recording directories: E:/sageTV and S:/sageTV but myHD is pointing to S:/myhd. Even though it seems to be working, Im wondering if I messed things up there. After looking at the files, I am confused about what is actually happening here. It appears that myHD is creating a .tp file with the HD transport stream and then someone is converting that into another file (Windows XP is hiding the extension from me) which is played back in Sage? Can you elaborate a bit on how this "network encoder" works in this regard (or point me to where you already did ? Quote:
I assumed the formula: VirCH = PhyCh + SubCh with MinCh being unused. And you want to map Sage's channel guide to a unique VirCH |
#256
|
||||
|
||||
Glad we're making a slight bit of progress... I don't have a whole lot of time tonight, but I want to explain the s: drive weirdness and the notion that "someone" is creating a separate file that Sage uses.
You're on to something. It's true. Let's back up a bit and talk about the limitations of MyHD's recording features. The MyHD card doesn't provide a usable API to control it directly. As such, the only way I found to get it to record on demand as Sage needs is to leverage its app, MyHD.exe. MyHD.exe provides an API that can be used to control the cards recording function, but it does so strangely through a bizarre TCP/IP interface. There are attributes of what we would like to call a recording that MyHD.exe doesn't expose through its API. In particular, germane to SageTV, is that MyHD.exe doesn't allow a specification of the file name/path that the recording will use. This is the crux of all of the s: drive weirdness in the encoder. So, MyHD is determined to record to a fixed path always. Meanwhile, the SageTV network encoder API depends on the idea that SageTV gets to specify that path to the recording. There's a disconnect here. I solved it, albeit awkwardly, by using a relatively unknown/unpublished feature of Windows called "hard links". To understand what hard link is, one must understand how Windows file system (NTFS) was grafted onto the POSIX file system that grew up with Unix. To make a long story short, a file is a file is a file, but there can be multiple paths to the file. Windows doesn't often (ever?) expose the fact that a file can exist with multiple paths, but it can. Windows (Microsoft) prefers to use the concept of a "shortcut". This is more of a soft link, but even then, the analogy and congruence with POSIX breaks down a bit. Suffice it to say (please?) that a hard link establishes a secondary (although there could be more) path to a single file on a disk. I'm using the hard link feature to (a) allow MyHD to record to the file/path it wants to while (b) also exposing the same file through the path that SageTV wanted it to be recorded to in the first place. Side note: One of the factors that went into the design and implementation decisions around this issue is that SageTV supports recording to multiple paths, and that it chooses, for our purposes arbitrarily, which path will be used for any given recording. So, we have SageTV wanting to throw pretty much any path at the encoder and expecting the encoder to record to that path. We have MyHD having a static path and file name (based on time/date) that it wants to use for each recording. The solution is a hard link. When the encoder begins a recording, it lets MyHD name the file and use its normal path. It then establishes a hard link at the location that SageTV has specified. At this point, there is one file (there is always only one file, BTW), but there are now two paths to that file. MyHD happily continues to record to the file, and SageTV happily (we hope) sees the file in the place it wanted the file to be. When the recording is ended (upon SageTV's STOP request), the encoder deletes the original file path (the MyHD version of the path), but since there is still a path defined for the SageTV view of the world, the file isn't deleted. Instead, the file now becomes exclusively "pathed" at its SageTV-specified location, and all is good with the world b/c SageTV is good at managing and playing back files. Everyone is happy. Right? Well, it seems not always. Problem #1 is that this is a complicated process for us all to grok. But even then, once we get over the mental hurdle, there are technical challenges. Problem #2 is that MyHD and SageTV are both a little finicky about the creation and destruction of the file. Some of the timing problems that you can read about in the above thread are, I believe, associated with the timing of establishing the hard link for SageTV and then later removing the hard link for the MyHD path to the file. Problem #3 is that hard links are sketchily supported in Windows, and that older versions of Windows have less support for them. Problem #4, and this is the one I'll focus on below, is that hard links only work across the same physical disk. Ok, that's background. What's with the s: drive? The concept of the "s:" drive (it's just the default drive letter, any would do) is a means to give MyHD access to the appropriate physical drive even when SageTV may choose from a multitude of drives for any given recording. MyHD is told that it always records to the S: drive, so it is happy. SageTV, meanwhile, gets to specify a UNC path to any number of drives. The encoder is supposed to take care of mapping the UNC path that SageTV wanted to s: (and then deal with the hard link nightmare). Bottom line: 1) Whatever drive letter you choose, SageTV should be unaware of it. SageTV should continue to see the world as either UNC paths or local drives 2) MyHD needs to be configured to record to this "imaginary" drive letter. 3) The encoder should take care of establishing and unestablishing mappings between the UNC paths (or local paths), as well as the hard links. You are right that there appear to be two files during any given recording. It's one file. When the recording ends, the encoder *should* be getting rid of the MyHD path to that file (which thus gives SageTV exclusive control over the only remaining path to the file, thus making it a normal SageTV recording). I'm not really sure that I've explained this well enough, but I hope it's a good starting point. I hate that all of this googah was necessary to make the MyHD card useful to SageTV, and I seriously considered never releasing the encoder because of the difficulty associated with explaining it and configuring the darned thing. It's way more complicated and error prone than it should be. If only hardware vendors (ahem, MIT) could focus their efforts on providing clean APIs to their devices instead of bad software, then we'd be in better shape. |
#257
|
||||
|
||||
Hah, I guess I became a SageTVaHolic at 2500 posts? (Pats himself on the back).
Quote:
1) I don't entirely understand MyHD's file format. 2) I never figured out how to tune a subchannel (other than the first subchannel on any given channel) through MyHD's TCP/IP api. So, without knowing how to send a subchannel request to MyHD, I figured out that I could avoid the issue by making sure that MyHD was in "virtual" channel mode. The main idea here is to make the channel tunable from SageTV (obviously?). There are a lot of ways to skin this cat, and this stuff may be unimportant to you, but the main thing to understand is that the encoder can't do "dots" or "dashes". It can send a main channel number, and whatever it sends, it must be a number that causes the MyHD app to tune the channel you wanted it to tune. I'm a QAM sufferer, so I have all sorts of wacky subchannels in my life. I found that I could tweak MyHD's virtual channels in order to make each important subchannel tunable through the virtual channel mechanism. Don't get too hung up on the encoder's support for remapping channels through its config file. It's a level of indirection that is built into the encoder, but is probably unnecessary. SageTV has better support for remapping channels from the guide to channels that the encoder understands than it did when I designed the encoder. The main thing to focus on is that you want to be able to tune the channels you care about in MyHD without using subchannel "dot" indications, and once you have that, you want to make sure that SageTV is sending the appropriate channel numbers to the encoder. |
#258
|
||||
|
||||
Quote:
If you're still not sure of how to go about this, post the paths that SageTV (your SageTV server if you have multiple SageTV machines) uses for recordings, as well as, for each recording path, whether it's local to the SageTV (server) or remote. I'll help you understand how that should relate to the horrid s: drive. Is your SageTV (server) on the same box as the (dreaded) encoder? Are the recordings local to the same machine? That would be the simplest case. The architecture and config options support more complicated scenarios where different boxes do different things, but it's fairly straightforward if it's all one box. |
#259
|
|||
|
|||
Quote:
Awesome - that makes perfect sense. At least most of it 1) Can there only be 1 file in the /myhd directory? I had a bunch of myHD recordings in there and they all got wiped out 2) I am still confused about how the myHD-only transport file gets converted into an .mpg file that Sage can understand. I also noticed that watching HD via this new Sage method totally pegs my CPU whereas before, using only myHD, it barely used my CPU. Am I correct in assuming that someone is encoding the myHD content into an mpg file and then using software (not the myHD hardware) to decode and show the file? The myHD has some encoding options (such as size like 320x240) that I never understood/used before. Am I using them now? 3) Since I have two physical disks, could that cause a problem if Sage tries to use the E:/ drive while myHD continues to use the S:/ drive? It would seem that your hard link would fail in that case? Or do the links work within a single PC no matter how many disks you have? I think that may have been what you meant. closing And this is more than a little progress. I think my system is usable and quite wife-friendly now and I consider that HUGE progress. I also have a new respect for how much you must have put into this to get it to work (and I continue to be annoyed that Sage - who I have paid $$ to - has not gotten the MDP130 to work). Thanks again for your help. You are a rockstar. |
#260
|
|||||||
|
|||||||
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|