Difference between revisions of "User:Salahzar Stenvaag/classes/StreamingMedia IT"

From Second Life Wiki
Jump to navigation Jump to search
(New page: '''Classe''': Come usare lo streaming e progettare oggetti che visualizzino film, pagine web, immagini ecc. '''Istruttore''': Salahzar Stenvaag (SL Mentor) '''Data''': 11 Novembre 2008 ...)
 
Line 23: Line 23:




To understand this class you should be comfortable with the basics of group handling, object properties editing, and at least a minimal scripting ability: we are not teaching what a group is or how to compile "Hello Avatar" :)
Per comprendere questa lezione dovete essere a vostro agio con le basi della gestione dei gruppi, dell'editing di oggetti, e un minimo di capacità di scripting: non insegneremo cosa sia un gruppo nè come compilare "Ciao Avatar" :)


= Part I: Media Content =
= Part I: Contenuto multimediale =


     0. Introduction
     0. Introduzione
     1. How to enjoy a stream
     1. Come far funzionare lo streaming (visitatore)
     2. How to set media content on a parcel
     2. Come impostare lo streaming su una terra (proprietario o officer)
     3. What happens if land is deeded to a group?
     3. Cosa succede quando una terra è "donata" deed al gruppo?
     4. Deeding caveats and permissions issues
     4. Problematiche sulla donazione e problemi di autorizzazione (permission)
      
      






== 0. Introduction ==
== 0. Introduzione ==


The ability of showing movies, web pages or photo stills in SecondLife is achieved using the special "Media" tab in the land dialog. Recently (starting from April 2008) it has become more powerful allowing you to display webpages or images directly without using quicktime as intermediate. Quicktime is still required for basic functionality to work. We are dealing in particular with visual media.
La capacità di mostrare film, pagine web e foto in Secondlife viene ottenuta usando il tab "Media" nella maschera della land (accessibile cliccando sul nome della terra sulla barra in alto oppure cliccando sulla terra e facendo edit terrain).
Ad aprile 2008, il sistema di streaming è diventato più potente consentendovi di visualizzare anche siti web o immagini da siti web senza usare quicktime o siti php intermedi. Quicktime è comunque ancora necessario per far funzionare le possibilità di base. Noi faremo vedere in particolare la visualizzazione multimediale.


There are many video showing you how this works. Torley made some very interesting and exhaustive video at the following address: http://blog.secondlife.com/2008/03/10/parcel-media-video-tutorials-how-to-play-movies-webpages-more/
Ci sono molti video che mostrano come tutto questo funziona. Torley ha fatto diversi video molto interessanti ed esaustivi al seguente indirizzo : http://blog.secondlife.com/2008/03/10/parcel-media-video-tutorials-how-to-play-movies-webpages-more/
You are invited to see his videos being quite well done and instructive. However we will cover this live since live experience is always a good thing :)
Siete invitati a vedere i suoi video che sono ottimi ed istruttivi. In ogni caso noi faremo questo corso dal vivo dato che l'esperienza diretta funziona spesso meglio dei video automatici :)


To show multimedia content you must own a piece of land since multimedia is connected with the land ownership.  
Per mostrare del contenuto multimediale DOVETE possedere un pezzo di terra dato che il contenuto multimediale è associato alla proprietà terriera.


==> If you don't own a piece of land you can still be in a group who owns land and as officer you might be allowed to set media content.
==> Se non possedete un pezzo di terra potreste lo stesso far parte di un gruppo che possiede terra come "officer" a cui è stato consentito di modificare il contenuto multimediale.


Each parcel can have one and one only multimedia stream associated, so if you need to show, say 10 movies at the same time and 5 images from the web you must subdivide the land in at least 15 subparcels.
Ogni lotto di terra (parcel) può avere al massimo 1 contenuto stream associato, dal che, se volete mostrare 10 film allo stesso momento e 5 immagini da siti web dovreste suddividere la terra in almeno 15 sottoparcelle.
Note that avatars can see a stream only when they are IN the same parcel as the stream is set.
Attenzione: gli avatar possono vedere lo stream SOLO se sono nella stessa parcel dove lo stream è settato.


Questions?
Domande?




== 1. How to enjoy a stream. ==
== 1. Come far funzionare lo stream (visitatore) ==


If you are in a parcel where streaming has been set you can enjoy it just pressing the "play" button on the bottom of your screen just at the right of "gesture" combobox, above "mini-map" button.
Se siete in una terra dove lo stream è stato impostato potete vederlo premendo il bottono "play" sul fondo del vostro schermo proprio alla destra del campo "gesture" sopra il bottone "mini-map".


If it is grayed then you MUST go to CTRL-P preferences audio and video and tick "Play Streaming Media". Also you can choose to tick "Automatically Play Streams when available". This can save you some time.
Se è grigio allora DOVETE abilitare la preferenza Quicktime premendo CTRL-P e mettendo il baffo su "Play Streaming Media". Potete anche decidere di mettere il tick su "Automatically Play Streams when available" per avere il contenuto multimediale attivato automaticamente. In questo modo risparmiate un po' di tempo.


Questions?
NB: dovete avere installato quicktime sul vostro pc.


Domande?


== 2. How to set media content ==


If you have correct rights (being owner of a parcel or an authorized officer, you can click on the "About Land" and being shown the Land characteristics. Right-Click on the ground and click "ABout Land", or click on the name of the land on the top of your browser, whichever is best for you.
== 2. Come impostare il contenuto multimediale ==
I personally prefer clicking on the top name: it is faster and you can do it even if you are flying in the sky or on a platform.
 
Se avete i giusti permessi (siete proprietari della terra o un officer autorizzato), potete cliccare su "About Land" e vi verranno mostrate le caratteristiche della terra.  
 
Potete cliccare-destro per terra e cliccare sul cerchio di selezione "ABout Land", oppure cliccare sul nome della terra sulla striscia in cima al vostro client, scegliete quello che vi risulta più comodo.
 
Io personalmente preferisco cliccare sul nome in cima: è più rapid e potete farlo anche se state volando in cielo o su una piattaforma.
 
Cliccando sulla linguetta  "Media"
 
Potete scegliere le cose seguenti:


Click on the Media tab.
You can then choose the following:


* Media Type: which type of media to display (you can ignore it since it is automatically chosen when choosing the url).
* Media Type: which type of media to display (you can ignore it since it is automatically chosen when choosing the url).

Revision as of 10:34, 11 November 2008

Classe: Come usare lo streaming e progettare oggetti che visualizzino film, pagine web, immagini ecc.

Istruttore: Salahzar Stenvaag (SL Mentor)

Data: 11 Novembre 2008

Location: Solaris Experience


Breve Descrizione:

Fare lo "streaming" di video, pagine web ed immagini è una delle caratteristiche più potenti che SecondLife offre a comunità, aziende, individui per condividere contenuto visuale, MA il processo di impostazione è molto confusionario, difficile e soggetto ad errori.

Ho impostato questo corso per spiegare le basi delle impostazioni "Media Parcel" e come scrivere degli script scemplici che utilizzino questa caratteristica in modo semplice, effettivo e "condiviso".


NB: Il contenuto di questo corso non è riconosciuto dalla Linden, mentre invece fa parte dell'esperienza di Insegnamento Volontaio organizzata di mentori in SL. Se siete interessati ad avere notizie sui mentori in SecondLife potete chiedermi al termine della lezione.e class is finished.


Prerequisiti:

Per comprendere questa lezione dovete essere a vostro agio con le basi della gestione dei gruppi, dell'editing di oggetti, e un minimo di capacità di scripting: non insegneremo cosa sia un gruppo nè come compilare "Ciao Avatar" :)

Part I: Contenuto multimediale

   0. Introduzione
   1. Come far funzionare lo streaming (visitatore)
   2. Come impostare lo streaming su una terra (proprietario o officer)
   3. Cosa succede quando una terra è "donata" deed al gruppo?
   4. Problematiche sulla donazione e problemi di autorizzazione (permission)
   


0. Introduzione

La capacità di mostrare film, pagine web e foto in Secondlife viene ottenuta usando il tab "Media" nella maschera della land (accessibile cliccando sul nome della terra sulla barra in alto oppure cliccando sulla terra e facendo edit terrain). Ad aprile 2008, il sistema di streaming è diventato più potente consentendovi di visualizzare anche siti web o immagini da siti web senza usare quicktime o siti php intermedi. Quicktime è comunque ancora necessario per far funzionare le possibilità di base. Noi faremo vedere in particolare la visualizzazione multimediale.

Ci sono molti video che mostrano come tutto questo funziona. Torley ha fatto diversi video molto interessanti ed esaustivi al seguente indirizzo : http://blog.secondlife.com/2008/03/10/parcel-media-video-tutorials-how-to-play-movies-webpages-more/ Siete invitati a vedere i suoi video che sono ottimi ed istruttivi. In ogni caso noi faremo questo corso dal vivo dato che l'esperienza diretta funziona spesso meglio dei video automatici :)

Per mostrare del contenuto multimediale DOVETE possedere un pezzo di terra dato che il contenuto multimediale è associato alla proprietà terriera.

==> Se non possedete un pezzo di terra potreste lo stesso far parte di un gruppo che possiede terra come "officer" a cui è stato consentito di modificare il contenuto multimediale.

Ogni lotto di terra (parcel) può avere al massimo 1 contenuto stream associato, dal che, se volete mostrare 10 film allo stesso momento e 5 immagini da siti web dovreste suddividere la terra in almeno 15 sottoparcelle. Attenzione: gli avatar possono vedere lo stream SOLO se sono nella stessa parcel dove lo stream è settato.

Domande?


1. Come far funzionare lo stream (visitatore)

Se siete in una terra dove lo stream è stato impostato potete vederlo premendo il bottono "play" sul fondo del vostro schermo proprio alla destra del campo "gesture" sopra il bottone "mini-map".

Se è grigio allora DOVETE abilitare la preferenza Quicktime premendo CTRL-P e mettendo il baffo su "Play Streaming Media". Potete anche decidere di mettere il tick su "Automatically Play Streams when available" per avere il contenuto multimediale attivato automaticamente. In questo modo risparmiate un po' di tempo.

NB: dovete avere installato quicktime sul vostro pc.

Domande?


2. Come impostare il contenuto multimediale

Se avete i giusti permessi (siete proprietari della terra o un officer autorizzato), potete cliccare su "About Land" e vi verranno mostrate le caratteristiche della terra.

Potete cliccare-destro per terra e cliccare sul cerchio di selezione "ABout Land", oppure cliccare sul nome della terra sulla striscia in cima al vostro client, scegliete quello che vi risulta più comodo.

Io personalmente preferisco cliccare sul nome in cima: è più rapid e potete farlo anche se state volando in cielo o su una piattaforma.

Cliccando sulla linguetta "Media"

Potete scegliere le cose seguenti:


  • Media Type: which type of media to display (you can ignore it since it is automatically chosen when choosing the url).
  • Media URL: you can "Set..." it to a valid URL or a movie source (Warning: be careful to change in Set.. and NOT in description since it has no effective meaning
  • Replace Texture show you which texture in the parcel is used to show multimedia content. You can set one of your texture so to show help or other land specific texture instead of a greyed or white one.
  • Auto Scale: normally is ticked so that the media will cover ALL the prim and not just a portion.

We skip the sound part of media texture, since it is not part of this class.

Whenever you have problems with media (and you are owner), be sure that you are able to set this page so you can deduce that everything is fine with streaming in the parcel.

Questions?


3. What happens if land is deeded to a group?

First of all 2 words on the concept of "deeding" and groups, which are quite complex and awkward things in Secondlife. Groups have been created to help communities to share land, activities and to define roles. Some people in the group are just "members", others are "officers" depending on a complex matrix of permissions and capabilities. Permissions can be set to allow members of a role to build things, to eject other members, to deed objects and use them, and to set media parcel properties.

We are interested in deeding since our ultimate goal is to build a scripted object able to change the media permissions for us without needing to go manually on the "About Land" and doing it with keystrokes.

An Object like a Wallboard or a Screen or a TV can change the parcel Media Properties ONLY if it is deeded to the group. This is why we are talking about groups and deeding. :)

Deeded land is more complex than simple avatar owned land. In the second, simplest case, object can change media property just because it is owned by the avatar owning the parcel. In the first more complex case object must be owned by the group. Not just *shared* it must be DEEDED.

Questions?


4. Deeding caveats and permissions issues

Whenever you deed something to a group you are NO MORE owner of that thing (this is valid for lands but even more with objects). So deeding it is actually a TRANSFER. Even if you are owner of the group, when you deed something to the group you lose the object and you might not be able to get it again back in your inventory with the same permissions :(

This is something very tricky and since many commercial objects are normally notrans to avoid reselling, if you buy something that should act as media parcel changer it MUST be transfer to allow DEEDING. Sellers normally dislike the fact that you can make multiple copies of their objects and so if they sell something TRANSFER they remove the COPY right.

There should not be any problems with FULL PERMISSIONS objects, but here again there are some subtle bugs in SecondLife that might prevent you in having the same thing (i.e. a full permission object when rezzed, deeded, taken can become nocopy nomodify at the end). So you are advised if possible to keep copies in your inventory.

To show you the "correct" sequence to do when deeding an object to a group let assume we have a box with 1 script and 2 notecards.

  • You must be sure the object is at least TRANSFER (copy/modify is better). Check that next owner can also TRANSFER it (and copy/modify as well).
  • rez the object and SHARE with the group (the *correct* group be careful to have the proper tag on your head),
  • be sure also to SHARE with the group and to check each permissions of contained items!!!!
  • at this point you DEED the object to the group BUT READ below

You must be the owner of the group or have the following capabilities from the group in your role:

  • Change music & media settings (if you want to be able to check Media Properties of the land)
  • Return objects owned by group (to be able to reclaim your object)
  • Deed objects to group
  • Manipulate (move,copy,modify) group objects )

Whenever you DEED an object and have modify rights on it, be sure to share it again with the group AND RESET scripts in it. (Simplest way to do it is to right-click, edit and from Tools menu choose Reset Scripts in selected objects.

Reset is *QUITE* important to be sure that scripts are working under the correct identity. If you don't reset the object the object might easily simply not work :(

Questions?

'At the end of this part you should be comfortable with what is media content, how to set it manually and how it relates with scripted objects. '


Part II: Scripted Media Object

   0. Why we need a scripted object
   1. The basic lsl command llParcelMediaCommandList
   2. A very simple "web browser" listening to a channel to change URL
   3. Other usages
   4. Caveats and troubleshooting
   

0. Why we need a scripted object.

We can use the powerful media manual interfaces but ONLY if we are owner of the land, owners of the group if land is deeded or officers with enough capabilities. This can be however a bit cumbersome since you have to open up the dialog from about land and choose the url (You might as well use your browser where there is an option which puts automatically current url on the media settings if you want people to surf with you the web).

But if you want to automate the URL changing, for example in an unattended presentation, or if you want people not in your group to be able to choose their own url / movies, you MUST definitely have some scripted objects.

When you have scripted objects you enter in the issues I explained before (deeded objects, transfer hell etc). We give for granted that you know how to deal with that mess (this is why I divided the class in 2 parts) :) And concentrate on the scripting part.

Questions?


1. The basic command.

lsl scripting gives you a powerful and lengthy command which does "everything" related to setting media properties. llParcelMediaCommandList( [list] ); accepts a list of commands for instance:

llParcelMediaCommandList( [

           PARCEL_MEDIA_COMMAND_URL, "http://enter_your.url/here",
           PARCEL_MEDIA_COMMAND_TEXTURE, (key) llGetTexture(0) ] );

Which uses as texture the first texture contained in the object inventory and sets a URL to show.

You can also use the following commands:

PARCEL_MEDIA_COMMAND_STOP     
PARCEL_MEDIA_COMMAND_PAUSE  
PARCEL_MEDIA_COMMAND_PLAY    
PARCEL_MEDIA_COMMAND_LOOP    
PARCEL_MEDIA_COMMAND_TEXTURE (key)" " (typecast to key!!!)
PARCEL_MEDIA_COMMAND_URL  " "  (254 chars!)
PARCEL_MEDIA_COMMAND_TIME   float  (to skip to a specific time in video)
PARCEL_MEDIA_COMMAND_AGENT    (key) (to apply movie to a specific avatar.. Warning it is allegedly buggy)
PARCEL_MEDIA_COMMAND_UNLOAD   (remove movie)
PARCEL_MEDIA_COMMAND_AUTO_ALIGN    
PARCEL_MEDIA_COMMAND_TYPE    " "
PARCEL_MEDIA_COMMAND_SIZE    x, y
PARCEL_MEDIA_COMMAND_DESC    " "

See http://lslwiki.net/lslwiki/wakka.php?wakka=llParcelMediaCommandList for a detailed comment of this.

Questions?


2. A very simple "web browser" listening to a channel to change URL

default
{
   state_entry()
   {
       string s=llGetInventoryName(INVENTORY_TEXTURE,0);
       key k=llGetInventoryKey(s);
       
       llSetTexture(s,0);
       llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_TEXTURE, k ]);
       
       llListen(10,"",NULL_KEY,"");
       llSay(0,"Say http://url on channel 10");
      
    }
    listen(integer channel, string name, key id, string str)
    {
       llSay(0,"Refreshing URL: "+str+"...");
       llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_AUTO_ALIGN, 1,  PARCEL_MEDIA_COMMAND_STOP, PARCEL_MEDIA_COMMAND_TYPE, "text/html", PARCEL_MEDIA_COMMAND_URL, sURL, PARCEL_MEDIA_COMMAND_PLAY ]);
       llSay(0,"Done.");
    }
}

Questions?


3. Other Usages

In connection with http_request (it is out of the scope of current class), we can do quite miracolous things like: - showing notecards (converting notecard to html and showing the html page) - we can also do an almost real browser just listening to the name of a link and asking to follow that link - we can listen to chat and have an interactive whiteboard where the content comes from the chat and many other usages.


4. Trouble shooting.

Here again I've seen a LOT of people who get confused when they have a streaming object and have to use it. Whenever they see that the screen simply remains blank they tend to be nervous and to give up or to blame the programmer or the Lindens. Here again the correct way of dealing with problems is trying to check the following:

  • is the media parcel working "manually" correctly? i.e. are you (or the owner or the officer) able to manually change the media parcel and show the movie the URL correctly?
  • is the object correctly DEEDED to the group? In case try to use it in a normally owned land to check if it is correctly working.
  • is Quicktime and media enabled on your browser?
  • are you in the correct parcel?

For instance a sequence of problems and how to solve them can be found at the following page:

http://www.slguide.com/help/

Questions?

Thanks for the participation. :)