为什么此mp4不再在video-js <video>标签中播放

时间:2019-10-18 18:06:57

标签: ffmpeg html5-video video.js

我正在使用ffmpeg将文件转换为MP4。我已经对ffmpeg字符串进行了一些修改,但是现在无论我使用什么,该视频都不会在HTML5标签(Chrome浏览器)中播放。通常,我只是使用“ -vcodec libx264 -s 1280x720 -ar 22050”。当我尝试将其加载到视频代码中时,在http://family.gotsport.net/lmw/GotSport/videoPlayer.asp?WS=1&URL=/VideoFiles/2/4_70_highlight上出现以下错误:

The media could not be loaded, either because the server or network failed or because the format is not supported.

无论我使用(或不使用)什么参数,它仍然不会播放。但是,如果您只是直接调用该URL,它将在Chrome(http://family.gotsport.net/videofiles/2/2_70_highlight.mp4)中播放。我正在使用CDN中的video-js的7.0.0版本(尽管旧版本提供的结果相同)。

视频代码如下:

<video id="myMovie" class="video-js vjs-default-skin" autoplay controls preload="auto" > 
    <source src="/VideoFiles/2/4_70_highlight.mp4" type='video/mp4' />
</video> 

这是无法播放的文件的MediaInfo输出:

General
Complete name                            : E:\VideoFiles\2\2_70_highlight.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 5.87 MiB
Duration                                 : 27 s 60 ms
Overall bit rate                         : 1 820 kb/s
Writing application                      : Lavf58.29.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 27 s 60 ms
Bit rate                                 : 1 685 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (29970/1000) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.061
Stream size                              : 5.44 MiB (93%)
Writing library                          : x264 core 158 r2984 3759fcb
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / 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=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 27 s 22 ms
Duration_LastFrame                       : -6 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 22.05 kHz
Frame rate                               : 21.533 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 423 KiB (7%)
Default                                  : Yes
Alternate group                          : 1

在HTML5视频标签中,您是否看到任何阻止此格式播放的内容?

1 个答案:

答案 0 :(得分:0)

URL不正确。

4_70_highlight.mp4似乎不存在(404错误),并且您的直接URL测试使用了2_70_highlight.mp4