Controlling quality?


1 comment

  • Avatar

    Hi Davidian, thanks for reaching out!

    The decision about which representation of a video will be loaded and shown is taken by the video player used itself. Depending on the player it may choose the first representation from the playlist,
    specifically, choose the largest or smallest, or do something else. Generally,
    we add the streaming profiles into the m3u8 smallest-bitrate first.

    I'm not sure which video player you use, but in case it is our video player,
    we don't have documentation of which file will be opened first by the player,
    though I believe that it indeed chooses the smallest one first so that it loads quickly,
    then upgrades to a better quality copy as it's playing, subject to available bandwidth/CPU/screen size.
    This behavior may make sense, as end-users would wait for less before they start seeing the video.

    If the player you are using is programmable, you can use the player's API to force a specific bitrate and/or remove some options from the player (Below is a partial example for this for the CLD player/videoJS).
    In case you can't control the player, but you know its behavior (for example,
    if it starts playing the first file in the playlist), you can upload a custom m3u8 that changes the order of the representations (more information about creating a custom m3u8 manifest can be found here).
    Otherwise, if the player is out of your control and/or you don't know how it chooses the representation, the only options are to use a different profile with no/fewest low bitrate copies,
    or a custom m3u8 that doesn't have the low bitrate copies.

    This example - which uses Cloudinary's video player, demonstrates how to access (Videojs API),​ 

    and clicking the button will write console logs with details of representations currently loaded into the player.
    - You might be able to disable some using videoJS's API (here is an example in GitHub), but doing so would probably increase the complexity of the integration,
    and you might have better results using a different streaming profile,
    or a custom .m3u8 file that puts a mid-sized representation at the start of the list.

    Alternatively, for relatively short videos, the file size difference between
    The smallest and largest representations may be relatively small,
    and you might find that you get a good enough result with a single video
    file without ABS (e.g. using "f_auto,q_auto"​ at 720p or 1080p without making
    multiple variants available).


    Comment actions Permalink

Please sign in to leave a comment.