I can't play a valid RTMP stream in OSMF

1.5k views Asked by At

I'm building an application with an Strobe Media Playback in it and I can't play a RTMP stream.

The weird thing here is that I can play the stream on JWPlayer and even in a simple Flash video player with the classic NetStream and NetConnection code.

http://www.longtailvideo.com/jw-player/wizard/

This is the stream: rtmp://fl.world-television.com/streamstudio/vod/flv:endesa/20130422/video_full_es_v2.flv

I don't know if I need to set up any special configuration through the OSMF params.

This is how I have been played the video in a simple Flash CS application.

package {
    import flash.display.Sprite;
    import flash.events.NetStatusEvent;
    import flash.events.SecurityErrorEvent;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.events.Event;


    public class VideoTest extends Sprite {
        private var videoURL:String = "rtmp://fl.world-television.com/streamstudio/vod/flv:endesa/20130422/video_full_es_v2.flv";
        private var connection:NetConnection;
        private var stream:NetStream;

        public function VideoTest()
        {
            initialize();
        }

        private function initialize():void
        {
            connection = new NetConnection();
            connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
            connection.connect("rtmp://fl.world-television.com/streamstudio/vod/" );
        }


        private function netStatusHandler(event:NetStatusEvent):void {
            trace("net status handler: " + event.info.code);
            switch (event.info.code) {
                case "NetConnection.Connect.Success":
                    connectStream();
                    break;
                case "NetStream.Play.StreamNotFound":
                    trace("Stream not found: " + videoURL);
                    break;
            }
        }

        private function securityErrorHandler(event:SecurityErrorEvent):void {
            trace("securityErrorHandler: " + event);
        }


        private function connectStream():void
        {
            stream = new NetStream(connection);
            stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            var video:Video = new Video();
            video.attachNetStream(stream);
            stream.play("endesa/20130422/video_full_es_v2");
            addChild(video);
        }
    }
}

I really think that the problem here is that OSMF it's not slicing the URL correctly and it's trying to connect (NetConnection) or trying to play (NetStream) a bad String.

EDIT:

Solved removing "/vod" in the URL.

You could try it here:

http://osmf.org/dev/2.0gm/debug.html?wmode=direct&width=470&height=320&src=rtmp%3A%2F%2Ffl.world-television.com%2Fstreamstudio%2Fendesa%2F20130422%2Fvideo_full_es_v2

0

There are 0 answers