1

I'm trying to have a rtmp streaming working. I have almost the same code suggested here

<html> <head> <script src="me/build/jquery.js"></script> <script src="me/build/mediaelement-and-player.js"></script> <link rel="stylesheet" href="me/build/mediaelementplayer.min.css" /></code> </head> <body> <video> <source src="000109f6004b00a6004af03676235daa" type="video/rtmp"> </video> <script> $('video').mediaelementplayer({flashStreamer:"rtmp://thinkbuntu:1935/flvplayback/000109f6004b00a6004af03676235daa"}); </script> </body> </html> 

Whereas rtmp://thinkbuntu:1935/flvplayback is the URL of a local rtmpserver and '000109f6004b00a6004af03676235daa' is a mp4 video. I know that the local server is working because I can dump it via rtmpdump and also using jwplayer I can play the video properly. With medialement using flv, webm, ogv do not work neither.

I get this error in Firefox (no error at all in Chrome):

Specified "type" attribute of "video/rtmp" is not supported. Load of media resource 000109f6004b00a6004af03676235daa failed.

Configuring it via json attribute fails in the same way.

I also tried this approach Replacing media source (http with rtmp) in MediaElementsJS based on browser capabilities but it fails too.

Am I doing something wrong?

4 Answers 4

1

I've got almost the same setup, and mine works. Not sure if any of the attributes are required, but I have some on the video tag.

(FYI, I'm guessing the extra </code> tag is just from your pasting into SO?)

 <video width="300" height="240" controls="controls" preload="none" id="stream"> <source src="7901e75800f700d700437a45351f0214" type="video/rtmp"> </video> <script type="text/javascript"> $('#stream').mediaelementplayer({ flashStreamer: "rtmp://170.93.143.150/rtplive/000109f6004b00a6004af03676235daa", plugins: ['flash', 'silverlight'], alwaysShowControls: false, success: function (mediaElement, domObject) { if (mediaElement.pluginType == 'flash') { mediaElement.play(); } }, }); </script> 
Sign up to request clarification or add additional context in comments.

1 Comment

is this stream key "000109f6004b00a6004af03676235daa"? if yes, than what is this "7901e75800f700d700437a45351f0214" ?
1

in your case you have to add prefix "mp4:" inside video tag

<video width="360" height="203" id="player1" src="mp4:sample" type="video/rtmp" controls="controls"></video> <script>$('video').mediaelementplayer({flashStreamer:"rtmp://localhost/vod"});</script> 

Comments

0

We had to port sniff RTMP traffic to determine exactly what the browser was negotiating since a RTMP URL is uniquely interpreted: part of the URL identifies the streaming service end-point and the remainder identifies the stream resource, somewhere in-between is the file format followed by a colon. If you don't know the config of the RTMP server, you can't tell where in the URL the service end-point ends and the stream begins. This caused us no end of frustration as we didn't know the server configuration.

In the source tag, we put the complete RTMP URL as the 'src' attribute (protocol, service end-point, stream, and file format - everything, the whole shebang) and in the flashStreamer property we identified the service end-point only (everything up to, but not including, the file format). After lots of experimentation, this was the only successful combination of properties.

Comments

0

Make sure your Firefox has flash installed. See if there is Shockwave flash in Firefox plugin. If not,

  1. Open flash official website
  2. Choose Need Flash Player for a different computer?
  3. Select the suitable version
  4. download & install & restart the FF
  5. make sure the Shockwave Flash is activated

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.