Safari 中的视频播放按钮被划掉编解码器问题

问题描述

编辑:我发现,音频是问题所在。但是我无法在音频工作时进行任何设置。

不幸的是,我有一个我自己无法解决的大问题。我有一个 .mp4 文件。该文件可以在每个浏览器(也包括 Safari Mobile)中使用 video-tag 播放,但不能在 Safari Desktop 上播放。由于我已经测试了 4 个托管选项,因此我可以将其排除在错误来源之外。我已经隔离了视频标签,并且能够将问题追溯到文件的编解码器。

我测试了另一个 .mp4 文件,这个文件工作正常。所以我现在需要做的是将现有的 .mp4 文件转换为与来自 Internet 的格式相同的格式。为此,我使用了 XMedia Recode 和 HandBrake,但是我在 Safari 中无数次的编码尝试都没有奏效。

以下是两个文件的视频信息。我曾尝试将 Base Media 等参数更改为 Version 2,将 isom 更改为 mp42,但这不起作用。改变 FPS 也没有任何影响。

我很高兴收到有关正确编码视频文件提示

工作 .mp4

General
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/mp41/isom/avc1)
File size                                : 35.6 MiB
Duration                                 : 15 s 807 ms
Overall bit rate                         : 18.9 Mb/s
Encoded date                             : UTC 2020-02-18 04:01:38
Tagged date                              : UTC 2020-02-18 04:01:38

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 5 Ref Frames
Format settings,CABAC                   : Yes
Format settings,Reference frames        : 5 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 15 s 807 ms
Bit rate                                 : 18.9 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
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.095
Stream size                              : 35.6 MiB (100%)
Writing library                          : x264 core 159 r10 1771b55
Encoding settings                        : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=48 / lookahead_threads=8 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=infinite / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / vbv_maxrate=24200 / vbv_bufsize=66000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2020-02-18 04:01:38
Tagged date                              : UTC 2020-02-18 04:01:38
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Codec configuration Box                  : avcC

损坏的 .mp4

General
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 1.91 MiB
Duration                                 : 34 s 409 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 466 kb/s
Writing application                      : Lavf58.45.100

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings,Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 34 s 384 ms
Bit rate                                 : 333 kb/s
Width                                    : 750 pixels
Height                                   : 1 292 pixels
display aspect ratio                     : 0.580
Frame rate mode                          : Constant
Frame rate                               : 60.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.006
Stream size                              : 1.37 MiB (72%)
Writing library                          : x264 core 155 r2917 0a84d98
Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x3 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
Color range                              : Full
Codec configuration Box                  : avcC

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 34 s 409 ms
Duration_LastFrame                       : -4 ms
Bit rate mode                            : Variable
Bit rate                                 : 119 kb/s
Maximum bit rate                         : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 501 KiB (26%)
Default                                  : Yes
Alternate group                          : 1

它在 Safari 中的外观

Video Play Button Crossed Out In Safari Desktop

解决方法

我通常将我的音频流编码为 MP3 以用于网络流媒体(我使用的是 Windows,所以我使用 LAME)。质量较低,当然,但根据我的经验有效。