[Red5] Metadata from streaming flv

John Kirby jjkirby at comcast.net
Mon Nov 20 15:26:30 EST 2006


Louie -

If you implement something like this:

Set up NetStream, event handler and stream metadata


stream = new NetStream(nc);
stream.addEventListener(NetStatusEvent.NET_STATUS, streamStatusHandler);
var client:Object = new Object();
client.onMetaData = onMetaData;

Create a timer once stream has started and at some interval check 
progress.  You can also use setinterval in lieu of timer

myTimer = new Timer(1000,0);
myTimer.addEventListener(TimerEvent.TIMER,timeHandler);  
myTimer.start();


public function onMetaData(info:Object):void {
                    duration = info.duration;
                    fRate = info.framerate;
                    totalBytes = info.bytesTotal;
                    metaWidth = info.width;
                    metaHeight = info.height;
}


public function timeHandler(event:TimerEvent):void{
            elapsedTime = stream.time
            // Do something else  to monitor
           
        
           
  }

Louie Penaflor said the following:
>
> I'd like the timecodes (position of playback in a stream).  Flv's 
> allow us to set this hardcoded in the flv, or from an external xml 
> file.  I thought it's considered as "meta data" in the stream.  Thanks 
> and I look forward to your reply.
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* Red5-bounces at osflash.org [mailto:Red5-bounces at osflash.org] *On 
> Behalf Of *John Grden
> *Sent:* Monday, November 20, 2006 9:17 AM
> *To:* Red5 at osflash.org
> *Subject:* Re: [Red5] Metadata from streaming flv
>
>  
>
> I'm not sure what you're after - your subject is about metadata (for 
> which I think you'd want duration) but your question is about getting 
> timecodes (position of playback of a stream).
>
> which one were you interested in?
>
> On 11/20/06, *Louie Penaflor* <lpenaflor at woccu.org 
> <mailto:lpenaflor at woccu.org>> wrote:
>
> Anyone know of any demos with getting timecodes from flv's streaming?
>
>  
>
> Louie Penaflor
>
> Web Software Developer
>
> World Council of Credit Unions, Inc.
>
> Ph: (608)231-7932
>
>  
>
> This is a transmission from World Council of Credit Unions, Inc. and 
> contains information that is confidential. If you are not the intended 
> addressee or authorized to receive for the addressee, then any 
> disclosure, copying, distribution, or use of the contents of this 
> message is prohibited. If you have received this transmission in 
> error, please destroy it and notify the sender immediately at the 
> transmitting e-mail address. If you are the intended recipient, please 
> be advised that this e-mail transmission is not encrypted or otherwise 
> protected from potential misappropriation or misuse. World Council of 
> Credit Unions, Inc. expressly disclaims any and all liability for harm 
> resulting from the misappropriation, interception or misuse of the 
> information contained in this transmission.
>
>  
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org <mailto:Red5 at osflash.org>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>
>
> -- 
> [  JPG  ]
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>   

-- 
/Whether you think that you can, or that you can't, you are usually right./
 - Henry Ford
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20061120/2c37ff12/attachment.htm


More information about the Red5 mailing list