2 Replies Latest reply on Sep 21, 2010 3:18 PM by cayennecode

    MP3 over RTMP?

    cayennecode Level 1

      I've been using OSMF to play MP3 over HTTP, and am trying RTMP.  FMS is setup, and the following url works with the FLVPlayback component, "rtmp://myserver.com/vod/mp3:My Test Mp3" but does not work with my OSMF player.


      var player = new MediaPlayer();

      var loader = new SoundLoader();

      theURL = 'rtmp://myserver.com/vod/mp3:My Test Mp3';

      var resource = new URLResource( theURL );

      resource.mediaType = MediaType.AUDIO;

      resource.mimeType = 'audio/mpeg';

      var audio = new AudioElement( resource, loader);

      player.media = _audio;


      It returns "Error opening url rtmp://myserver.com/vod/mp3:My Test Mp3'

        • 1. Re: MP3 over RTMP?

          I have tried to play an MP3 file from FMS using OSMFPlayer and it works just fine. I am not sure exactly where it goes wrong. But there are a few things you may want to check.


          1. The RTMP URL is indeed valid. Can you pass me the actual URL that I can test it using our internal tool. Or you can pass me the MP3 file and I can test it with my FMS environment.


          2. You don't need to create sound loader, and set mimeType yourself. You may simply do the following:


          Var mediaFactory:MediaFactory = new DefaultMediaFactory();

          Var resource = new URLResource(theURL);

          Var media:MediaElement = mediaFactory.createMediaElement(resource);

          mediaPlayer.media = media;




          -Wei Zhang

          Senior Computer Scientist

          Adobe Systems, Inc.


          • 2. Re: MP3 over RTMP?
            cayennecode Level 1

            Thanks, that method of loading the mp3 works, but mediaPlayer.duration returns NaN.  mediaPlayer.currentTime works.