Skip to main content
Participant
August 4, 2011
Question

FMS 4 using RTMFP insted of RTMP -> Tutorial?

  • August 4, 2011
  • 1 reply
  • 1326 views

Hi,

I used the FMS  3.5 for some time now to stream a Webcampicture to one Client via RTMP. It works great, but because of the Latency I decided to try RTMFP instead. I have a FMS 4 now, but I can only find Tutorials about RTMFP with the stratus-service not with FMS4. Obviously it's not much different, but I couldn't find any information if there is a testapplication installed (like the "live"-App I'm currently using), which RTMFP-Adress I have to use and do I still need a Developerkey?

This is the code I'm using at the Moment in Flash CS5 to publish a stream:

import flash.display.Sprite;
import flash.events.*;
import flash.media.Camera;
import flash.media.Video;
import flash.net.NetStream;
import flash.net.NetConnection;

var video:Video;
var ns1:NetStream;
var ns2:NetStream;
var nc:NetConnection = new NetConnection();
var camera:Camera = Camera.getCamera();

//init
   camera.setMode(160,120,15,false);
    camera.setQuality(0,75);
    video = new Video(380, 240);
    addChild(video);
    nc.objectEncoding = 0;
    nc.connect("rtmp://localhost/live");
    nc.addEventListener("netStatus", onNCStatus);
   

function onNCStatus(event:NetStatusEvent):void {
            trace("Connected to Server");
            ns1 = new NetStream(nc);
            ns1.attachCamera(camera);
            ns1.publish("myStream", "live");
            ns2 = new NetStream(nc);
            ns2.play("myStream");
            video.attachNetStream(ns2);
}

What would be the easiest way to change my Code to RTMFP? Can someone point me in a direction or give me some good tutorials which rely on FMS4?

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    August 4, 2011

    to use RTMFP with your Flash Media Server, simply add an "f": "rtmp://host/app/instance" -> "rtmfp://host/app/instance".

    be sure to disable aggregate messages, use live unbuffered mode (NetStream.bufferTime=0), and the Speex codec for optimum latency performance.  setting bufferTime to 0 and using Speex will enable RTMFP's partially-reliable transmission mode.

    Participant
    August 21, 2011

    Thanks Michael for your response! But things like codec, etc. is for optimisation, I still have problems getting a simple application to run.

    I found an article in the "Adobe Developer Connection"  which is exactly what I was looking for:

    http://76.74.170.157/post_Sample_RTMFP_Multicast_Player-18331.html#ionComHeading

    The Problem is that the included Files can't be downloaded. Can someone help me with that or knows a way how to contact the Author of this article?

    Thanks again.