kaltura / nginx-vod-module

NGINX-based MP4 Repackager
GNU Affero General Public License v3.0
2k stars 439 forks source link

iframes.m3u8 doesn't play #1149

Closed flashick closed 4 years ago

flashick commented 4 years ago

Hello! I'm trying to implement key-frames only playlists in vod-module, but they haven't played in any player, except VLC . I've checked hls.js, bitmovin demo player, mplayer and native player in safari. hls.js returns that error: type: "hlsError", details: "fragParsingError", fatal: false, reason: "no audio/video samples found" mplayer returns:

[hls @ 000000000201e340]Failed to open segment 1 of playlist 0
[hls @ 000000000201e340]Failed to open segment 2 of playlist 0
[hls @ 000000000201e340]Failed to open segment 3 of playlist 0

index.m3u8 plays normally, and it contains the same .ts files that iframes.m3u8

My iframes.m3u8 looks like

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:4
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-I-FRAMES-ONLY
#EXTINF:10.000,
#EXT-X-BYTERANGE:42676@376
seg-1-v1-a1.ts
#EXTINF:10.000,
#EXT-X-BYTERANGE:25756@376
seg-2-v1-a1.ts
#EXTINF:10.000,
#EXT-X-BYTERANGE:16168@376
seg-3-v1-a1.ts
...
#EXT-X-ENDLIST

Part of config:

location /hls-vod/ {
            alias         /mnt/;
            autoindex     on;
            vod_hls_absolute_index_urls off;
            vod_hls_absolute_master_urls off;
            vod_segment_count_policy last_rounded;
            vod hls;
        }

Is it some misconfiguration problem? Do I need to prepare my .mp4 sources somehow? May be I need some special videoplayer for it? Thanks

erankor commented 4 years ago

I'm not sure I understand... are you saying you fed the iframes.m3u8 URL to the player? If so, that is not supposed to work... The iframes.m3u8 URL should be included in the master.m3u8, and then some devices (e.g. Apple TV) can use it to implement trickplay/fast forward. It can't be played on its own.

flashick commented 4 years ago

I'm not sure I understand... are you saying you fed the iframes.m3u8 URL to the player? If so, that is not supposed to work... The iframes.m3u8 URL should be included in the master.m3u8, and then some devices (e.g. Apple TV) can use it to implement trickplay/fast forward. It can't be played on its own.

Ouch! It seems I've cooked it wrong. Big thank you for explanation!