Skip to content

Import an M3U list ​

If your provider gives you an M3U playlist, Bitstream can turn it into channels, radios, movies, series and categories in one go, with logos. Series episodes are found from names like Show S01 E02.

In the panel ​

Open Live streams (or Movies, or Series) and click Import M3U. The import has four steps.

  1. Playlist. Pick From a link and paste the Playlist URL, or Upload a file with an .m3u or .m3u8 file from your computer.
  2. Options. Choose What to import (live, movie, series, radio). The type of each entry is guessed from its link and group name. Then choose the rest:
    • Create categories from groups: each group-title becomes a category. On by default.
    • When a channel with the same name already exists: Skip it, Replace its sources, or Add the new link as a fallback source.
    • Run new channels on: the servers that run new live channels.
    • Add everything to these bouquets.
  3. Preview. The panel reads the list and shows what it would create, update and skip. Nothing is changed yet.
  4. Import. Press Import now. The import runs in the background and shows its progress.

New live channels are on demand by default, so they start only when someone watches.

Two providers, one channel list

Import the first provider normally. Import the second with Add the new link as a fallback source. Channels with the same name in the same category get the second provider as a fallback source.

Provider credentials

Provider playlist links often carry a username and password. Bitstream stores the job with the credentials masked, never the link as you sent it.

Automate it ​

Start with a dry run. It runs the same pass without writing, and returns counts plus a preview of up to 100 rows:

bash
curl -s -X POST $PANEL/imports/m3u \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{
    "url": "http://provider.example.net/get.php?username=u&password=p&type=m3u_plus",
    "kinds": ["live"],
    "create_categories": true,
    "mode": "ffmpeg",
    "on_demand": true,
    "dry_run": true
  }' | jq

An import is a background job. The call answers 202 with a job id. Follow it with:

bash
curl -s $PANEL/imports/<job id> -H "Authorization: Bearer $TOKEN" | jq

Send the same request with "dry_run": false to import for real. To upload a file instead of a URL, send multipart/form-data with a file field and the options as JSON in an options field:

bash
curl -s -X POST $PANEL/imports/m3u -H "Authorization: Bearer $TOKEN" \
  -F file=@list.m3u -F 'options={"kinds":["live"],"dry_run":true}' | jq

Cancel a running job with POST /imports/{id}/cancel. What was already created stays. List past jobs with GET /imports.

Options ​

OptionWhat it does
url or contentWhere the playlist comes from: a URL, or the M3U text itself.
kindsWhat to import: live, movie, series, radio.
create_categoriesMake a category for each group-title. On by default.
category_mapSend some group-title values to categories you already have ({"Sports": 4}).
bouquet_idsAdd everything imported to these bouquets.
account_idLink the new sources to a source account, so its connection limit applies.
mode, on_demandMode (ffmpeg, llod, direct) and on demand for new live channels. On demand is on by default.
node_idsPut new live channels on these nodes as roots of the server tree.
match_existingWhen a channel with the same name exists in the same category: skip it, update_sources, or add_source as a fallback.
dry_runOnly report what would change.

Moving from XC_VM ​

POST /imports/xcvm is in the API, but it does not migrate anything yet. It checks the request and records a failed job with a clear message. Nothing is changed and the database password is never stored. Until it is done, export an M3U from XC_VM and import it as above.

Bitstream documentation