I'm wondering what MediaCore does with multiple video files at different bitrates. Is there a bandwidth check and automatic file/bitrate selection?
How does MediaCore handle multiple bitrates?
7 posts Started 12 years ago by Ian Nalepa Latest reply from Felix Schwarz
-
-
Basically MediaCore itself doesn't. That's the job of the player which you configured. So if you want multiple bitrates, you need to find a player plugin (e.g. a FlowPlayer plugin) which handles this.
Afterwards you probably need to write a small snippet of Python code to get a custom player which configures FlowPlayer as necessary (would be a nice addition for MediaCore though to do that out-of-the box).
I'd recommend you look for an appropriate plugin and it's configuration. Then let's have a look how this should be integrated into Mediacore.
-
Our interest is enabling RTMP streaming on all media via a local Wowza install. Our preferred player is the JWPlayer. Looking at the players.py file, it looks like the necessary logic is already included for adaptive RTMP streaming in the rtmp_playlist/levels section.
def rtmp_playlist(self):
levels = []
item = {'streamer': self.rtmp_uris[0].server_uri,
'provider': 'rtmp',
'levels': levels,
'duration': self.media.duration}
# If no HTML5 uris exist, no <video> tag will be output, so we have to
# say which thumb image to use. Otherwise it's unnecessary bytes.
if not self.uris:
item['image'] = thumb_url(self.media, 'l', qualified=self.qualified)
for uri in self.rtmp_uris:
levels.append({
'file': uri.file_uri,
'bitrate': uri.file.bitrate,
'width': uri.file.width,
})
playlist = [item]
return playlist
Would you agree that this looks like the necessary coding to accomplish this if using RTMP? If so, I guess the next step would be for us to try setting up a quick Wowza install and hook the two together. Not sure exactly how to approach this but interested in giving it a try. My understanding is that JW doesn't need a pluggin for adaptive bitrate when using RTMP. It just needs an appropriate "playlist" with the info for the various files.
-
This looks like you're on the right track. We've looked into multi-bitrate streaming and JW is the only video player at the moment that supports it. You don't need a plugin, you just make a playlist and then it will switch between the listed files given a users connection speed. This doesn't work on the HTML5 side unless you use Apple HLS, but it will work on the Flash side of the equation.
-
Good to hear! We're going to try to get a local Wowza install working with MediaCore then give the adaptive bitrate streaming a try.
-
Well, I'm happy to say that 100% of the coding necessary for adaptive bitrate RTMP streaming is already included in 0.9.1 if using the JW Player. You can upload multiple bitrate files (be sure to fill in the bitrate values and dimensions), and MediaCore automatically builds the "levels" playlist for the JW Player. We connected ours up with a Wowza server, but it should work the same with Red5 or FMS. Works flawlessly. Awesome!
We were also very happy to see that remote RTMP is now supported. All you have to do is set up a new remote storage engine.
-
Thank you very much for sharing your findings. Blog posts+tutorials about your setup are appreciated as well!
Reply
You must log in to post.