[Red5devs] flv length

Alen Ruvic - bits.ba aruvic at bits.ba
Tue Apr 15 05:38:23 PDT 2008


Hi,

my recorded videos have no Header..

I tried it with one other flv, and duration is present

alen

Alen Ruvic - bits.ba wrote:
> Hi Valentin Manthei,
> 
> thanks for your fast answer.
> i modified your code a little bit:
> 
> durat is Dynamic Text
> 
> var ns:NetStream = new NetStream(nc);
> ns.onMetaData = function(meta:Object)
> {
>    for (var propName:String in meta)
>    {
>      durat.text = propName + " = " + meta[propName] + "//";
>    }
> };
> 
> I get this as result:
> 
> audiocodecid = -1//
> 
> 
> Valentin Manthei wrote:
>> Hi Alen,
>>
>> you can get some information about the FLV file through its meta data.
>> In ActionScript it is necessary to register a handler for the onMetaData 
>> event. Using your code sample that would be something like this:
>>
>> var nsObj:Object = new Object();
>> nsObj.onMetaData = function(meta:Object) {
>> 	trace(meta.duration);
>> };
>>
>> var rtmpNow:String = "rtmp://192.168.0.100/demo";
>> var nc:NetConnection = new NetConnection();
>> nc.connect(rtmpNow);
>> var ns:NetStream = new NetStream(nc);
>> ns.client = nsObj;
>>
>> local_video.attachVideo(ns);
>> ns.play(fguid, 0);
>>
>>
>> Best regards,
>> Valentin Manthei
>>
>>> hi red5devs,
>>>
>>> i need to show in my flash on the client side the total length of the 
>>> FLV i seconds i'm playing with this code:
>>>
>>> var rtmpNow:String = "rtmp://192.168.0.100/demo";
>>> var nc:NetConnection = new NetConnection();
>>> nc.connect(rtmpNow);
>>> var ns:NetStream = new NetStream(nc);
>>>
>>> local_video.attachVideo(ns);
>>> ns.play(fguid, 0);
>>>
>>> how to determine and get the length of the FLV and send it to the client?
>>>
>>> i found this post from Dominick Accattato
>>> http://osflash.org/pipermail/red5_osflash.org/2005-December/001647.html
>>>
>>> and he uses "org.red5.io.flv"
>>>
>>> where can i find an example how to write an server-side application to 
>>> use "org.red5.io.flv" and to send the result to the client...
>>>
>>> thanks....
>>>
>>>   
>>
>> _______________________________________________
>> Red5devs mailing list
>> Red5devs at osflash.org
>> http://osflash.org/mailman/listinfo/red5devs_osflash.org
> 
> 


-- 
Alen Ruvic
CEO & IT Consultant
BITS d.o.o. Sarajevo
71000 Sarajevo, BiH
Tel:+387/33-555-345
Fax:+387/33-555-346
Email:aruvic at bits.ba
www.bits.ba



More information about the Red5devs mailing list