Skip to main content
May 28, 2010
Answered

About Real-Time Streaming

  • May 28, 2010
  • 1 reply
  • 972 views

Hello, everyone,

     Now I want to use the real time streaming of flash streaming server.

     I see that the Video , Camera is supported in flex API, but I want to read stream from a port like 21999 and read the stream by socket, then directly send bytes to client and do not store the stream on disk. Is this possible?

     That's same as can i change the decode , encode, sending mechanism by modify the server ActionScript? Or using the flex API to create a rtmp mechnism myself? By the way , I 'm a java programer and not familiar with actionscript now.

     Anyway, thx.

    This topic has been closed for replies.
    Correct answer SE_0208

    thanks,

    I think i didn't described my idea.

    I know 1935 is the default port, I do not change this port, I do want open another port for input stream , get the input stream from the other port then send the stream to client by port 1935.

    I appreciate your help!


    So let's say you open port "x" in addition to 1935 and 80. So in order to achieve your use case, we can do following:

    You publisher would connect to "live" (or any other application of your choice) using uri "rtmp://<server-ip>:x/live"  and publish the stream.

    Your clients would connect to same application using default uri "rtmp://<server-ip>/live"

    In this way your publish would be from one port and subscribing would be from one port.

    Personally i have never tried it out but don't see any issue why it should not work. Can you give it try and let me know if it works. If you are facing any issue getting work , do let me know.

    Also can you tell me , why do you want to have such usage at first place, i mean what do you think would advantageous is such use case?

    1 reply

    Participating Frequently
    May 28, 2010

    Streaming exactly does that, it directly sends data to the client and does not store it on disk of client. If you are speaking of not storing stream on server also, basically you will have to use Live option, where you publish stream to FMS and clients subscribe to it. As far as port is concerned, you can configure FMS to the port you want and when connecting use that port in your URI.

    May 28, 2010

    thanks,

    yes, I do not want to store stream on the FMS.

    My flow ordered like this,

    first, the FMS listen a port for stream ,

    second, FMS accept the stream from the port and do sth others like encode or decode, then directly send the stream to client(flash stream player).

    The second step really confuse me.I don't know whether it is possible.

    and thanks for telling me that FMS can do this.

    But another question is how can i use the ActionScript to do sth , like listen to a port, or send stream to the client in the second step.

    Can you show me some code?

    Thanks!

    Participating Frequently
    May 28, 2010

    You do not have to write code on server to listen to port or send stream to the client.

    Port is configuration stuff , so you decide on ports on which your FMS would be listening. Like by default it listens to port 1935 and 80. So when your flash player client makes connection, it goes to this port by default. Now if you configure it to something else, you can specify that port when your client makes connect i.e. for example

    nc.connect("rtmp://<server-ip>:<port>/applicationName");   where <port> is port number where FMS is listening.

    You need to any coding on server-side to send stream to client. Also there is no encoding or decoding done at server-end per se, basically who publishes the stream does the encoding of the stream in format which are accepted by FMS and then decoding is done by Flash Player client.

    There is no actionscript present to do encoding or decoding per se, but you can decide on your file format when you publish the stream basically either flv or mp4 format. If you using Flash Player as publisher, you can use Sorenson Video Codec and nellymoser or Speex Audio code. However you can FMLE to get more options like On2 and H264 video codecs.

    You can go though FMS Developer Guide docs (which comes with installation) to get started off on simple examples.Also there are some samples which are present in documentation folder.

    This link also might be helpful: http://www.adobe.com/devnet/flashmediaserver/articles/beginner_live_fms3.html