Solved

Displaying 16:9 and 4:3 video in Flash

Posted on 2008-10-15
5
765 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Action Script commands 4 312
Accessing Live Dynamic Stream 6 196
Adobe Flash Free Transform Tool 2 136
Adobe Media Server Or Encoder Broken Affer Static IP Change 4 167
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

806 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