Question

I am using the free version of Flowplayer and within that I am trying to incorporate the Youtube style resolution picker. I am getting the error mentioned below, when I hit play.

200, Stream not found, NetStream.Play.StreamNotFound, clip: '[Clip] 'video-800-old_1080'

New to this so cant really figure out what is wrong. Somehow I believe it has something to do with the URL as all the videos mentioned in the bitrate array are present on my local machine.

Below is my code for trying to do stream with different bitrates

<html>
<head>
    <style type="text/css">
    .container{
        margin: 0 auto;
        width: 700px;
        height: 450px;
        border: 1px solid black;
    }

    </style>
    <script type="text/javascript" src="../flowplayer-3.2.12.min.js"></script>

    <!-- some minimal styling, can be removed -->
    <link rel="stylesheet" type="text/css" href="style.css">
    <title></title>
</head>
<body>
    <div class="container">
        <a  
             href="http://localhost/shivam/admin/uploads/videos/video-800-old_1080.mp4"
             style="display:block;width:100%;height:100%;"  
             id="player"> 

             <img src="flow_eye.jpg" width="100%" height="100%" alt="Search engine friendly content" />
        </a> 
        <script>
            flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
    clip: {
        autoPlay: true,
        provider: 'rtmp',

        // urlResolvers is needed here to point to the bitrate select plugin
        urlResolvers: 'brselect',

        bitrates: [

            { url: "mp4:video-800-old_1080", bitrate: 1080, isDefault: true,label: "1080 k"},
            { url: "mp4:video-800-old_420", bitrate: 420, label: "420 k" },
            { url: "mp4:video-800-old_320", bitrate: 320, label: "320 k" }
        ]
    },
    plugins: {
        menu: {
            url: "http://releases.flowplayer.org/swf/flowplayer.menu-3.2.12.swf",
            items: [
                // you can have an optional label as the first item
                // the bitrate specific items are filled here based on the clip's bitrates
                { label: "select bitrate:", enabled: false }
            ]
        },
        brselect: {
            url: "http://releases.flowplayer.org/swf/flowplayer.bitrateselect-3.2.13.swf",

            // enable the bitrate menu
            menu: true,

        },
        // RTMP streaming plugin
        rtmp: {
            url: "http://releases.flowplayer.org/swf/flowplayer.rtmp-3.2.12.swf",
            netConnectionUrl: 'rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st'
        },
        // a content box so that we can see the selected bitrate. (for demonstation
        // purposes only)
        content: {
            url: "http://releases.flowplayer.org/swf/flowplayer.content-3.2.8.swf",
            top: 0,
            left: 0,
            width: 400,
            height: 150,
            backgroundColor: 'transparent',
            backgroundGradient: 'none',
            border: 0,
            textDecoration: 'outline',
            style: {
                body: {
                    fontSize: 14,
                    fontFamily: 'Arial',
                    textAlign: 'center',
                    color: '#ffffff'
                }
            }
        },
        controls: {
            tooltips: { buttons: true }
        }
    }
});

        </script>
    </div>
</body>
</html>
Was it helpful?

Solution

First, you getting error because you dont have RTMP Server, try using lighttpd.

Try the below code,

flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", {
    clip: {
        autoPlay: true,
        provider: 'lighttpd',

        // urlResolvers is needed here to point to the bitrate select plugin
        urlResolvers: 'brselect',

        bitrates: [

            { url: "http://localhost/flowplayer/example/gangnam.flv", bitrate: 885, isDefault: true,label: "1080 k"},
            { url: "http://localhost/flowplayer/example/gangnam_1080.flv", bitrate: 885, label: "320 k" }
        ]
    },
    plugins: {
        menu: {
            url: "http://releases.flowplayer.org/swf/flowplayer.menu-3.2.12.swf",
            items: [
                { label: "select bitrate:", enabled: false }
            ]
        },
        brselect: {
            url: "http://releases.flowplayer.org/swf/flowplayer.bitrateselect-3.2.13.swf",
            menu: true,

        },
        lighttpd: {
            url: "flowplayer.pseudostreaming-3.2.12.swf"
        },
        content: {
            url: "http://releases.flowplayer.org/swf/flowplayer.content-3.2.8.swf",
            top: 0,
            left: 0,
            width: 400,
            height: 150,
            backgroundColor: 'transparent',
            backgroundGradient: 'none',
            border: 0,
            textDecoration: 'outline',
            style: {
                body: {
                    fontSize: 14,
                    fontFamily: 'Arial',
                    textAlign: 'center',
                    color: '#ffffff'
                }
            }
        },
        controls: {
            tooltips: { buttons: true }
        }
    }
});

When you give the URL of file, use proper bitrates else when you'll switch the resolution the video will start playing again.

Good luck!!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top