Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Quick Media Related Question

Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
02-17-2008 09:49
Is it possible to figure out the length of a movie being played within SL or to know when it's finished so that you can do something else?
_____________________
<VOTE PROPOSITION 4968/>
http://jira.secondlife.com/browse/VWR-4968
For SecondLife Builders who need better mapping for better building
Vlad Bjornson
Virtual Gardener
Join date: 11 Nov 2005
Posts: 650
02-17-2008 11:27
Nope. No way to do this with LSL. If you know the length of the movie before it starts playing you can set a timer, close as you can get. This is probably because a media file never goes through the LL servers. It goes straight from the web to the client, so there is no way for a script to know anything about the media.

There may be some tricky way to do it using a web-based program and http communication scripts, but not with LSL itself.
_____________________
I heart shiny ! http://www.shiny-life.com
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
02-17-2008 12:13
From: Vlad Bjornson
There may be some tricky way to do it using a web-based program and http communication scripts, but not with LSL itself.

That's what I was thinking. At the moment we put the time in the playlist and it remains totally SL based (with the exception of the media itself obviously) but I've been told that some people are doing it without so figured either something new has come out regarding media functions in LSL that I've not seen or maybe it was done outside SL on a website maybe.

Not to worry, thanks for pretty much confirming what I already thought
_____________________
<VOTE PROPOSITION 4968/>
http://jira.secondlife.com/browse/VWR-4968
For SecondLife Builders who need better mapping for better building
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
02-17-2008 20:55
OK, I've done a little asking around and it seems that there is no way to do it with something like PHP either and I can't install applications on my web server so I guess I'm stuck for now. Can't believe that nothing can quickly query a movie and get things like metadata from it describing resolution and/or play length
_____________________
<VOTE PROPOSITION 4968/>
http://jira.secondlife.com/browse/VWR-4968
For SecondLife Builders who need better mapping for better building
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
02-17-2008 23:35
From: Landing Normandy
OK, I've done a little asking around and it seems that there is no way to do it with something like PHP either and I can't install applications on my web server so I guess I'm stuck for now. Can't believe that nothing can quickly query a movie and get things like metadata from it describing resolution and/or play length

You could probably write a PHP script to do this based on the file type. :p
_____________________
Rock Ryder
Registered User
Join date: 6 Oct 2006
Posts: 384
02-18-2008 05:13
Surely you can know when a movie is finished by querying if the texture on the prim face is the movie texture, or the default texture, every 5 seconds or so, using llGetTexture.

Rock
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
02-18-2008 08:47
Rock, you can't do that because as far as the server is concerned it's the same thing; it's the client that puts the video on the texture, and since the script is running on the server then the two will never meet.

Tyken, probably yes, but I don't know enough about it to do so myself and people who know more about it than me don't seem to know how either so I guess I'm stuck for now
_____________________
<VOTE PROPOSITION 4968/>
http://jira.secondlife.com/browse/VWR-4968
For SecondLife Builders who need better mapping for better building
Ravenhurst Xeno
Consiracy with no purpose
Join date: 20 Jan 2007
Posts: 147
02-18-2008 09:22
You can extract the quick time header details on the server side using the perl module: Video::Info::Quicktime and then rely the information back into SL.
Landing Normandy
Proposing 4968
Join date: 28 Nov 2005
Posts: 240
02-19-2008 07:12
OK, thank you, I'll see if that's available to me. I assume it's not something I'll be able to add :D
_____________________
<VOTE PROPOSITION 4968/>
http://jira.secondlife.com/browse/VWR-4968
For SecondLife Builders who need better mapping for better building
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
02-20-2008 00:38
For the Diamond Media System I created, I made a videotimer for the setup of one of the components. Simple timer - click when the video starts and the time starts, click again at the end and the videotimer tells you how many seconds the video ran for. LOL not much help, cuz I'm not inworld right now to look at the script, but I do remember it wasn't hard to do, using info from the scripting portal.