Flatland

Tutorial

16 | Stretching Streaming Media

You can also take a single video stream and stretch it across several blocks to give yourself a larger video screen. (It is important to remember though that stretching the video to be larger than it was originally intended will degrade the quality of the image, just like it does for textures.) This is accomplished by specifying exactly what part of the video image to place on each block. Here’s the syntax for the < create> tags for part of a video on a full block:

< create symbol="#" block="full">
< part name="part_name" stream="stream_name" rect="x1,y1,x2,y2"/>
< /create>

x1,y1 refers to the top left corner of the rectangle, and x2,y2 refers to the bottom right corner.

The values for x and y can be expressed either as a specific number of pixels or as a percentage of the total width/height of the video. For example: Lets say you want to stretch a video that is 160×120 across 2 full blocks sitting side by side. The < create> tags for those blocks could either look like this:

< create symbol="1" block="full">
< part name="part_name" stream="stream_name" rect="0,0,80,120"/>
< /create>

< create symbol="2" block="full">
< part name="part_name" stream="stream_name" rect="80,0,160,120"/>
< /create>

OR, they could look like this:

< create symbol="1" block="full">
< part name="part_name" stream="stream_name" rect="0%,0%,50%,100%"/>
< /create>

< create symbol="2" block="full">
< part name="part_name" stream="stream_name" rect="50%,0%,100%,100%"/>
< /create>

Now lets look at an example that stretches a video across a video wall that is 2 blocks high and 3 blocks wide. We’ll also keep a largetv block on either side of the wall to compare the quality of the smaller video with the one that is enlarged. Look at the diagram below to understand how the video is broken up onto the 6 different blocks.

Notice the difference in the quality of the video when it is blown up to the larger size. Just like with gif and jpeg images, stretching a video to fill a larger space will cause pixelization.

show me the code show me the spot next lesson

Welcome | Starting | Head Tag | Body Tag | Multilevels | Navigation | Textures | Orientation | Linking | Sound | Lighting | Popups | Sprites | Actions | Streaming 1 | Streaming 2 | More Blocks | Tips & Tricks | Orientation Guide | Texture Styles