LinuxMCE Forums

General => Users => Topic started by: ebolam on January 17, 2009, 06:53:19 pm

Title: Opening Trailer?
Post by: ebolam on January 17, 2009, 06:53:19 pm
Is there a way to pause playback of a video, play a different video (like a movie theater opener), then re-start the original video?

I have a theater PC hooked up to a projector. When I start playback for the first time, I want it to turn on the projector (working now), play an opener, and then play the video I selected.
Title: Re: Opening Trailer?
Post by: patmankn on January 17, 2009, 09:41:21 pm
ebolam,

have you tried to create playlists? Maybe this simple work around can help you out ;O)..

cheers,

pat
Title: Re: Opening Trailer?
Post by: tkmedia on January 18, 2009, 05:59:23 am
You may be able to create a scenario that plays the opening. when ever a specific media type is played




Tim
Title: Re: Opening Trailer?
Post by: ebolam on January 18, 2009, 07:04:55 am
Playlists would be problematic, as I would have to create one for each and every movie I own. And when I dropped in a new DVD, it wouldn't play the opener.

I was thinking an event would be the way to go, but I don't see anything in the event list for actions that would pause playback, nor start something else. Maybe there is a command to run a shell command (start another player manually?)
Title: Re: Opening Trailer?
Post by: tkmedia on January 18, 2009, 09:12:18 am
Take a look at the internet radio scenario it shows an example of MH_Play




HTH


Tim
Title: Re: Opening Trailer?
Post by: ebolam on January 20, 2009, 02:14:35 pm
I took a look at the internet radio senario, but  have encountered two problems. The first is the file will not play. I do the MH_Play setting, which asks for a filename as a string. I used the folder browse button, which after selecting my file gave me a number like 2088. When I test the senario it says it can't find the file. I tried giving it the complete path to the file, /home/public... but that didn't work either.

The second problem is when it does try to play, it seams to stop the othe video completely. What I want it to do is play the video when the projector comes on, then resume whatever it was going to do (play DVD etc).

Thanks for your help so far, support has been great here!
Title: Re: Opening Trailer?
Post by: colinjones on January 20, 2009, 08:37:52 pm
Only one stream can play to one device at once. So starting a new stream will always stop the existing one. The only thing I can think of is to an event to insert your opening video into the current "playlist" before the video selected, then jump to that position. Issues 1) not sure if it will do this fast enough not to see the selected video play first for a split second then jump to the opening video and 2) if the event is simply triggered on any start play media event, then it will be triggered for the opening video as well and you will end up in an infinite loop creating a larger and larger playlist that never gets to the actual video. you need to ignore this somehow, and I've no idea how to do that...
Title: Re: Opening Trailer?
Post by: tschak909 on January 20, 2009, 08:49:03 pm
When using the MH Play Media command,

* The EntertainArea must be filled. This is the value for the room to target. 1 is the first room you created, 2 is the second, etc. Look at the EntertainArea in the database for details.
* The MediaType must be filled. Use 5 for the Video mediatype, look at the MediaType table in the database for more details
* You can specify file paths in one of two ways, either via the PK_File Number, which is mentioned when you try to delete a file ironically, you can use !F1234 to get file 1234.. OR you can use a full path to the file.

-Thom
Title: Re: Opening Trailer?
Post by: ebolam on January 21, 2009, 03:51:29 pm
Well, that takes out the MH Play idea. I think the playlist idea would be unreliable...

My next idea would be to use the spawn application setting. I could pause the current media playback, then spawn another instance of xine (or another player). then after program exit or after a preset timeout resume playback on the orbiter.

My problem now is figuring out what the variables mean in the spawn application. they are:

Arguments (string)
Detach (bool)
Exclusive (bool)
Filename (string)
Name (string)
Retransmit (bool)
SendOnFailure (string)
SendOnSuccess (string)
Show Logo (bool)

Thanks for all of the ideas!
Title: Re: Opening Trailer?
Post by: ebolam on February 07, 2009, 08:48:32 pm
Well, after finishing some honey-dos, I'm back to working on the system. I have not be able to get the spawn application to work. I tried the following:
Arguments=-fs /home/public/data/videos/Fox_Theaters.mpg
Filename=mplayer
name=mplayer

and

Arguments=
Filename=mplayer -fs /home/public/data/videos/Fox_Theaters.mpg
name=mplayer


I see nothing happening on the machine though.

What am I doing wrong? Is there an example for spawn application I can use as a template?
Title: Re: Opening Trailer?
Post by: colinjones on February 07, 2009, 08:58:10 pm
I can't help you with fixing this but I can tell you that you cannot just spawn other versions of Xine or other players. You need to understand a lot more about how LMCE works, but in short they aren't just processes running on the box, the fundamental architecture of LMCE in modules called Devices that all communicate with each other through the DCE protocol in a hub-n-spoke network with the DCE Router at the centre. So the Xine player in KDE is not used at all, the xine libraries are used and stitched together into a "DCE Device" by the xine wrapper code. Trying to spawn additional versions fundamentally misunderstands how LMCE works. The same is true for any other device including mplayer.
Title: Re: Opening Trailer?
Post by: ebolam on February 07, 2009, 09:12:57 pm
I guess I still have a lot to learn about the architecture of LinuxMCE. Is there a way to sniff an event log as to what commands are being sent for each button I press? There was a post earlier that I did not fully understand (one by you) to add the file to the playlist then jump to that file. You had a concern that it would not do it fast enough, but that shouldn't be a problem as I have to wait for the receiver and projector to turn on (30 sec for the projector) so there is no sound or video for a while anyway. I would also only do the event on projector turn-on. I can't however find any events to add a file to a play list, nor to jump to a position in the playlist. I know how to do it in the orbiter, so being able to sniff events would be great!

Thanks for being patient with me!
Title: Re: Opening Trailer?
Post by: colinjones on February 07, 2009, 09:27:26 pm
I really don't think that method will work. But here is how you can see the messages:

tail -f /var/log/pluto/DCERouter.log

For specifics on what each device is doing in response to these messages look at the other logs in there. mediaplugin and xine in particular..