3 Replies Latest reply on Sep 1, 2010 5:22 AM by Evets6bi

    DynamicStreaming with DVR

    mrbrez

      Hi All,

      below my code that doesn't works:

       

      private function init():void

      {

      mps = new MediaPlayerSprite();

      addChild(mps);

       


      var netLoader:DVRCastNetLoader = new DVRCastNetLoader();

      var videoElement:VideoElement = new VideoElement(null, netLoader);

       

      var dynResource:DynamicStreamingResource = new DynamicStreamingResource("rtmp://localhost/dvrcast_origin", StreamType.DVR);

       

      dynResource.streamItems = Vector.<DynamicStreamingItem>(

      [ new DynamicStreamingItem("mp4:livestream1", 1500, 640, 480),

        new DynamicStreamingItem("mp4:livestream2", 1000, 640, 480),

        new DynamicStreamingItem("mp4:livestream3", 500, 640, 480)

      ]);

       

       

      videoElement.resource = dynResource;

      mps.media = videoElement;

      mps.mediaPlayer.bufferTime = 4;

      ...

       

      result: black screen, no streams to play.

       

      If i use a single stream...

      var dynResource:StreamingURLResource = new StreamingURLResource("rtmp://localhost/dvrcast_origin/mp4:livestream1", StreamType.DVR);

      ...it works with DVR features.

       

      I've install DVRCast and stream with Adobe Flash Media Live Encoder 3.1 from my webcam (mp4:livestream%i).

       

      any idea?

        • 1. Re: DynamicStreaming with DVR
          weizhangstrobe Level 2

          Hi,

           

          I think you have run into an OSMF bug, which has been filed https://bugs.adobe.com/jira/browse/FM-970

           

          We are in the process of fixing it.

           

           

          -Wei Zhang

          Senior Computer Scientist

          Adobe Systems, Inc.

          weizhang@adobe.com

          1 person found this helpful
          • 2. Re: DynamicStreaming with DVR
            Amit Kumar Adobe Employee

            I was able to successfully play DVR streams of multi bitrates and switching was also happening fine.

            Just try the below code as the similar code worked for me. I had used sample OSMF player which came with OSMF so there only I modified and tried to play DVR streams and switch between them.

             

            private function init():void

            {

            mps = new MediaPlayerSprite();

            addChild(mps);


            var netLoader:DVRCastNetLoader = new DVRCastNetLoader();

            var videoElement:VideoElement = new VideoElement(null, netLoader);


            var dynResource:DynamicStreamingResource = new DynamicStreamingResource("rtmp://localhost/dvrcast_origin", StreamType.DVR);


            var vector : Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem> ( 3 ) ;
            vector [ 0 ] = new DynamicStreamingItem ("mp4:livestream1", 1500, 640, 480) ;
            vector [ 1 ] = new DynamicStreamingItem ("mp4:livestream1", 1500, 640, 480) ; 
            vector [ 2 ] = new DynamicStreamingItem ("mp4:livestream3", 500, 640, 480);

            dynResource.streamItems = vector ;
            var mediaElement:MediaElement = new VideoElement(dynResource);

            mps.media = mediaElement;

            mps.mediaPlayer.bufferTime = 4;

            ...

             

            Regards,

            Amit

            1 person found this helpful
            • 3. Re: DynamicStreaming with DVR
              Evets6bi Level 1

              Hi Wei when you correct this bug?

              I think this is very important.