Solved

Displaying 16:9 and 4:3 video in Flash

Posted on 2008-10-15
5
759 Views
Last Modified: 2013-11-11
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
0
Comment
Question by:marcparillo
  • 2
  • 2
5 Comments
 

Expert Comment

by:Morningside-Church-IT
ID: 22727243
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.
0
 
LVL 3

Author Comment

by:marcparillo
ID: 22727799
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.

0
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 22730791
If I were doing that, I'd hide the video stream in the first place, get the metadata in Flash, calculate the aspect ratio, and then resize the video object to fit the correct video size(and add black or white background if necessary) to show it correctly...  But that might be differently handled depending on how you are displaying the video in Flash...

CyanBlue
0
 
LVL 3

Author Comment

by:marcparillo
ID: 22730844
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?
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 22733078
Exactly...  ;)

CyanBlue
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now