Tuesday, March 23, 2010

Streaming changes between Flash 9 and 10

OK, it would seem that Adobe have made some kinds of changes to RTMP video streaming between Flash 9 and Flash 10.聽 I'm just not sure quite how Flash 10 is supposed to work.

I have set up a test URL to illustrate the problem I'm having, here: http://www.game-point.net/misc/swftest/swftest2/

Connect to 'server3' and 'stream1' or 'stream4' (stream1 will usually be streaming).

Now I'm using Red5 to send a live stream from an IP camera, which that Flash applet tries to connect to using a NetConnection and a NetStream.聽 You'll notice that in Flash 9, the 4-second buffer fills up and just starts playing, but in Flash 10, it fills up and then the buffer suddenly drops to empty!聽 What have Adobe done in Flash 10 that causes this behaviour?聽 I'm hoping there are some Flash gurus who can sniff the traffic for that demo above using Wireshark or something, and maybe give me some tips on what I'm doing wrong.

I'm using the Sorenson Spark codec, and I'm starting timestamps from 0 and incrementing them by 100 per frame, the stream is at 10FPS.聽 I just can't figure out why Flash 10 discards that 4 second buffer it has built up.

Oh, and I'm now sending an empty audio RTMP packet before every video keyframe, because I was told that that makes Flash sync the stream on video instead of audio (I don't wish to send any audio, just a video-only stream).聽 But with or without that audio packet, I get the same broken behaviour in Flash 10.

Help?

Best regards,

Jeremy Morton (Jez)

No comments:

Post a Comment