Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

overstretch problem

35 replies [Last post]

Won't work for me - have to kinds of photos - Landscape and portrait -
I'd like to see portrait photos resized with white or black left/right border. Now it rescale it width and height

http://www.upr.org.pl/main/multimedia.php?strid=1&type=foto

and second kamera has more portrait fotos: eg. HPIM9251.JPG

First, unless you have modified the player, there is not a flashvar 'title', so remove this code. Title is only usable in playlists as a tag.

s.addVariable("title", theTitle);

Second, I don't see the flashvar 'overstretch' anywhere in your player code. Did you remove it temporarily?

Overstretch [true,false,fit,none] should be used like this:

s.addVariable('overstretch', 'false');

When testing, you should re-start your browser if you have changed the 'overstretch' value because it seems to become "stuck" in the browser's memory and won't show the change until you have re-started your browser or kicked the computer several times. :)

BTW, nice use of case in your JS.

Well - I'm sure that Title - works :D - at video section there is TV, and inside it there is a current played title - this is THE TITLE (when I removed

s.addVariable("title", theTitle)

Title changed into: Undefined ;D

Now I add

s.addVariable('overstretch', 'false');

and...

on IE its TOOOOOO BIG and on Firefox nothing happens

@Tomasz Brzezina
try s.addVariable('overstretch', 'fit');

the "undefined" means that the player cant find any playlist, and instead you can then write in the first playlist line using the undocumented title flashvar.

btw. you really got me totally confused for a moment, by calling your video .wmv in that title ;)

actually the "title" flashvar is not completely undocumented - from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url] under playlists:
"Note that, if you play a single file, you can send each item in this table as a flashvar to the SWF. This way, you can add an image, title, id, link, etc. to a single file as well."

The flashvar works indeed, but it seems to be a bit useless for single files. That's why I discarded it from the list with flashvars (there's so many already...)

Ok - what about overstreching? It still doesn't work.

using your code, this is what I see:

s.addVariable('overstretch', 'true');  // expands to fit h & v   "true"  -will stretch them proportionally to fill the display

s.addVariable('overstretch', 'false'); // expands to fit h or v  "false" -will stretch them to fit

s.addVariable('overstretch', 'fit');   // expands to fit h & v   "fit"   -will stretch them disproportionally to fit both height and width

s.addVariable('overstretch', 'none');  // displays native size   "none"  -will show all items in their original dimensions

'true' & 'fit' appear to do the same thing, they fill the display area both horizontally & vertically.

'false' expands to fit horizontally or vertically, whichever fills up first.

'none' displays the image in its native resolution (no expansion h or v)

That's on IE & Opera, don't use FireFox (too buggy).

Hello :),

Even with IE, overstretch (fit) doesn't work well.
I've opened a new thread with "aspect ratio".

The pb is when playing a playlist mixing videos and photos, it fits ok the photo but sticks this aspect ratio to the next video.
I have to refresh the page to correctly display the videos.

There should only be 3 parameters (since 'true' and 'fit' are the same), and 'fit' (default) should fit every item of a playlist.

(maybe the term "overstretch" is not clear, too 8))

Eric.

@EricH
maybe try set width and height in the flashvars on your player!

from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]:
overstretch (true,false,fit,none): Defines how to stretch images/movies to make them fit the display. "true" will stretch them proportionally to fill the display, "false" will stretch them to fit. "fit" will stretch them disproportionally to fit both height and width. "none" will show all items in their original dimensions. Defaults to "fit" for the players and "false" for the rotator.

from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]:
If you get strange display errors on IE (most notably after refreshing), the Stage dimensions are probably not properly set. You can use flashvars "width" and "height" to force specific dimensions to the player/rotator and fix this problem.

Hello Andersen,

Thank you for your advice;
(parenthesis: what about 'false' ? maybe you or Jeroen should precise "proportionally" or "disproportionally" in the readme)

So I must specify:
overstretch=true
(because default=fit will not respect original ratio)

and "width" and "height" as well (because IE needed them).

:s Unfortunately, same result: the video fits disproportionally
(Firefox and IE)

Here is my code: I've exagerated the dimensions 425x353 ---> 425x200
(to point out the aspect ratio)

The orginal video is YouTube, thus 320x240, usually displayed 425x353
(other parenthesis :): 353 is far to be equal to 425*240/320)

<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s2 = new SWFObject("flvplayer.swf","playlist","425","600","7");
s2.addParam("allowfullscreen","true");
s2.addVariable("file","titi2.xml");
s2.addVariable("width","425");
s2.addVariable("height","600");
s2.addVariable("displayheight","200");
s2.addVariable("overstretched","true");
s2.write("player2");
</script>

Eric.

The flashvar is not spelled correctly.

s2.addVariable("<strong>overstretched</strong>","true");

Should be "overstretch" without the "ed".

@EricH
Should be "overstretch" without the "ed".
so you have been using "fit" all the time!
from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]: ...Defaults to "fit" for the players...

@Will - (b)

aaahhhhhh..... :)

Hello,

and many thanks. :)
But you won't beleive it, it still doesn't work :@
(Firefox, IE, even after having deleted all caches).

Hereis my code (I exaggerated the display 425x353 ---> 625x153)

<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s2 = new SWFObject("flvplayer.swf","playlist","625","600","7");
s2.addParam("allowfullscreen","true");
s2.addVariable("file","titi2.xml");
s2.addVariable("width","625");
s2.addVariable("height","600");
s2.addVariable("displayheight","153");
s2.addVariable("overstretch","true");
s2.write("player2");
</script>

Here is my playlist (2 YouTube videos):

<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>

<track><location>AAAABBBBd01</location><meta rel="type">flv</meta><title>ski</title></track>
<track><location>mad_cat.flv</location><title>Burger the mad cat</title></track>

</trackList>
</playlist>

I use FLV Player 3.11

Maybe FLV videos have no fixed dimensions ?
(in VLC Player, videos properties tell me nothing)

Beleive me, I tried it many times; re-entering "overstretch","true", emptying the caches, refreshing, reloading...
addVariable (not addParam)

BTW, the effect is the same (stretched) whatever value I put in "overstretch".

But, if I put a photo in the list (JPEG file), the overstretch flashvar is effective. Unfortunately, all videos played subsequently get distorted according to the last photo displayed, as if a FLV File had no dimensions (and fit to whatever shape)...

Here is a link to my video:
http://eric.hurtebis.chez-alice.fr/objets/AAAABBBBd01.flv

Eric.

@EricH
http://eric.hurtebis.chez-alice.fr/objets/AAAABBBBd01.flv has no metadata!!

from the readme:
"If the progressbar isn't running with your FLV file, or if your video dimensions are messed-up, your FLV file doesn't have correct metadata inserted. You can fix this by using the small tool available at [url=http://www.buraks.com/flvmdi/]www.buraks.com/flvmdi/[/url]."

you can try and see for your self using the tool from this [url=http://www.jeroenwijering.com/?thread=4920]thread[/url]

:) Thanks I will try.

I got my videos in the Internet cache after running YouTube.
I tried again using, this time, www.kissyoutube.com (a YouTube videos downloader); same problem (no metadata, display messed up with ratio even with overstretch=true)

May I suggest: today, many FLVs come from YouTube (accept it or not), so FLV Player should adapt to it. Even if there is no metadata, VLC Player displays such a FLV with correct display/ratio.
Many thanks anyway for FLV Player, I greatly appreciate it.

;)
Eric.

@EricH - i dont think vlcplayer uses flash or can be used online...

ok, I (partially) understand.

To summary:
to inject width and height into FLV metadata, I entered:

flvmdi mad_cat.flv /k

(or any video from YouTube: they have metadata, but not width and height)
and now "overstretch" is effective.

overstretch=true
aspect ratio correct, but display loss at the edges

overstretch=false
aspect ratio correct, with black borders

overstrech=fit
disproportionally fits (no black border, no loss)

overstretch=none
as is (aspect ratio correct), but black borders and edge losses

Finally, overstretch=false fits my needs.

Also:
width and height flashvars are necessary for IE

Again, many thanks,
Eric.

@EricH - glad it worked out :)

May I suggest to modify the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]:

Presently:

# overstretch* (true,false,fit,none): Defines how to stretch images/movies to make them fit the display. "true" will stretch them proportionally to fill the display, "false" will stretch them to fit. "fit" will stretch them disproportionally to fit both height and width. "none" will show all items in their original dimensions. Defaults to "fit" for the players and "false" for the rotator.

Proposition:

# overstretch* (true,false,fit,none): Defines how to stretch images/movies to make them fit the display. "true" will stretch them proportionally to totally fill the display (may cause losses at the edges), "false" will stretch them proportionally to fit totally (may cause black borders). "fit" will stretch them disproportionally to fit both height and width. "none" will show all items in their original dimensions. Defaults to "fit" for the players and "false" for the rotator.

Eric.

Hello,

Context: JW FLV Player 3.11, display is stretched if no metadata.
See [url=http://www.jeroenwijering.com/?thread=5575&#msg37856]this wish[/url]

Here is a [url=http://eric.hurtebis.chez-alice.fr/objets/toto.htm]clear example[/url] which will point out this, with a playlist:
- first item: FLV with no metadata height and width (YouTube video)
- 2 other items (JPEG and FLV): have explicit width and height info

1st item, when played, fits to current display dimensions (whatever the "overstretch" value might be).
After being played, the 2 other items force/impose their dimensions to the 1st one.
(here, overstretch=none, for the effect to be clearly visible)

Regards,
Eric.

:)hay guyss i can't make a chatt room, can you help?

Hi,
I have been struggling with this issue for the last 3 days. Please help me!

I am using the mediaplayer and this is the code in my html:
<script type="text/javascript">
var s1 = new SWFObject('mediaplayer.swf','player','456','340','8');
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("wmode","opaque");
s1.addParam("bgcolor","#000000");
s1.addVariable("file","video.flv");
s1.addVariable('autoscroll','true');
s1.addVariable('lightcolor','0x0099CC');
s1.addVariable("overstretch","fit");
s1.write('container');
</script>

I want my player of 456 X 340, while my video should play at width & heigth of 400 X 300. If I add 'displaywidth' and 'displayheight' , i don't achieve what i want as it gives space for playlist and not for video :(
I hope my query is clear, pleas let me know how to do this...

Your video file must be encoded at 400x300. The player can only play it at it's encoded size or stretch it to fit the display area. If your video file is 400x300, then this code will display your video centered in the display area of a player with external dimensions of 456x340, including the control bar.

      var s1 = new SWFObject('mediaplayer.swf', 'player', '456', '340', '7');
          s1.addParam('allowfullscreen',        'true');
          s1.addParam('allowscriptaccess',      'always');
          s1.addParam('wmode',                  'opaque');
          s1.addParam('bgcolor',                '#000000');
          s1.addVariable('file',                'Hitchhikers.flv');
          s1.addVariable('width',               '456');
          s1.addVariable('height',              '340');
          s1.addVariable('displayheight',       '320');
          s1.addVariable('overstretch',         'none');
          s1.addVariable('lightcolor',          '0x0099CC');
          s1.write('container');

I wish i could send u an image of what i am actually trying to achieve :(
But, anyways, do u mean to say that my ' flv ' should be 400x300, and only then i will be able to show it on a 456x340 player and that there is no way through which we can resize any 'flv file' to 400x300 during runtime?
actually, i mean to center the video in the player with the controls at the bottom on the player and on full screen the video should play by filling up the whole screen...

Your video file must be encoded at 400x300. There is no way for the player to resize it to 400x300. The player can only display the video at it's encoded size or stretch the video to fit the display area.

If you choose overstretch=none, the fullscreen will display at 400x300 also.

Sorry for bugging you, but are you dead sure about this? Because, I'll be going to tell this to my client and maybe also show your answer!
At first I thought this is possible by altering either the fla or the .as files and later on the html code, but the problem as u say is that on full screen also it appears at 400x300!

No, I'm not dead sure about anything.

Yes, anything can be achieved by editing the ActionScript and recompiling.

Hi,
I have followed the last few posts here.
jazzie, do you know how to achieve what 'div' has asked?
This is something i haven't seen anywhere, people are just using up the player and not editing the display area or asking for adding new buttons in the existing player. Or maybe, I have not seen the other uses... ;)
Anyone to help customizing the player please!!! The moment 'I' tried editing the flash, everything went wrong :(
I did not at all find editing the source files easy, there are 29 intimidating Actionscript files in the 'source'!!!

jazzie, do you know how to achieve what 'div' has asked?

I'm not an ActionScript programmer, so I don't know how to achieve the display control in the ActionScript. And it can't be achieved in the standard mediaplayer.

Can anyone else please help solve this?

nomatter what I do, I cannot get the image rotator to show anything but "stretch to fit" or "fit". All my photos are now stretched and everybody looks fat. I have tried every one of the 4 options, but nothing changes what shows in the player.

UPDATE! I FINALLY HAVE THE ANSWER TO THIS PROBLEM!!!!!
O.K. after hours of testing, I figured out why overstretch doesn't work for some people.
The magic number is 1996.
If your image is wider than 1996 pixels, overstretch will not work.
If it is 1996 pixels or smaller in width then all is fine.
(not sure about height limit)
I have tested this on numerous images and the results are always the same - 1996 is the limit!
Not sure where this number comes from, but you all can test it out for your self.

Now to figure out why "allowfullscreen" doesn't work when it's on a server, but it does work on my computer.

@Oliver Bujdoso - 1996 ?
- sounds like one for the "Bug Reports Forum" - http://www.jeroenwijering.com/?forum=Bug_Reports

Nevermind!
It still stretches funny vertically. :-(
I resorted to using SlideShowPro, but it doesn't have the cool transitions.

finally figured out why image rotator wouldn't fit or do things proportionally for SOME images.

i believe the issue is the FILE SIZE and probably memory limit available to the flash app to manipulate the image.

by resizing some big images, they display right in all modes as far as i can tell.

hope this helps!