Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Play Video in SL

Homer Antler
Registered User
Join date: 21 Oct 2006
Posts: 105
11-19-2006 17:43
Hi:

Newbie to scripting so please help.

I am looking for ways to play video files in SL. I saw a player that only play QuickTime videos. Is there any open source code that I can take control of to develop further? Is there an already made one that can play other format of videos?

Please point me to some resources where I can begin to understand how I can import or view different video format in SL.

Thank you.

-Homer
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
11-19-2006 17:50
SL plays the videos, not scripts. It's tied to the land your av is standing on (if you own land, check out the "Media" tab of your about land dialog).

All the scripts do is change the URL the land it pointed to.
_____________________
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
11-19-2006 19:55
I believe your only options are to convert whatever format your file is natively in, to shoutcastable data (quicktime? avi?). and then set up a shoutcast feed of your file(s). Then, you must tap that shoutcast server using the media setting on land you OWN. Once that's done... you apply the "magic texture" to a prim, and viola.. video. Of course then you have SL lag + shoutcast lag + broadcast lag.

In my experience.. making the client window smaller, and running winamp, is a superior option.

Additionally, you can convert your movie to frames, like an animated gif, and then tile the frames on a single image... then script the flipping of frames on a prim. This will work if you animation is like 64 frames or so. Anything more than that.. and it's either shoutcast, or not at all.

Music is the same. Shoutcasting... or else you'll be chopping your songs into 10-second wavs and then stringing them together via a playback script (again... my experience says that running winamp or another player on your computer and forgoing the streams through the SL client.. will net you greater quality).
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
11-19-2006 23:22
I have anime music videos on my land, i download the videos and convert them
to a QuickTime format it will play (I like .3gp format very small file size)
then I upload the video to my web server or ftp, (you dont have to stream videos
they will download and play)
and in SL on your land put the link to the video in the media tab of land properties,
you also need to set a texture the video will play on, make sure
you have videos turned on in your preferences and hit play at the bottom of your screen.
i have a button script that will change videos on your land so any one can choose
what to watch.
-LW
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
11-20-2006 03:57
Quicktime is free. Your video may be any format that Quicktime can play. That means you can create the video (or transform it) using any of the open source video tools, such as FFMPEG, etc.

Your video file is external to SL. Only the LINK to it is put into SL, in the Land Options. Large files need to be 'served', but, if your internet link is fast enough, and the video is small enough, you can serve from your own computer as Lightwave points out.

Shoutcast only does Audio.
Homer Antler
Registered User
Join date: 21 Oct 2006
Posts: 105
11-20-2006 06:56
Thank you very much for all your help. I got the video to work on a 5x5 prim!!! I guess one land piece can only play one video at a time.

Some of you mention about a script or a controller that can choose which video cast to play. Is there an open source code for that box anywhere?

Oh one more question, is there anyway that you can detect if a user has Quicktime installed on their PC? Basically I want to know if they can view the video or not. Is that possible at all? Is there a way to confirm that?

Again, thanks for all your help.
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
11-20-2006 07:58
From: Winter Ventura
Music is the same. Shoutcasting... or else you'll be chopping your songs into 10-second wavs and then stringing them together via a playback script (again... my experience says that running winamp or another player on your computer and forgoing the streams through the SL client.. will net you greater quality).


Or use your hifi, but either way the result won't be audible to others ingame.
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
11-20-2006 17:18
here is the script i made for choosing videos to play:
CODE

//Load Video Button by Lightwave Valkyrie
//set floating text and path to video
default
{
on_rez(integer start_param)
{llResetScript();}
state_entry()
{
llSetText("Workit swf",<1,1,1>,1.0); //put floating text of name of video
}

touch_start(integer total_number)
{
llParcelMediaCommandList( [PARCEL_MEDIA_COMMAND_URL, "http://omgwtf.superlime.com/1d00d5a982e7392be54656e3b66dc662/workit.swf" ] );//put link to video here

llSay(0,"Loading...");
llParcelMediaCommandList ( [PARCEL_MEDIA_COMMAND_STOP] );
llSleep(1);
llParcelMediaCommandList ( [PARCEL_MEDIA_COMMAND_PLAY] );
llSay(0, "Playing");

}
}



this script will set floating text over button, then on touch it will set the path to the video
on your land then say "loading...", stop any playing videos,and play they new video,
and say "Playing".

this prim button needs to be owned by the landowner (or set to group if group land)
it can be linked to other buttons also
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
11-21-2006 04:29
My understanding is that SL includes Quicktime as part of the install process, <if not already present> . Can anyone confirm that?
If true, then no need to test for its presence...
Patchouli Woollahra
Registered User
Join date: 3 Nov 2006
Posts: 24
11-21-2006 04:46
Streaming quicktime functionality is gracefully degraded on computers that refuse to download the content found on the Media URL of the parcel, as the client will simply refuse to replace the static(?) texture...

This is something you don't have to worry about unless your project significantly involves streaming Quicktime.
Homer Antler
Registered User
Join date: 21 Oct 2006
Posts: 105
11-21-2006 14:05
Thanks everyone.

From: Sterling Whitcroft
My understanding is that SL includes Quicktime as part of the install process, <if not already present> . Can anyone confirm that?
If true, then no need to test for its presence...


Can someone please confirm if this is true? I also want to know if there are ways to tell if a user has turned the video option on or off in their preference. Basically I want to know if someone is able to watch my video/audio or not.