Link to home
Start Free TrialLog in
Avatar of marcparillo
marcparillo

asked on

Displaying 16:9 and 4:3 video in Flash

Hello Experts,

I am using the NetConnection object to stream video to an Actionscript-controlled video container.  If I set the dimensions of the video container to 596x336 (16:9) and I display a 4:3 video in that container, the 4:3 video is stretched to fit the 16:9 video dimensions.  

Is there a way to set the 16:9 video container to play 4:3 video without stretching the video?   Ideally, if 4:3 video is played inside the 16:9 container, the 4:3 video is not stretched and displayed with the proper dimensions in the center of the 16:9 holder.  

What's the best solution?

Thanks
Avatar of Morningside-Church-IT
Morningside-Church-IT

What are you using to actually encode the video you are streaming?  I would look at it on that end to find the anamorphic settings of your encoder.  This will allow the video to be displayed at the proper resolution in the player regrdless of 16:9 or 4:3.
Avatar of marcparillo

ASKER

Thank you.  I am using ffmpeg to encode wmv videos to flv format.   What do you mean by "anamorphic settings?"  And, regardless of what aspect ratio the video is encoded, doesn't Flash automatically scale the video to fit the dimensions of the embedded player?  I guess I'm looking for a way to override this scaling feature, if that's the case.

ASKER CERTIFIED SOLUTION
Avatar of CyanBlue
CyanBlue
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks CyanBlue,

Your suggestion is what I was leaning towards.   Since the video has to be loaded first to get the metadata, I thought I would:

1. hide the video container
2. load meta data
3. once i get the width and height information, resize the player
4. once the player is resized, show the player and automatically start the video

Is that the best solution?
Exactly...  ;)

CyanBlue