[Red5] RMTP client (Flash Player) play FLV too fast
Yidong Fang
fangyidong at gmail.com
Wed Aug 30 11:37:29 EDT 2006
Hi,
I'm new to AMF and FLV and Flash.
I'm implementing a RMTP server in C++ (supports FLV streaming
only),and I've almost done everything include AMF parsing,client side
call receiving and server side responsing and FLV content
sending.Here's the flash client AS code:
//----code begin-----
trace("hello");
var my_nc:NetConnection=new NetConnection();
my_nc.onStatus = function(info){
trace("Recording stream status.\n");
trace("Event: " + info.code + "\n");
trace("Type: " + info.level + "\n");
trace("Message:" + info.description + "\n");
};
my_nc.connect("rtmp://127.0.0.1:8800/test");
var my_ns:NetStream=new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.play("t1");
//----code end-----
My server listens on 8800,and everything is ok except one problem:
When my RMTP server sends FLV tags to the Flash Player (after
receiving the 'play' call), it play too fast and when I do a pause (
sleep for 10ms) it seems closer to the normal playing. What's the
problem? What's the timestamp of FLV tag for? Should I slow down the
speed of data transfering in the server side ?
Thanks.
--
JSON: Action in AJAX!
JSON - http://www.json.org
JSON.simple - http://www.json.org/java/simple.txt
More information about the Red5
mailing list