本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
编解码器表格
我们的目标是实现所有媒体的 Direct Play(直接播放)。这意味着容器、视频、音频和字幕都与客户端兼容。如果媒体因任何原因不兼容,Jellyfin 将使用 FFmpeg 将媒体转换为客户端可处理的格式。当音频、容器或字幕不受支持时,会发生 Direct Stream(直接串流)。如果视频编解码器不受支持,则会导致视频转码。字幕处理较为复杂,可能触发 Direct Stream(字幕重新封装)或视频转码(烧录字幕)。烧录字幕是转码过程中 CPU 负载最高的环节,解码 比编码的资源消耗更低。
视频兼容性
| Sorted by efficiency (excluding bit depth) | Chrome | Edge | Firefox | Safari | Android | Android TV | iOS | SwiftFin (iOS) | Roku | Kodi | Jellyfin Media Player |
|---|---|---|---|---|---|---|---|---|---|---|---|
| MPEG-4 Part 2/SP | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
| MPEG-4 Part 2/ASP | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | |
| H.264 8Bit | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| H.264 10Bit | ✅ | ✅ | ❌ | 🔶12 | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ |
| H.265 8Bit | 🔶8 | ✅7 | ✅15 | 🔶1 | 🔶2 | ✅5 | 🔶1 | ✅6 | 🔶9 | ✅ | ✅ |
| H.265 10Bit | 🔶8 | ✅7 | ✅15 | 🔶1 | 🔶2 | 🔶5 | 🔶1 | ✅6 | 🔶9 | ✅ | ✅ |
| VP9 | ✅ | ✅ | ✅ | ✅10 | ✅3 | 🔶3 | ❌ | ✅13 | ✅ | ✅ | ✅ |
| AV1 | ✅ | ✅ | ✅ | 🔶11 | ✅ | 🔶4 | ❌ | 🔶14 | ✅ | ✅ | ✅ |
1HEVC is only supported in MP4, M4V, and MOV containers.
2Android playback is currently broken. Client reports that HEVC is supported and attempts to Direct Stream.
3May be (partially) dependent on Hardware support (can be compensated with CPU decoding on Android). Most new Android phones in the higher price range and many "4K" Android TV devices have VP9 hardware decoding support. Refer to you manufacturer for supported codecs.
4Needs at least Android TV 10.
5As of version 0.12, HEVC is enabled on all devices running Android 5.0+, but early generations of the Amazon Fire may not work yet. 10Bit may be supported depending on your device. Before Client 0.12, HEVC support was enabled on specific devices.
6HEVC decoding is supported on Apple devices with the A8X chip or newer and at least iOS 14.
7HEVC decoding is only supported on Windows 10 with the HEVC Video Extension from the Microsoft store.
8Chromium 107 does support HEVC decoding when HEVC hardware decoding is available.
9HEVC decoding is only supported on 4K devices.
10VP9 decoding on Safari requires at least Safari 14.
11AV1 decoding is only available on devices with A17 or M3 series chips or newer and requires at least Safari 17.
12Need to be manually enabled in Settings > Playback > Enable H.264 High 10 Profile. Playback on Apple Silicon Macs with macOS version < 14 and Intel Macs with all macOS versions may result in blank frames if this is enabled.
13VP9 is only available with Swiftfin (VLCKit) player.
14AV1 is enabled by default for Swiftfin (VLCKit). AV1 is disabled by default but can be enabled for Native (AVKit) using Custom Device Profiles. Enabling AV1 may result in a poor experience for SOCs prior to A17.
15Requires Firefox 134+ for Windows, 136+ for macOS, and 137+ for Linux. On Windows 11 22H2+ and Windows 10 1507-1709, you can play H.265 (HEVC) video natively. Windows 10 1803+ and Windows 11 21H2 need the HEVC video extension from Microsoft Store. Linux requires system ffmpeg for support.
| MPEG-2 Part 2 | MPEG-4 Part-21 | MPEG-4 Part-10 | MPEG-4 Part-14 | MPEG-H Part 2 |
|---|---|---|---|---|
| H.262 | MPEG-4 SP/ASP | H.264 | MP4 Container2 | H.265 |
| MPEG-2 Video | DivX | MPEG-4 AVC | HEVC | |
| DVD-Video | DX50 |
2 MPEG-4 Part 17: MP4TT Subtitles
HDR 支持
HDR 仅在极少数设备上获得支持:
-
配备 HDR 显示屏的 iOS 设备,使用浏览器或 Jellyfin iOS 应用(非 Swiftfin)时,只要客户端支持编解码器即可显示 HDR 内容。所有设备均支持 HEVC 和 VP9,较新款设备支持 AV1。同时支持 HDR10、杜比视界(Dolby Vision)和 HLG 格式。
-
运行官方 Android 应用或使用 Chrome 的 Android 设备,若硬件支持 HDR 且片源格式匹配,即可显示 HDR 内容。具体格式支持情况因设备而异。
-
支持 HDR 的 macOS 设备,在 HDR 显示屏上使用 Safari、Chrome 或 Firefox 时,只要支持片源编解码器即可播放 HDR 内容。Safari 支持最全面,包含 HDR10、杜比视界(含 P5)和 HLG;Chrome 和 Firefox 仅支持 HDR10。Chrome 支持 HEVC/VP9/AV1 编码的 HDR10,Firefox 仅支持 VP9/AV1 的 HDR 内容。请查阅苹果官方 HDR 支持设备列表确认兼容性。在非 Apple 显示屏上,其他 HDR 格式将被客户端动态映射(tone-mapped)为 HDR10。
-
系统设置中启用 HDR 的 Windows PC,可通过 Edge 或 Chrome 在 HDR 显示屏播放。杜比视界仅限 Edge 使用,且需安装微软商 店的杜比视界扩展插件。播放 HDR 内容时,Edge 的色彩表现通常优于 Chrome。
-
支持 HDR 的 Android TV 设备运行官方 Android TV 应用时。具体支持的 HDR 格式取决于设备型号。
-
运行官方 WebOS 客户端的 WebOS 设备(新款 LG 智能电视)支持 HDR。但已知 mkv 容器可能引发兼容性问题,建议在客户端设置启用"强制将 mkv 转封装为 mp4"选项作为临时解决方案。
-
部分 Linux 平台的 Chromium 内核浏览器会尝试在客户端执行 HDR 至 SDR 的动态映射。此操作通常效果欠佳,且该过程无需服务器端参与。
未列出的设备在任何官方客户端上均不支持 HDR。所有 HDR 内容必须由服务器转换为 SDR 才能正常播放。更多技术细节请参阅我们的动态映射文档
音频兼容性
当音频编解码器不受支持或不兼容时(例如在立体声设备播放5.1声道流),必须进行音频转码。其资源消耗远低于视频转码。
| Codec | Chrome | Edge | Firefox | Safari | Android | Android TV | iOS | SwiftFin (iOS) | Roku | Kodi | Desktop |
|---|---|---|---|---|---|---|---|---|---|---|---|
| FLAC | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| MP3 | 🔶1 | ✅ | 🔶 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| AAC | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| AC3 | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| EAC32 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| VORBIS3 | ✅ | ✅ | ✅ | ✅8 | ✅ | ❌ | ✅8 | ✅ | ✅ | ✅ | ✅ |
| DTS4 | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅6 | ✅ | ✅ |
| OPUS | ✅ | ✅ | ✅ | ✅5, 7, 8 | ✅ | ✅ | ✅5, 7, 8 | ✅ | ✅ | ✅ | ✅ |
| ALAC | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ |
| MPEG-1 | MPEG-2 |
|---|---|
| MP2 (layer 2) | AAC (Part 7) |
| MP3 (layer 3) |
1MP3 Mono is incorrectly reported as unsupported and will transcode to AAC.
2Only EAC3 2.0 has been tested.
3OGG containers are not supported and will cause VORBIS to convert.
4Only DTS Mono has been tested.
5Safari only supports opus in .caf files
6Supported via passthrough on all devices. Native support for AC3 & E-AC3 on Roku TVs & Ultra.
7iOS 17 / macOS 14 and above supports stereo Opus in MP4 containers.
8iOS 18.4 / macOS 15.4 and above supports Vorbis and Opus in OGG containers.
ATSC标准关于AC-3和EAC-3的规定。
字幕兼容性
字幕可能微妙影响转码过程。容器格式支持的字幕类型有限。需要转码时有两种处理方式:转换为支持的格式,或因不支持字幕转码而烧录进视频。烧录字幕是最消耗资源的转码方式,因为需要同时进行两层处理:将字幕层叠加在视频层之上。
常见字幕格式的详细解析。
| Subtitle Format | Format | TS | MP4 | MKV | AVI |
|---|---|---|---|---|---|
| SubRip Text (SRT) | Text | ❌ | 🔶 | ✅ | 🔶 |
| WebVTT (VTT)1 | Text | ❌ | ❌ | ✅ | 🔶 |
| ASS/SSA | Formatted Text | ❌ | ❌ | ✅ | 🔶 |
| VobSub2 | Picture | ✅ | ✅ | ✅ | 🔶 |
| MP4TT/TXTT | XML | ❌ | ✅ | ❌ | ❌ |
| PGSSUB | Picture | ❌ | ❌ | ✅ | ❌ |
| EIA-608/7083 | Embedded | ✅ | ✅ | ✅ | ❌ |
1VTT are supported in an HLS Stream.
2DVB-SUB (SUB + IDX) is another name for VobSub files.
3EIA-608/708 subtitles are embedded in private channels (channel 21) in a MPEG video codec. EIA-608 are standard CC subtitles with the black bar background, while EIA-708 are typically SDH.
字幕类型
字幕存在多种变体:可关闭字幕、开放式字幕、烧录字幕、强制字幕、SDH字幕和隐藏式字幕是最常见类型。字幕格式(如SubRip或VobSUB)不影响其类型划分。
可关闭字幕
这是可开关字幕的统称,包括强制字幕、SDH字幕、隐藏式字幕或普通字幕。
烧录字幕
开放式字幕(又称烧录字幕)是永久嵌入视频无法关闭的字幕。作为视频流组成部分,这类字幕无法切换开关,是最常见的字幕类型。
SDH字幕与隐藏式字幕
SDH 和 CC 是为聋人和听障人士设计的字幕格式。这类字幕包含额外内容如环境音效提示。SDH 和 CC 并非由特定字幕格式定义,而是由其功能目的决定。若使用 OTA 调谐器和 DVR 设备,字幕会直接嵌入视频流中,若在提取字幕前进行转码操作会破坏这些字幕。
强制字幕
"强制字幕常见于电影场景,仅在角色说外语/外星语,或场景中的标志/旗帜/文本在本地化配音过程中未被翻译时显示。某些情况下,当影片需要从特定角色视角呈现(该角色不懂相关语言),外语对话也可能保留不翻译。" - 维基百科
字幕提取
提取字幕可使用以下命令。参数 0:s:0 表示首个字幕流,因此 0:s:1 代表第二个字幕流。
SSA/ASS 字幕
ffmpeg -dump_attachment:t "" -i file.mkv -map 0:s:1 -c:s ass extracted-subtitle.ass
录制的 OTA 内容
通过无线广播(OTA)录制的内容通常将字幕嵌入视频编解码器本身。模拟信号常用 EIA-608 字幕标准,数字信号则采用 EIA-708 标准。
ffmpeg -f lavfi -i "movie=Ronin (1998).ts[out+subcc]" -map 0:1 "Ronin (1998).srt"
字体规范
基于文本的字幕格式需要字体支持才能正确渲染。安装方法请参阅字体配置章节。
容器兼容性
若容器格式不受支持,系统将执行重新封装(remuxing)。视频和音频编解码器保持原样,仅更换为兼容容器格式。此过程资源消耗最低,多数视频容器会被重新封装为 HLS 流媒体协议使用的 TS 容器。即使树莓派3(RPi3)也能轻松处理重新封装。
| Container | Chrome | Edge | Firefox | Safari | Android | Android TV | Kodi | Roku |
|---|---|---|---|---|---|---|---|---|
| MP41 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| MKV2, 3, 8 | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
| WebM3, 5, 6 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| TS4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| OGG5, 7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
1MP4 containers are one of the few containers that will not remux.
2MKV containers can hold nearly any codec, but are not compatible with streaming in Firefox and will remux.
3MKV containers are improperly labeled as WebM in Firefox during playback.
4TS is one of the primary containers for streaming for Jellyfin.
5WebM and OGG have limited codec support (by design), refer to this for WebM and this for OGG.
6WebM on Safari requires at least Safari 14.
7OGG on Safari requires at least iOS 18.4 / macOS 15.4
8MKV support in Firefox is currently disabled in Jellyfin, as there are significant issues making it unusable for Jellyfin. 1 2