actionscript-3netstreamnetconnection

RTMP stream of a+v plays only audio, no video


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?


Solution

  • 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.