• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to publish self-composed bytes array as video ?

Guest
Oct 02, 2010 Oct 02, 2010

Copy link to clipboard

Copied

So far I only find the way to publish camera video as stream: attachCamera()


Is it possible to publish self-composed bytes array as video ?

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 06, 2010 Oct 06, 2010

Copy link to clipboard

Copied

I don't think this is possible - as far as i know there is no such API in Flash Player which would allow publishing the way you are asking.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 07, 2010 Oct 07, 2010

Copy link to clipboard

Copied

i don't believe there's a way to inject bytes into a publishing NetStream and have it encapsulated as though it was a video message.

however, you could do NetStream.send("onVideoBytes", myBytes) at the publisher, and receiver(s) could, in their onVideoBytes() handler, use NetStream.appendBytes() on a different NetStream (connected to a video component) to display your generated video data.

using appendBytes() properly for this purpose is an exercise for the reader. 

-mike

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

Hi Mike,

what about use what you said with FMS ? is it theorically should work ?

as I use netstream.send("onVideoBlah",byteArray) to fms and on fms should I use

nestream.play(null) also to broadcast the stream to other clients ?

thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

FMS doesn't have appendBytes.

if your publisher is doing NetStream.send(), then all subscribers (whether P2P or through FMS) will receive your onVideoBlah callback.  the subscribers can use appendBytes to inject the ByteArray for display.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

ok understood.

but will it work if :

- is use netstream.send():

- I grab this stream on fms side and publish from it to another fms/rtmp server

??

thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

in other word I would like to inject these bytes and play it from fms

with a Stream object and play it from any rtmp player...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

NetStream.send() messages a part of the stream, just like video and audio messages.  if you publish a stream to FMS that has NetStream.send()s in it, and republish that stream on FMS, then any subscribers will get the corresponding callback for what you specified in NetStream.send().

you can't inject a video or audio message into a stream programatically.  FMS does not have anything like NetStream.appendBytes().  appendBytes() is only for playback in the client; the bytes you append only go into the display pipeline, never into the network pipeline.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

ok it's more clear now thanks.

you talk about video, but for sound is it the same ?

if yes so the only way to play it on a client would be

a handler that catch these bytes and put it on a video or sound object ?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 12, 2011 Apr 12, 2011

Copy link to clipboard

Copied

NetStream.appendBytes() lets you add video, audio, and data (NetStream.send()) messages to the display/render pipeline.  appendBytes() takes FLV data of any valid FLV message types.

whatever you put into a NetStream.send() will come out at all the subscribers.  NetStreams play back video, audio, and data (that's how your NetStream.send() on the publisher turns into a callback at the subscribers).  so if you appendBytes an FLV with timestamped audio, video, and data, then the video, audio, and data will play back on that NetStream just as if the messages came over the network.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 13, 2011 Apr 13, 2011

Copy link to clipboard

Copied

LATEST

thanks Mike, it's perfectly clear now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines