Search code examples
wowzasmiljwplayer7

understanding smil with wowza and JWplayer


I'm trying to implement the adaptive streaming for my beloved website, i'm using wowza and jwplayer. My settings are:

js:

var playerInstance = jwplayer("myElement").setup({
    file: "/testjwplayer.smil",
    width: 980,
    height: 535,
    title: 'Basic Video Embed',
    description: 'A video with a basic title and description!',
});

smil:

<smil>
    <head>
        <meta base="rtmp://myserver/myapplication?mp4:" />
    </head>
    <body>
        <switch>
            <video src="sample_360.mp4" height="360" system-bitrate="745472" />
            <video src="sample_480.mp4" height="480" system-bitrate="1155072" />
            <video src="sample_720.mp4" height="720" system-bitrate="1187840" />
            <video src="sample.mp4" height="1080" system-bitrate="2467840" />
        </switch>
    </body>
</smil>

Everything is working, the player shows all the qualities and the 'auto' quality. The things i'm not understanding is how to determinate which quality is the player invoking when the 'auto' quality is active. Checking on wowza access.log file, seems that the player always invokes the same quality (hd), even if the connection is really bad (i'm using some tools to simulate a bad connection).

Now my quastions are: There is a way to understand what the player is doing? which quality is trying to reach? If i did all good, why the player invokes always the same quality (hd)?

and more important: should JWplayer switch the quality in real time or just when the player is created?

Thank for the attention guys


Solution

  • From the jwplayer documentation:

    The switching of quality is automatically done by JW Player, who selects the highest quality:

    • Whose system-bitrate fits the current bandwidth of the connection.

    • Whose width fits the current width of the player screen.

    Regarding to your second question, I am afraid that when using RTMP it does not change quality during playing the stream, it only selects once at startup.