VLC 播放器使用 4k HDR10 mkv 显示损坏的 HLS 流

问题描述 投票:0回答:0

我正在尝试将 4k mkv 转换为 HLS 流,但我没有任何运气。我尝试了一些 ffmpeg 命令来尝试解决问题,但没有一个奏效。这是我尝试过的命令。

  1. 基本复制命令:

ffmpeg -i "video.mkv" -c copy -f hls "plexTemp/out.m3u8"

  1. 用于查看是否是 HDR 颜色问题的命令:

ffmpeg -i "video.mkv" -c copy -pix_fmt yuv420p10le -f hls "plexTemp/out.m3u8"
3. 用于恢复到 8 位颜色的命令:

ffmpeg -i "video.mkv" -c copy -pix_fmt yuv420p -f hls "plexTemp/out.m3u8"

  1. 我尝试删除多余的流并只关注音频和视频:

ffmpeg -i "out.mkv" -map 0:v:0 -map 0:a:1 -c copy -pix_fmt yuv420p10le -f hls "plexTemp/out.m3u8"

我在运行每个命令时也看到了这些警告。

Stream HEVC is not hvc1, you should use tag:v hvc1 to set it.
还有这个

[matroska,webm @ 000001d7921803c0] Stream #12: not enough frames to estimate rate; consider increasing probesize
[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 6 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 10 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[matroska,webm @ 000001d7921803c0] Could not find codec parameters for stream 11 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

所以我尝试增加

analyzeduration
probesize
并添加标签,如下所示:
ffmpeg -analyzeduration 10000000 -probesize 10000000 -i "out.mkv" -c copy -tag:v hvc1 -f hls "plexTemp/out.m3u8"

无济于事。这是 VLC 上的输出结果。它主要是黑色,有几条颜色随机变化。

在我的电视上我看到这个:

我看到在 ffmpegs 输出中突出的一件事是:

[hls @ 00000207239a9ec0] Opening 'plexTemp/out0.ts' for writing7 bitrate=  -0.0kbits/s speed=N/A
[hls @ 00000207239a9ec0] Opening 'plexTemp/out.m3u8.tmp' for writing

这里是mkv的音频和视频信息:

General
Unique ID                                : 92280908398971492516286250889389584022 (0x456CA80EF29B1357B572719D6EC4AE96)
Complete name                            : I:\video.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 49.4 GiB
Duration                                 : 1 h 39 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 71.2 Mb/s
Frame rate                               : 23.976 FPS
Movie name                               : video
Encoded date                             : 2023-04-06 22:39:53 UTC
Writing application                      : MakeMKV v1.16.7 win(x64-release)
Writing library                          : libmakemkv v1.16.7 (1.3.10/1.5.2) win(x64-release)
Cover                                    : Yes
Attachments                              : cover.jpg

Video
ID                                       : 1
ID in the original source medium         : 4113 (0x1011)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main [email protected]@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 39 min
Bit rate                                 : 63.6 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.320
Stream size                              : 44.1 GiB (89%)
Writing library                          : ATEME Titan File 3.9.6 (4.9.6.2)        
Language                                 : English
Default                                  : No
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 140 cd/m2
Original source medium                   : Blu-ray

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS XLL X
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS:X
Codec ID                                 : A_DTS
Duration                                 : 1 h 39 min
Bit rate mode                            : Variable
Bit rate                                 : 4 174 kb/s
Channel(s)                               : 8 channels
Channel layout                           : C L R LFE Lb Rb Lss Rss
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Stream size                              : 2.89 GiB (6%)
Title                                    : Surround 7.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray
Here is information on the HLS output:
General
Complete name                            : I:\out.m3u8
Format                                   : HLS
Format profile                           : Media
File size                                : 67.4 MiB
Duration                                 : 8 s 138 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 69.4 Mb/s
Frame rate                               : 23.976 FPS

还有我的 这是我的 HLS 流的输出:

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main [email protected]@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Muxing mode                              : MPEG-TS
Codec ID                                 : 36
Duration                                 : 8 s 49 ms
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Writing library                          : ATEME Titan File 3.9.6 (4.9.6.2)        
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 140 cd/m2
Source                                   : out92.ts

Audio
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : DTS XLL X
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS:X
Muxing mode                              : MPEG-TS
Codec ID                                 : 130
Duration                                 : 8 s 138 ms
Bit rate mode                            : Variable
Channel(s)                               : 8 channels
Channel layout                           : C L R LFE Lb Rb Lss Rss
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Delay relative to video                  : -125 ms
Language                                 : English
Source                                   : out92.ts
video ffmpeg video-streaming http-live-streaming vlc
© www.soinside.com 2019 - 2024. All rights reserved.