1
votes

According to the NetStream API, Flash can play LOCAL RAW video by calling ns.play("raw:filename");.

My question is how can Flash play RAW video data from a ByteArray? I have basically set my NetStream object to data generation mode by calling play(null), but whenever I call ns.appendBytes(byteArray) nothing is happening because apparently, appendBytes only support FLV data.

So now I hope that someone has also encountered this before, how can I make Flash play raw video data from a ByteArray?

1

1 Answers

2
votes

Essentially, you can't use appendBytes for a RAW file type.

You should be able to play your video using ns.play("raw:filename").

In terms of Flash Media Encoding, RAW is a FLV file fragment, published from the Flash Media server (usually).

If it's not acceptable to play the filename, you may need to convert the RAW file (i.e. FFmpeg) to encode the video into FLV format and then stream. However, I don't believe RAW files can be converted, or will require Flash Media Encoding to change: http://help.adobe.com/en_US/flashmediaserver/devguide/WSecdb3a64785bec8751534fae12a16ad0277-8000.html