Ongoing Mixed workstation and htpc (1 Viewer)

huma2000

Portal Pro
December 1, 2006
123
3
Murcia, Spain
Home Country
Spain Spain
Well, here is my actual project:

The machine:

Chase: NOX Coolbay 25cm
MotherBoard: M2N32-SLI Deluxe/Wireless Edition
CPU: AMD64 X2 4600+ AM2
RAM: 2 x 1 GB DDR2 533 Kingston
Storage: 1 x 320 GB Segate SATAII, 2 x 250 GB Segate SATAII, 1 x 120 GB Western Digital 7200rmp IDE and a Plextor DVD-RW PX-740A
Graphics: Club3D Nvidia Geforce 7900GS 256
Sound: ADI 1988B 8-channel High Definition Audio CODEC
Capture card: Hauppauge HVR-1300
Input: Wireless Keyboard+Mouse and the hauppauge 45 keys remote
Output: Currently have 2 attached 19 inch TFT (Benq FP91G+ and LG Flatron L1952S-SF) and the tv set for grapichs, a 5.1 for rear audio and the audio/video sender for front audio
Others: Conceptronics wireless audio/video sender and Unitek Alpha 800xD SAI
OS and software: Windows XP Professional SP2, MediaPortal 0.2.2+last SVN, AutoIT, MultiRES and Girder
Drivers: Forceware 93.71 and Hauppauge 33c

The idea:

My idea is simple: Have a pc that send the video and the audio througth the wireless audio/video sender while I'm continue working at the pc using it as main workstation.

Knows limitations:

-No more than 2 displays at one nvidia card, so one of the tfts must be disable to use the tv output -> possible workarround using a capture card with tv output. (not tested atm)
-DirectX aceleration only on one desktop -> Posible workarroud using Windows Vista, since all the graphics at vista are renderer on a diferent way, they are rendered as 3d surfaces, so 3d must had been to be implemented on all displays (not tested atm)
-Media portal not able to redirect the program sound effects and radio sound output to another device instead the main directsound device -> Workarround unknown

Hardware configuration:

Nothing new to do with hardware, only mounting everything inside the chase without breaking nothing ;)

Windows configuration:

I've installed a Windows XP professional SP2 modified with nlite to remove unnecesary components and services, but any windows xp must work at the same way.
The only important thing is to set the power option to an always on sistem and to never shutdown the monitor.

Nvidia configuration:

Here we must do some things:

At nvidia control panel:
-We must force the tv detection. This option is under the monitor section, subsection Change desktop settings. We click on my monitor isn't on the list option and then activate it there (maybe the option isn't called exactly like that, I've the control panel in spanish), a restart must be needed.
-Now we set the two display as folowing: LCD panel as main display and HDTV as secondary one. We set it into dualview mode.
-Also at nvidia control panel we go under the video an television section, subsection size and position of the television and set it fine for the 720x576 resolution. On the same section, under the color subsection we can correct the volor we get at the tv set.

Now, at the nview desktop manager config panel we must configure the folowing things:
-At windows tab we must set the 'open windows on' option pointing to our primary desktop. This will that apps loads at secondary display. Here we must also set the 'repositioning dialog boxes on' option to 'Move to application display'.
-At hotkeys I created one pointing to the 'Show display scheme option'.

Mediaportal configuration:

At media portal we must go to main config section and check that we have the following options ticked:

-Start mediaportal in full screen
-Autohide mouse cursor in fullscreen when idle
-Use exclusive DirectX mode

And we must have unticked:

-Use a separated thread to render the GUI

All the rest options can be tweaked as we want.

Then at music (under playes settings), dvd (dvd codec->audio renderer), tv (audio renderer) and movies (movie player->audio renderer) sections we must redirect the audio renderer to the secondary sound output.

MultiRes configuration:

Simply install it and let it autostart with windows.

AutoIT configuration:

For open MediaPortal on secundary display we must use the folowing script (is based on the one made by jackelectronics) :

Code:
#NoTrayIcon
$MP_Path = "C:\Archivos de programa\Team MediaPortal\MediaPortal"
$MR_Path = "C:\Archivos de programa\MultiRes"
RunWait ("rundll32.exe nvcpl.dll,dtcfg setview 1 DualView DA TA")
RunWait ("RunDll32.exe NvCpl.dll,dtcfg Primary 2")
RunWait ($MR_Path & "\multires.exe /1:1280,1024,32,75 /2:720,576,32,50", $MR_Path, @SW_HIDE)
Beep(500, 100)
$MP_PID = Run ($MP_Path & "\MediaPortal.exe", $MP_Path)
WinWait ("MediaPortal - Basic home")
ProcessSetPriority ($MP_PID, 4)
RunWait ("RunDll32.exe NvCpl.dll,dtcfg Primary 1")
Beep(1000, 100)
While (ProcessExists ($MP_PID))
Sleep (1000)
WEnd
RunWait ("rundll32.exe nvcpl.dll,dtcfg setview 1 DualView DA AA")
Beep(750, 100)

You must change MP_Path and MR_path to mach the ones on your system.
The WinWait line must also be modified to match with your MP windows title.

The RunWait ("rundll32.exe nvcpl.dll,dtcfg setview 1 DualView DA TA") is for auto urn on your tv as second monitor, so you doesn't need to do it manually before open mp and the RunWait ("rundll32.exe nvcpl.dll,dtcfg setview 1 DualView DA AA") line turn of the tv and on my secondary monitor. If you only have one monitor conected to your pc the line must be write:
Code:
RunWait ("rundll32.exe nvcpl.dll,dtcfg setview 1 DA")
The DA parameter refers to the first digital monitor on your sistem on a multi monitor display, AA to the first analogic, TA is the fisrt tv. AB, DB and TB will refer to the second digital, analog and tv set.
Also is posible to set the screen resolution usng the nvcpl.dll api, se multires is not necesary to do the wrok ;) (I'll post the way if anyone want it).

The beep lines are only for control, using it I know were the script is and when mp is ready, can be safetly removed if you want.

When you have the script writen into the autoit scite script editor, you must compile (pressing F5) the exe and place it where you want (In the mediaportal folder in my case).

Girder configuration:

Working here atm. The idea it use girder to open mp using the remote, if anyone know another way, please said to me.
The only thing You must do is asociate one of your remotes butons with the autoit script, but atm I'm having some iusses using my hauppauge remote and girder.

Your comments and idea will be welcome!!! (also if you see any gramatical error say to me please).

***I'll post more info about the project when I've some time to do***
***I'll post image when I get a bit of web space***
 

druid9

MP Donator
  • Premium Supporter
  • December 31, 2006
    255
    9
    65
    Thanks for the guide Huma2000
    I have been experimenting with this method, and it works to a point. The display properties don't seem to switch back to computer monitor as primary display when I exit MediaPortal, and also some applications seem to want to open on the secondary display when media portal is open. I am positive I have the script correct, though I don't quite undestand what "The WinWait line must also be modified to match with your MP windows title." means, maybe this is causing the error.

    I think that what is happening is that the script changes the primary display to the TV, launches MediaPortal then waits until MediaPortal exits before putting it all back - is this right? If so, why would some apps open on the secondary display (now the computer monitor), and some on the Primary (now the TV)?

    Any advice appreciated, and congrats on a great guide.

    BTW have you a Creative soundcard, if so the kx driver project is worth a look to enable splitting audio output on one card.
     

    quiller

    Portal Pro
    November 28, 2006
    90
    1
    40
    Nebraska
    Home Country
    United States of America United States of America
    Good guide, but it seems like a lot of unnecessary work, considering the availability of other options. If you have a spare $50, pick up a really old desktop or notebook (enough to run XP, nothing more) and use Remote Desktop. I'm using a 650mhz IBM Thinkpad as my "desktop," then connecting over RDP to the HTPC on a second account. Grab Sala's Terminal Server patch and you can run a local account (with MP running) and a remote account (your "workstation" account).

    The benefit? Really cheap way to take a powerful machine (which yours is) and multi-task. Plus, if you add a little DNS magic, you can remote to the same account anywhere you have an Internet connection.
     

    huma2000

    Portal Pro
    December 1, 2006
    123
    3
    Murcia, Spain
    Home Country
    Spain Spain
    Hi,
    I'm working to solve the iusses I've with that method (my dual monitor view return as 1:2 and not as 2:1 as I have, think is a limitation of the command line arguments, but not sure, going to test some more commands) and also testing it under Vista. I'll expand the guide soon with the vista tests and the changes I've made to the scripts. Also i'm searching the way to split all mediaportal audio from my pc audio (maybe a third party program??).
    And need a good guide for codecs (who know any??), mines are not working as good as it must (I'm using k-lite pack).

    I'm going to explain you the script a bit:
    It changes the primary display to tv, wait till mp is loaded and them it change back to your monitor.
    To detect when mp is loaded you must use the winwait command as following:
    WinWait ("MediaPortal - Basic home")
    where "mediaPortal - Basic home" is the exact title of your first media portal window.
    Other usual value for it could be "MediaPortal - Home".
    That line is important because if is not set correct all apps are going to open on tv, so you cannot work without disturbing tv shows.

    Also I know there is other solution to do it, but... why have 2 pc using electric power when I can do it with one only? and all the config is done in about 5 minutes, and is cheaper than putting other pc, but anyway I'll try your way also, is interesting test the terminal server patch :D
    Also the need of not using another pc came form wires, I cannot put wires at that home, and wireless card is used to inet so I will need to put another wifi card or a router to conect to my pc to the secondary one using rdp.

    Excuse my bad english :oops:
     

    druid9

    MP Donator
  • Premium Supporter
  • December 31, 2006
    255
    9
    65
    Huma2000, thanks for the reply and your English is far better than my Spanish.
    To split the audio in my PC I use the kx Driver for my Soundblaster Audigy 2 ZS. This allows me to allocate the audio output from nearly any application (Quicktime is an exception) to particular output connectors on the card. I have digital out for my music (important) and analogue out for the kids games (not important). If you have a Creative card this is easily the best solution I have found and works flawlessly.

    Thanks for the explanation on the script, I think I understand now. To make it a little clearer, you need to open MediaPortal in a window (not in full screen) take down the title of the window and use that in the script. Then change MediaPortal back to open in full screen in the setup. This was where I was getting lost, but I might just be a dummy - works OK now.

    Be interested in how you solve the various issues - they are very similar to my own. For example, when listening to music, I did not want to be disturbed by gunfire from my son on the Road to Hill 30. kx driver fixed that. Want the kids to be able to play games while i view photos on the telly, I think your script solves that.

    Incidentally running wires is a pain. My PC is 7 metres from the TV and our family room has a tiled floor on a concrete slab. Last time I went in the ceiling I put my knee through it so the wife won't allow me up there any more. Solved this one by running some conduit around the wall (tasteful of course).

    Anyhow, keep up the good work! Anything I can help with please ask - not much of a prgrammer, but am willing to test and try various things.
     

    druid9

    MP Donator
  • Premium Supporter
  • December 31, 2006
    255
    9
    65
    Just another quick thought,

    Most of the kids games switch to 640x480 fullscreen on opening, till they get past the menus. This obviously extends the game screen on to the TV, and interferes with MediaPortal.

    Can you think of a way around all of this. I am thinking of something along the lines of using Nview properties for the game - will give it a try and report back.

    Might seem odd to have kids playing games while I am using MediaPortal, but I use it for whole house audio, and am often sitting in another room while they do their thing. I am also investigating using a wireless unit a bit like yours to distribute video and audio to another room.
     

    druid9

    MP Donator
  • Premium Supporter
  • December 31, 2006
    255
    9
    65
    OK solved the games issue, just need to ensure that the games shortcut forces the game to run in a window e.g. for Sims 2 add -r1280x1024 -w.

    This means that the game runs on the computer monitor, and MediaPortal chugs along on the TV.

    Not sure how performance will go - will test and report back any problems. Will probably depend on the game I guess.
     

    huma2000

    Portal Pro
    December 1, 2006
    123
    3
    Murcia, Spain
    Home Country
    Spain Spain
    My sound card is manufactured by Analog Devices and is integrated at motherboard, so kx drivers don't help :( I'm searching any other way...
     

    druid9

    MP Donator
  • Premium Supporter
  • December 31, 2006
    255
    9
    65
    Bad News I'm afraid, now getting errors which say that transparency temporarily disabled because another DirectX application is open - cant even open Word on my PC Desktop - seemed to work this morning, wonder what has changed.

    Same error running Sims 2 in a Window as well. Haven't changed anything in MP setup (I don't think)
     

    Users who are viewing this thread

    Top Bottom