How do I create a multi-bitrate HLS playlist?

The quickest way to create a multi-bitrate HLS playlist is to use our "hls-master" template e.g.

curl -X POST "https://api.encoderfarm.com/encode/create/" -d \
"{ \
    \"data\": { \
        \"input\": \"gs://input-bucket/folder/filename.ext\", \
        \"output\": \"gs://input-bucket/folder/\", \
        \"template\": \"hls-master\" \
    } \
}" \
-H "Content-Type: application/json" \
-H "Authorization: myApiKey"

The resulting destination folder will contain a "master.m3u8" variant playlist file, along with all the other bitrate playlist files.

In fact, Encoder Farm will automatically create a "master.m3u8" variant playlist file in any destination bucket or folder that contains one or more HLS profile encodes. Take these two jobs for example:

curl -X POST "https://api.encoderfarm.com/encode/create/" -d \
"{ \
    \"data\": { \
        \"input\": \"gs://input-bucket/folder/filename.ext\", \
        \"output\": \"gs://input-bucket/folder/\", \
        \"template\": \"hls-480\" \
    } \
}" \
-H "Content-Type: application/json" \
-H "Authorization: myApiKey"
curl -X POST "https://api.encoderfarm.com/encode/create/" -d \
"{ \
    \"data\": { \
        \"input\": \"gs://input-bucket/folder/filename.ext\", \
        \"output\": \"gs://input-bucket/folder/\", \
        \"template\": \"hls-144\" \
    } \
}" \
-H "Content-Type: application/json" \
-H "Authorization: myApiKey"

The resulting destination folder will contain a "master.m3u8" variant playlist file, along with a "480.m3u8" and "144.m3u8" file, even if the two profiles were encoded hours or days apart.