由 mediastreamsegmenter 生成的 http 实时流媒体不会播放,即使一切都到位

http live streaming generated by mediastreamsegmenter won't play even tough everything is in place

我正在使用 mediastreamsegmenter(测试版 1.1(150608))生成实时流,实时流的源是 gstreamer。 mediastreamsgementer 将文件放入我的网络服务器。当我打开网络服务器时,我看到的是 快照而不是正在播放的视频 。我错过了什么?

mediastreamsegmenter -s 3 -D -f /Users/umut/Sites/ 10.92.7.2:5000

gst-launch-0.10 -v videotestsrc pattern=zone-plate kx2=20 ky2=20 kt=1 ! video/x-raw-yuv, framerate=30/1, width=320, height=240 ! x264enc ! mpegtsmux ! udpsink host=10.92.7.2 port=5000

$ ls -al /Users/umut/Sites
total 7032
Domain Users      272 Jul 23 07:51 .
Domain Users     1666 Jul 23 07:52 ..
Domain Users    12292 Jul 23 07:49 .DS_Store
Domain Users  1577884 Jul 23 07:49 fileSequence80.ts
Domain Users  1604956 Jul 23 07:49 fileSequence81.ts
Domain Users   386716 Jul 23 07:51 fileSequence82.ts
Domain Users      172 Jul 22 16:00 index.html
Domain Users      200 Jul 23 07:51 prog_index.m3u8

$ cat prog_index.m3u8 
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:80
#EXTINF:10.00000,   
fileSequence80.ts
#EXTINF:10.00000,   
fileSequence81.ts
#EXTINF:2.40000,    
fileSequence82.ts
#EXT-X-ENDLIST

$ cat index.html 
<html>
<head>
    <title>HTTP Live Streaming Example</title>
</head>
<body>
    <video
        src="prog_index.m3u8">
    </video>
</body>
</html>

编辑:我能够使用 mediastreamvalidator 验证流。可能是我在 html 方面遗漏的东西。

$mediastreamvalidator -d iphone http://localhost/~umut/prog_index.m3u8
mediastreamvalidator: Beta Version 1.1(150608)

Validating master playlist http://localhost/~umut/prog_index.m3u8


Segment processing interrupted: http://localhost/~umut/prog_index.m3u8 - 33 out of 33 segments processed...

--------------------------------------------------------------------------------
http://localhost/~umut/prog_index.m3u8
--------------------------------------------------------------------------------

Playlist Syntax:    OK

Processed 33 out of 33 segments:

fileSequence4.ts:

    ERROR: (-12642) Playlist vs segment duration mismatch
    --> Segment duration 9.6000, Playlist duration: 9.9000


fileSequence6.ts:

    ERROR: (-12642) Playlist vs segment duration mismatch
    --> Segment duration 10.5000, Playlist duration: 9.9000


Average segment duration: 8.41 seconds
Segment bitrate: Average:  1.28 Mbits/sec, Max:  1.30 Mbits/sec

Track ID: 1
Video Codec: avc1
H.264 profile: High
H.264 level: 2.0
Video resolution: 320x240 pixels
Video average IDR interval: 2.000 seconds, Standard deviation: 0.000
Video frame rate: 10.000 fps
Average video bitrate:  1.05 Mbits/sec

我猜视频正在加载,但没有自动播放。尝试:

<video autoplay controls>
    <source src="prog_index.m3u8" type="application/x-mpegURL" />
</video>

即使自动播放不起作用,您也可以控制。