Question

In Flash, AS3, I am using NetConnection to connect to a RTMP server, then I use NetStream to play a video+audio stream.

I attach the stream (attachNetStream) to a flash.media.Video instance that is added to stage (double checked that it is ON the stage) and play it, but all I get is the sound of the stream that's being played - no video is displayed.

Note that even though I cannot see the video, when I listen to the onMetaData of the stream I can get plenty of information about the video such as width, height, FPS (changes during playback as if a video is shown), number of decoded frames.

Does anybody have an idea how can I make the video work too?

Was it helpful?

Solution 2

Thank you guys! but I found out the answer:

Apparently Flash's (CS3) built-in Video class does not support H.264 streams. I tried to compile the exact same code in Flex 3.5 and everything worked!

There is a possibility that CS4 also supports H.264 streams. I did not try.

JWPlayer is great, I did not try Pyro.

Cheers.

OTHER TIPS

Instead of using "raw" NetConnection and NetStream and attach it to a flash.media.Video, I'd recommend using some wrapper such as Pyro Player. Its basically a video API and I've used it many times for RTMP video and it works like a charm (I've always found the Video component from Adobe very buggy, specially when displaying video from a RTMP server). Give it a try!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top