Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Parcel_media_command_auto_align ?

Epilort Byrne
Registered User
Join date: 6 Jul 2004
Posts: 30
03-15-2007 09:49
What does PARCEL_MEDIA_COMMAND_AUTO_ALIGN do? Is there any way to check the maximum size of a video and change the prim to that size? Thanks.
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
03-15-2007 10:01
From: someone
turns on/off the auto align feature, similar to the auto align checkbox in the parcel media properties (NOT to be confused with the "align" function in the textures view of the editor!) Takes TRUE or FALSE as parameter.


Basically, it stretches the media to fit instead of it being a small box in one corner of your screen.

AFAIK, there's no way in LSL to determine the size of a video. If you are hosting the vids yourself you could have a way for the script to check using llHTTPRequest, but probably just best to chose either 4:3 or 16:9 vids, set the scaling (auto align) on and make your prim match those dimensions.
AWM Mars
Scarey Dude :¬)
Join date: 10 Apr 2004
Posts: 3,398
03-15-2007 14:33
We are working on a project that will determine the size and aspect ratio of the streamed movie, that will interact with a smart screen, that will reformat itself to the correct size. Using autoscaling on the land can slow down the rendering processes.
_____________________
*** Politeness is priceless when received, cost nothing to own or give, yet many cannot afford -

Why do you only see typo's AFTER you have clicked submit? **
http://www.wba-advertising.com
http://www.nex-core-mm.com
http://www.eml-entertainments.com
http://www.v-innovate.com
Squeebee Wakawaka
Newbie Savant
Join date: 22 Feb 2006
Posts: 28
03-16-2007 07:18
Auto-align will certainly kill your framerate when used, just turn on the framerate monitor and you'll see the negative impact easily as soon as you hit play on the movie controller.

It's true that you cannot get media information in LSL, I assume because the script is server-side and the server never sees the media to get that info. It would be relatively easy for someone to modify the client to send the server the info, but until the server is also Open Source the big challenge would be to expose that info in LSL.

In any case the best solution I have found is to store the media dimensions in my notecard along with the media name and URL, then feed the dimensions to my screen which takes care of the scaling and resizing to fill the screen with the video and match the aspect ratio. The best part is that the client framerate takes no hit whatsoever.

I'm sure given time one could create a script to sit on a third-party server that would open a stream and read the dimensions back to the LSL script but for now a little elbow grease when adding the stream to the notecard seems to work best.