---
title: "获取视频 HLS 播放列表"
method: GET
path: "/songs/{id}/video-hls/playlist.m3u8"
tags: ["歌曲管理"]
---

# 获取视频 HLS 播放列表

`GET /songs/{id}/video-hls/playlist.m3u8`

对浏览器不原生支持的视频格式（mpg/flv/wmv/rmvb/avi/mkv 等）实时转码为 HLS（H.264+AAC），返回 master.m3u8 播放列表。多音轨文件会生成 HLS 多音频 rendition（hls.js 原生支持切换）。首次请求会启动转码（转完再播）；后续请求命中缓存。需要 ffmpeg。

## Path parameters

- `id` integer, required

## Response `200`

HLS 播放列表内容

## Other responses

- `400` — 无效的歌曲 ID
- `404` — 歌曲不存在
- `503` — ffmpeg 不可用或转码失败

---

[API](https://skmtc.net/songloft-org/apis/songloft-api.md) · [All operations](https://skmtc.net/songloft-org/apis/songloft-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/songloft-org/songloft-api/revisions/77467de6ed1b/schema)
