Parcel_media_command_time
|
|
DrDoug Pennell
e-mail is for old people
Join date: 13 Mar 2007
Posts: 112
|
05-06-2009 11:58
Hi there,
Still trying unsuccessfully to get my audio tour to work.
I have a quick question. Can I use the PARCEL_MEDIA_COMMAND_TIME flag with an mp3 file? I have created a script that is supposed to start the audio (mp3 file) playing at various time points, but it always starts at the beginning. Does the TIME flag only work with Quicktime files or video?
Thanks,
Doug
|
|
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
05-06-2009 23:11
There's a couple ways to do this off the top of my head.
1 - Put the mp3 on a web server somewhere. This is going to be key, because that's how your parcel gets it's parcel media. You need a url, like 'http://myfreebieserver.com/soundfile.mp3'. If using separate collision objects for the timing of the sounds on the tour, then with the first one you'd set the url and play the file.
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,"http://myfreebieserver.com/soundfile.mp3" , PARCEL_MEDIA_COMMAND_PLAY]); or whatever options you want in there.
The next one they hit would be the one to trigger PARCEL_MEDIA_COMMAND_PAUSE, and then the next would trigger the sound to start up again, and so on.
2 - Other way to do it would be to split the mp3 into multiples and simply play each one when the tour reaches certain points.
Personally, the first way is the way I'd try first, and the second way second. I wouldn't use the TIME flag at all.
|
|
DrDoug Pennell
e-mail is for old people
Join date: 13 Mar 2007
Posts: 112
|
05-07-2009 07:39
From: ElQ Homewood There's a couple ways to do this off the top of my head.
1 - Put the mp3 on a web server somewhere. This is going to be key, because that's how your parcel gets it's parcel media. You need a url, like 'http://myfreebieserver.com/soundfile.mp3'. If using separate collision objects for the timing of the sounds on the tour, then with the first one you'd set the url and play the file.
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,"http://myfreebieserver.com/soundfile.mp3" , PARCEL_MEDIA_COMMAND_PLAY]); or whatever options you want in there.
The next one they hit would be the one to trigger PARCEL_MEDIA_COMMAND_PAUSE, and then the next would trigger the sound to start up again, and so on.
2 - Other way to do it would be to split the mp3 into multiples and simply play each one when the tour reaches certain points.
Personally, the first way is the way I'd try first, and the second way second. I wouldn't use the TIME flag at all. Hi ElQ, Thanks for the suggestions. I should have been more specific. I do have the audio on our University's streaming server, both as one big file and as individual files for each waypoint on the tour. I have tried the second option in numerous configurations without success. Getting parcel media to play a clip reliably is a crapshoot. I do know that the problem is not with our server here since I can play the files immediately and reliably in other programs (iTunes for example). The primary problem with the first approach is that the tour travels over most of the island and traverses several parcels along the way. Thus it probably wouldn't work to pause and restart a single clip. That's primarily why I was wanting to try the Time flag. Doug
|
|
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
05-08-2009 01:47
yeah, I was assuming a long tour, otherwise you wouldn't need to time it at all. I think I'd still stand by my suggestion to use collision mats though, so people can walk through and as they hit certain points in the tour, they get the appropriate sound files. To time it would be rather strange as they may stand around and look between tour points, or go quickly further down the tour.
Still, if it's really large, you may not want to mess with parcel media and play the sound inworld at each point instead using llPlaySound. In this way, the local people at each point in the tour hears the sound file, while others at other points in the tour will hear their own sound file, and there's no concern with the availability of the streamed file.
|
|
Dz Questi
Registered User
Join date: 15 Jul 2008
Posts: 13
|
media time
05-09-2009 08:37
Aloha... I tried for a while to get the media time function to to work reliably and gave up in the end.
It is possible for you to use the parameter with the MP3 files.
The "intermittent" nature of the load times in SL seems to be the downfall of the timer....
In my experience, if you were trying to skip ahead 2 or 3 seconds in a relatively short MP3... the timer would work well... if you tried to skip ahead a BUNCH of seconds.. The larger the file, and the larger the "skip" the less likely it will happen properly.
My best guess is that when it comes time to find the "offset" into the file to begin play, that much of the file has NOT "loaded" so there is no way for the player to find the proper start point... So it will start at the beginning.....
|
|
DrDoug Pennell
e-mail is for old people
Join date: 13 Mar 2007
Posts: 112
|
05-11-2009 11:06
From: ElQ Homewood yeah, I was assuming a long tour, otherwise you wouldn't need to time it at all. I think I'd still stand by my suggestion to use collision mats though, so people can walk through and as they hit certain points in the tour, they get the appropriate sound files. To time it would be rather strange as they may stand around and look between tour points, or go quickly further down the tour.
Still, if it's really large, you may not want to mess with parcel media and play the sound inworld at each point instead using llPlaySound. In this way, the local people at each point in the tour hears the sound file, while others at other points in the tour will hear their own sound file, and there's no concern with the availability of the streamed file. Hi ElQ, The tour is actually using a Guided Tour System vehicle so the travel is pre-defined. I have tried to play the sounds inworld using llPlaySound but I find that to be unreliable, even when pre-loading the sounds. Plus it is somewhat limiting to have to break up everything into 10 second chunks. Nevertheless if I cold get it to work I'd gladly accept that limitation. I really had high hopes for using parcel media but that seems to be as problematic as playing sounds. Thanks, Doug
|
|
DrDoug Pennell
e-mail is for old people
Join date: 13 Mar 2007
Posts: 112
|
05-11-2009 11:09
From: Dz Questi Aloha... I tried for a while to get the media time function to to work reliably and gave up in the end.
It is possible for you to use the parameter with the MP3 files.
The "intermittent" nature of the load times in SL seems to be the downfall of the timer....
In my experience, if you were trying to skip ahead 2 or 3 seconds in a relatively short MP3... the timer would work well... if you tried to skip ahead a BUNCH of seconds.. The larger the file, and the larger the "skip" the less likely it will happen properly.
My best guess is that when it comes time to find the "offset" into the file to begin play, that much of the file has NOT "loaded" so there is no way for the player to find the proper start point... So it will start at the beginning..... Hi Dz, Thanks for the information. Your explanation makes sense. I actually wanted to play seconds 1-10, then 10-20, then 20-30, and so on so it would probably just get worse the farther into the mp3 I got. Doug
|
|
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
|
05-12-2009 05:57
Been thinking about this a bit while I was working this weekend. Using ParcelMedia might not be a bad idea, if you can come up with a way to preload it into the quicktime..I haven't really used COMMAND_AGENT myself, but if you used that, then used the _PAUSE..wouldn't that have it essentially pre-loaded into each rider's quicktime and simply be pausing and restarting the file in their quicktime client? in which case, no delay? I dunno..it makes sense to me, considering how quicktime loads media, does anybody else know if this is the case?
|