Here is an example of how to set up a .smil file for adaptive bitrate video streaming. This is where the player will automatically detect your connection speed, then connects you to the appropriate quality version of the file that your connection can cope with.
*This example uses the JW Player version 6.7
As you can see, rather than connecting to each of the video files, you connect instead to a .smil file of your making in the same folder as the video files.
To get started, you will need at least two versions of the same video, encoded at different bitrates. A tool such as Handbrake (link) can re-encode your video files for you. It is important that when re-encoding you encode with the same frame rate and number of key frames as the original file.
The .smil file can be made with any basic text editor, such as notepad. You will then need to set up your .smil file in the same folder as your videos as follows:
You should have a seperate <video> tag for each version of the video, and the 'system-bitrate' should be set to match the bitrate of the video. For example, 'streaming_500kbps.mp4' was encoded at 500kb per second, so when we convert kilobits to bits, we get '512000'.
Remember when creating your .smil files in your chosen text editor to make sure that they are saved as a .smil, and not as a .smil.txt file.
NOTE: When streaming, this setup allows for the player to switch between the different videos as the viewer's connection fluctuates. However, to do this smoothly and continue from the same point in the video, it is very essential that you encode using the same framerate and same number of keyframes. It is to these keyframes that the video will jump between.
For more information, check out JW Player's official instructions here.