Link to home
Start Free TrialLog in
Avatar of Kani Str
Kani StrFlag for India

asked on

To get the FLV Video dimension

Can anybody help me how to get the FLV video files height and width,resizing swf player size?
SOLUTION
Avatar of sam85281
sam85281

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
Avatar of Kani Str

ASKER

no, that's not I wanted.

I need to find the actual width and height of the video, i will load videos into the player dynamically...
Howdy...  :)

Check on the metadata...  It normally contains the dimension information but not all FLV file contains that data though...

CyanBlue
Thanks for your reply, I tried the following. But it is only working when i set the content path to some video on the internet, (i.e it gives me the width and height if i set a fully quailified URL like http://mysite.com/sample.flv) but it doesn't return anything if i set something like  c:\samplevideo.flv

Here is the code i tried with...

var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var nStream:NetStream = new NetStream(netConn);
my_video.attachVideo(nStream);
nStream.setBufferTime(0);
nStream.play("http:\\www.video.com\video\video.flv    \\ this is working
nStream.play("d:\test.flv");  \\ this is not working
nStream.onMetaData = function(myMeta) {
     trace("FLV Width: "+myMeta.width);
     trace("FLV Height: "+myMeta.height);
     my_video.width = myMeta.width;
     my_video.height = myMeta.h
};
SOLUTION
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
If you have created the FLV using Flash then for sure Flash does not store height/width meta data
Nope, i usually create the flvs using FFMPEG
ASKER CERTIFIED SOLUTION
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
SOLUTION
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
Actually I am trying to achive a flv player (desktop application), that will be using the physical path (i think you know this)

Do i need to download both the dos and GUI version of the application, what exactly this will do?
SOLUTION
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
ok, i will give it a try
SOLUTION
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
i think there must be a way in Flash 8 to do this?
SOLUTION
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