INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Detatch Display On Startup  (Read 3820 times)

benjah

  • Recent member
  • *
  • Posts: 5
Detatch Display On Startup
« on: December 09, 2009, 12:52:20 am »

Hi Guys,

Have been trying to figure this out for days with no luck. I have MC connected to a machine with 2 displays. 1 monitor and 1 TV. OK so big deal.

So I am trying to get MC to start up automatically in Standard View with the Display automatically detached  full screen on the second (TV) monitor. With the GUI running on my PC Monitor.

Seems that each time I close MC and start again the Display window automatically appears inside the GUI and I need to right click and "Detach" it each time.

Any help you can give would be great.

Thanks again
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #1 on: December 09, 2009, 08:21:25 am »

I bet you can do it with automation commands.  Actually, that'd be pretty handy for my video wall use of MC too... Hmmmmm....
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #2 on: December 09, 2009, 08:48:37 am »

ive done that for a while using the automation command, using girder to detach after mc started up.
which reminds on how nice it would be to have an 'on startup'  in the scheduler. i would use the scheduler then..  8)

 :)
gab

btw: this is the command
mc14.exe /mcc 10037,1
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #3 on: December 09, 2009, 09:04:58 am »

Gab, do you happen to know how nPlaylistID is enumerated?  Is it just sequential in display order starting from 0?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #4 on: December 09, 2009, 09:17:30 am »

Gab, do you happen to know how nPlaylistID is enumerated?  Is it just sequential in display order starting from 0?
i have no idea.. would supprise me if it started from 0. i just made a few. they got these id:
playlistid==657366182,=154744862,=447186622,=714511475


 :)
gab
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #5 on: December 09, 2009, 09:27:09 am »

Nevermind... Doof figured it out.

I have a Video Wall at the office that runs a set of different videos and image slideshows.  This is accomplished on the back end with three computers running MC, each of which is a "window" displayed by the video wall software on the main computer desktop.  It works great.  The only problem is that when power goes out for an extended period (longer than my very large UPS can handle), it shuts the whole thing down until I can get down there and re-start everything.

So, I just wrote a little Windows Script that does the following actions:

1. Opens MC and brings it to the front.
2. Detaches the display.  It goes fullscreen automatically if that's how it was left last time it was open.
3. Sets the Continuous mode to "Playlist".
4. Plays a specified playlist, based on it's ID.

This should be great!  I'll just need to put my different assets in the Playlist specified, and then run this script on login via the Windows Task Scheduler!

To use this for yourself, simply copy/paste the text below into a text file and change the extension to ".wsf".  Then, when you double click the script, it will run and do these commands.  There are comments in the script that describe what each step is, and has a link to how to change the playlist ID to something useful for you.

Code: [Select]
<package>
   <job id="vbs">
      <script language="VBScript">
         set WshShell = WScript.CreateObject("WScript.Shell")
         WScript.Sleep 100
'Launch MC and bring it to the front
         WshShell.Run("""C:\WINDOWS\system32\MC14.exe"" /START")
         WScript.Sleep 1000
'Detach Display
         WshShell.Run("""C:\WINDOWS\system32\MC14.exe"" /MCC 10037,1")
         WScript.Sleep 100
         'Set Continuous to Playlist mode (1 is off, 2 is playlist, 3 is song)
         WshShell.Run("""C:\WINDOWS\system32\MC14.exe"" /MCC 10006,2")
         WScript.Sleep 100
         'Play the Playlist named by the nPlaylistID int variable.
         'See this thread for more info: http://yabb.jriver.com/interact/index.php?topic=10894.0
         WshShell.Run("""C:\WINDOWS\system32\MC14.exe"" /MCC 30007,709743944")        
      </script>
   </job>
</package>
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #6 on: December 09, 2009, 09:46:48 am »

im sorry, gues i misunderstood the question.
what i was wondering, you do have several detached displays on your video wall, havnt you? with a display for different zones. does this also work to get the displays for the different zones?

 :)
gab

edit: to make my question a bit clearer, i know how to start display in an other zone, but when yoy do that for several does it really work? just curious
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #7 on: December 09, 2009, 10:16:51 am »

im sorry, gues i misunderstood the question.
what i was wondering, you do have several detached displays on your video wall, havnt you? with a display for different zones. does this also work to get the displays for the different zones?

No, actually.  It is more complicated than that.  Unfortunately, running them all from a single machine doesn't work for technical reasons.

The video wall is made up of 8 Samsung 1080p 42" LCD TVs.  All of these are connected to a single "server" Windows machine, and appear to that machine as effectively one gigantic 7680x2160 monitor.  This works well, except that if you try to run video on it, you can't "cross" the monitor borders with any "accelerated" content, such as playing video.  If you do, framerates plummet to the floor.  You can imagine why!  Scaling a 1080p video up to double, or triple, HD resolutions is no simple task.  All of my source video basically HAS TO be 1080p, or else it looks terrible on the high-resolution display.

The system has a set of input cards, which accept up to 4 external HD inputs (either via component, VGA, or DVI), and 8 external SD inputs (composite or S-Video).  These inputs run through a hardware scaler on the cards, which allows you to "stretch" the content across the monitor boundaries.  The server PC has a special software application that allows you to set up virtual "windows" on the desktop for these displays.  However, in order to use these hardware scalers, you MUST feed the content in through these inputs.  Anything running on the server computer itself does not run through the scalers.  This is fine for things like image slideshows (and I have one fullscreen slideshow that runs on MC on the server machine, to serve as a changing "background" for the rest of the display), but it does not work for 1080p video content!

So, I have three separate computers running (2 windows machines and one Mac) that feed into these HD inputs as their second monitor.  The Mac just runs PowerPoint or Keynote, typically.  It's secondary "monitor" is plugged into one of the four HD inputs on the server machine, and I keep the display "mirrored".  The two windows machines are instead set to extended desktop mode, with their secondary "monitors" plugged into the HD inputs on the server machine.  The primary display for all three of these machines is connected to a KVM in my back-room booth where all of this crap lives.  The two windows machines run MC's main UI on the primary display, so that I can control what is going on without people seeing it on the Video Wall, and the video wall content runs in a detached display that I moved over to the "secondary monitors" and set fullscreen.

It works great.  The best thing is that MC is so stable that it regularly runs for 60-90 days without stopping or rebooting or even exiting the playlist.  Whereas I have to go down and restart PowerPoint on the Mac every 5-10 days or so (and PowerPoint on the Mac is FAR more stable than PowerPoint on Windows, which we tried at first).  About the only thing that shuts down the "MC Machines" is power outages!
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #8 on: December 09, 2009, 10:26:31 am »

edit: to make my question a bit clearer, i know how to start display in an other zone, but when yoy do that for several does it really work? just curious

Actually, yes, this does work fine.  Originally we had it all set up on the server machine, and MC was running with 8 separate detached displays and 8 separate zones.  This worked fine as long as we didn't "cross" the monitor boundaries (one detached display per monitor).  At one point on that machine, I actually had 16 zones with 16 separate detachable displays (for different configurations of the content).  You could run them all at once and MC wouldn't miss a beat!  I even built a special skin for MC where all of the detachable displays were completely borderless so that they could just look like they were "floating" on the desktop on the Wall.

That was never the original plan though.  We NEEDED to be able to scale video across multiple monitors.  That was the whole point!  We only set up the 8 different zones (one per monitor) because the vendor who sold us the system didn't explain the hardware scaling issue, and told us we could just run our video directly off of the box itself.  This didn't work at all.  Not because of MC, but because the video drivers for the output card couldn't handle the scaling of video content across the displays (which is common).  It actually caused quite a problem until I could scrape together money for the separate computers, and we were stuck using only photo slideshows on our fancy new video wall, which didn't make management too happy.

It is all solved now, though.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #9 on: December 09, 2009, 12:10:19 pm »

thanks.. i remember the original setup.. thought it was amazing enough  :o

 :)
gab
Logged

benjah

  • Recent member
  • *
  • Posts: 5
Re: Detatch Display On Startup
« Reply #10 on: December 10, 2009, 08:12:08 pm »

Thanks for your help guys. I'm goin to try out the script now will let you know how I go! My other.....unrelated query is to do with the scheduler.

I have scheduled several smartlists of music to play throughout the day eg 8:00am, 12:00pm, 4:00pm, etc using the scheduler.

Problem is that if the machine crashes or i need to restart and it starts in between those times it won't know which palylist it should be playing.

Is there any way to get the scheduler to do this?  I guess my other option is to set a default playlist on startup (as you have mentioned here) and wait for it to kick into a scheduled one.

Thanks again for your help
Logged

benjah

  • Recent member
  • *
  • Posts: 5
Re: Detatch Display On Startup
« Reply #11 on: December 11, 2009, 01:11:46 am »

Thanks For the script Glynor working well,

Now how would I apply the script to specific zones to start the playback of a specific playlist in a specific zone on startup

. I have tried what it says here

http://wiki.jrmediacenter.com/index.php/Media_Center_Core_Commands

but having no luck
Logged

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #12 on: December 11, 2009, 05:21:36 am »

so you tried to use
mc14.exe /mcc 10037,16777217
mc14.exe /mcc 10037,33554433
mc14.exe /mcc 10037,50331649

for zone 0, 1, 2
i just tested it and it seems to work.

 :)
gab
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #13 on: December 11, 2009, 09:39:37 am »

so you tried to use
mc14.exe /mcc 10037,16777217
mc14.exe /mcc 10037,33554433
mc14.exe /mcc 10037,50331649

/mcc 10037 is the Detach Display command.  A question... I don't fully get the bitwise masking.  What would I do if I wanted to do the equivalent of  /mcc 10037,-1 (toggle Detached Display), but apply it to zone 2?

EDIT:  Ahh, nevermind.  Reading fail.

Quote
For the geeks, the actual parameter is bits 0-23 and the Zone is bits 24-29 of the 32-bit parameter (see the C++ macros below if you like). If bit 32 is set, Media Center assumes you passed in a simple negative number, so the Zone portion is discarded.

Creating the final parameter value:

For parameters >= 0
 final parameter value = Zone mask + parameter

For parameters < 0
 final parameter value = Zone mask + (16777216 + parameter)

Example:

parameter -1 to Zone 3: 67108864 + (16777216 + -1) = 83886079
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #14 on: December 11, 2009, 09:41:14 am »

I wonder if it works for MCC_PLAY_PLAYLIST (30007) to allow you to play a specific playlist to a specific zone.

I might try it out later just because I'm curious.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #15 on: December 11, 2009, 10:00:56 am »

I wonder if it works for MCC_PLAY_PLAYLIST (30007) to allow you to play a specific playlist to a specific zone.

I might try it out later just because I'm curious.
guess that will work also. find this easier to understand and change though:
mc14.exe /PlayReplace TREEPATH=Playlists\\Remote\\Remote9|zone=2

 :)
gab
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Detatch Display On Startup
« Reply #16 on: December 11, 2009, 10:12:26 am »

Ha ha!! I never even think to look at the normal (non MCC) commands.  I'm used to the MCC ones from setting up Windows Messages through Girder (which performs much better).  Never knew there was a way to play a playlist via the regular automation commands.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

benjah

  • Recent member
  • *
  • Posts: 5
Re: Detatch Display On Startup
« Reply #17 on: December 13, 2009, 10:56:38 pm »

Thanks For All The Help Guys,

I'm still having a bit of trouble getting this to work. I have 3 zones and i want them to each start playing
a smartlist on startup. The detach display commands are working fine by the way ....thanks for that.

I've tried the following as per your suggestions

C:\WINDOWS\system32\MC14.exe /PlayReplace TREEPATH=Playlists\\Audio\\Lounge zone=1

Nothing Happens

"C:\WINDOWS\system32\MC14.exe" /PlayReplace "TREEPATH=Playlists\\Audio\\Lounge" zone=1

Nothing Happens

C:\WINDOWS\system32\MC14.exe /PlayReplace TREEPATH=Playlists\\Audio\\Lounge|zone=2
I Get - Zone is not recognized as an internal or external command


I have also tried the other way using the playlist Id

Play Playlist ID 748612765 in Zone 1

C:\WINDOWS\system32\MC14.exe /MCC 30007,748612765,16777217

This worked for zone 1

Try the same for zone 2

C:\WINDOWS\system32\MC14.exe /MCC 30007,748612765,33554433

This started playback in zone 1 only nothing happened in zone 2

So I have tried the masking as suggested on the site

zone 1 Paramater (Playlist ID 748612765 + Zone Mask 16777217 = 765389982)

C:\WINDOWS\system32\MC14.exe /MCC 30007,765389982

And I get the return "There is nothing to play"


I'm trying to integrate these into the Javascript startup that you gus provided but just running from a shell to test at the moment.

Have you guys got some working examples of commands to get this to work?

Thans again really appreciating the help u are giving.
Logged

gappie

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 4566
Re: Detatch Display On Startup
« Reply #18 on: December 14, 2009, 02:40:57 am »

the example i posted is the one i use sending from girder, and also i think what will work from inside mc. i tried it with a bat file and this is then what works
mc14.exe "/PlayReplace TREEPATH=Playlists\Remote\Remote9|zone=0"
remember the first zone is zone 0, and im not sure from your example, but if you try to play something from the audio part of the tree this could work, the previoius example plays a playlist
mc14.exe "/PlayReplace TREEPATH=Audio\Lounge|zone=0"

 :)
gab
Logged
Pages: [1]   Go Up