Steven,
Thanks for your response.
You mean when I send a FLV tag ( a frame),and when the sending AMF
header is 12 bytes,I should place the absolute ts in the header and
when the header is 4 or 8 bytes , I should place the relative ts in
the header?

I have tried sending each FLV tag with 12 bytes header in the sending
AMF,it didn't work. Here's what I've sent after receiving the 'play'
call:

1. onStatus, type:call(0x14),code: NetStream.Play.Reset
2. onStatus, type:call(0x14),code: NetStream.Play.Start
3. onStatus, type:notify(0x12),code: NetStream.Data.Start
4. 1st tag in the FLV file, type: metadata(0x12)
5. 1st video tag in the FLV file,type video(0x9), in 12 bytes header (6 chunks):
    chunk1 header : 08 00 00 00 00 02 b4 09 01 00 00 00 <data>
    chunk2 header:  C8 <data>
    chunk3 header:  C8 <data>
    chunk4 header:  C8 <data>
    chunk5 header:  C8 <data>
    chunk6 header:  C8 <data>
6.2nd video tag in the FLV file,type video(0x9), in 12 bytes header (2 chunks):
    chunk1 header: 08 00 00 42 00 00 a1 09 01 00 00 00 <data> (
absolute ts 0x42)
    chunk2 header: c8 <data>
7. 3rd video tag in the FLV file,type video(0x9), in 12 bytes header (2 chunks):
    chunk1 header: 08 00 01 0a 00 00 98 09 01 00 00 00 <data>
(absolute ts 0x010a)
    chunk2 header: c8 <data>
8. 4th video tag in the FLV file,type video(0x9), in 12 bytes header (6 chunks):
    chunk1 header: 08 00 01 4d 00 02 b2 09 01 00 00 00 <data>
(absolute ts 0x014d)
    chunk2 header:  C8 <data>
    chunk3 header:  C8 <data>
    chunk4 header:  C8 <data>
    chunk5 header:  C8 <data>
    chunk6 header:  C8 <data>


What's the problem? Thanks.

On 8/31/06, Steven Gong <[EMAIL PROTECTED]> wrote:
> Hi Yidong,
>
>
> On 8/30/06, Yidong Fang <[EMAIL PROTECTED]> wrote:
> > 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 ?
>
>
> The speed of packet sending won't affect the speed of playing as long as you
> have set the timestamp correctly. The ts in FLV is absolute. I don't know if
> you have understood the relationship between ts and RTMP header. The 12-byte
> header uses absolute ts while all other headers use relative ts. Take this
> in mind and you will get the correct result. :-)
>
> >
> Thanks.
>
> --
> JSON: Action in AJAX!
>
> JSON - http://www.json.org
> JSON.simple - http://www.json.org/java/simple.txt
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>
>
> --
> Best Regards
> Steven Gong
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>


-- 
JSON: Action in AJAX!

JSON - http://www.json.org
JSON.simple - http://www.json.org/java/simple.txt

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to