mickeyboss123 / haxevideo

Automatically exported from code.google.com/p/haxevideo
0 stars 0 forks source link

cant get flv duration through netStream.client.onMetaData #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I need to retrieve the duration of the flv media file, my orignal codes
works on RED5 and FMS, but cant retrieve the data when i implement with
haxevideo.my code is below with AS3. 

What is the expected output? What do you see instead?
 - I need the duration of the flv, but see nothing.

What version of the product are you using? On what operating system?
 - Latest version of Haxevideo widh window xp

Please provide any additional information below.
var ns:NetStream = new NetStream(nc);
var vid:video = new Video(10,10);
addChild(vid);
var client:Object = new Object();
ns.client = client;
client.onMetaData = nsMetaDataCallback;
vid.attachNetStream(ns);
ns.play("XXXXXX");

function nsMetaDataCallback(mdata:Object):void {
trace("FLV total time:" + mdata.duration);
}

Original issue reported on code.google.com by manescla...@gmail.com on 30 Jun 2009 at 3:44

GoogleCodeExporter commented 8 years ago
The duration is only available with haXeVideo if it's been inserted into the
metadata. FMS and RED5 are calculating it if it's not present but that requires 
to
parse the whole FLV and is then a very expensive operation.

Original comment by ncanna...@gmail.com on 30 Jun 2009 at 7:18