How to embed RTMP stream with flowplayer

This approach is to embed flowplayer into a website and use it to play videos that are hosted on a video streaming server. It works pretty well on my Ubuntu 20.04 box.  The main procedures are as follows:

  • Set up RTMP and make sure it works.
  • Inside your web root folder (e.g. /var/www/html), create a ‘player’ folder: mkdir player
  • Download the following files and put them in the ‘player’ folder:
    • sudo wget
    • sudo wget
    • sudo wget
  • Create the HTML. Here is a sample:
    <!-- flowplayer javascript component -->
    <script src=""></script> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div id="player" style="width:480px;height:270px;margin:0 auto;text-align:center"></div>
flowplayer("player", "player/flowplayer-3.2.16.swf", {
    clip: {
        //name of the clip or put in 'user?pass=<yourpassword>' format if rtmp authentication is required
        url: 'sample.mp4', 

        scaling: 'fit',
        provider: 'rtmp',
        live: true,        
    plugins: {
        rtmp: {
            url: "player/flowplayer.rtmp-3.2.13.swf",
            // netConnectionUrl defines where the streams are found
            netConnectionUrl: 'rtmp://<yourdomainname>:1935/stream'
    canvas: {
        backgroundGradient: 'none'

Leave a Reply