Solved

Displaying 16:9 and 4:3 video in Flash

Posted on 2008-10-15
5
772 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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…
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.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

726 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