Opened 20 months ago
Last modified 20 months ago
#10325 new defect
ipfs stored m3u8 doesn't work correctly
Reported by: | hsn | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
ffplay won't play m3u8 from ipfs filesystem. It have no problems with playing mp4 stored there.
ffplay ipfs://bafyjvzacdkmdv5iy5ldtibqc6yesvwg3cqmfpdo4clwfrpbc7xdq/index_1080p.m3u8
Failed to open segment 0 of playlist 0
Segment 0 of playlist 0 failed too many times, skipping
Failed to open segment 1 of playlist 0/0
Segment 1 of playlist 0 failed too many times, skipping
Failed to open segment 2 of playlist 0
Segment 2 of playlist 0 failed too many times, skipping
m3u8 file looks normal:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.302644,
index_1080p_0000.ts
#EXTINF:8.801044,
index_1080p_0001.ts
#EXTINF:3.879133,
index_1080p_0002.ts
#EXTINF:6.632067,
index_1080p_0003.ts
#EXTINF:6.465222,
index_1080p_0004.ts
#EXTINF:6.214956,
Browse directory content:
https://bafyjvzacdkmdv5iy5ldtibqc6yesvwg3cqmfpdo4clwfrpbc7xdq.ipfs.cf-ipfs.com
There is no problem with playing single segments:
ffplay ipfs://bafyjvzacdkmdv5iy5ldtibqc6yesvwg3cqmfpdo4clwfrpbc7xdq/index_1080p_0000.ts works
this error is case when using local ipfs node at localhost:8080. I think problem is with returned redirects - local ipfs node will send back redirect to url like
http://bafyjvzacdkmdv5iy5ldtibqc6yesvwg3cqmfpdo4clwfrpbc7xdq.ipfs.localhost:8080 (cid in url request format) and it will fail when http code will try to resolve host name bafyjvzacdkmdv5iy5ldtibqc6yesvwg3cqmfpdo4clwfrpbc7xdq.ipfs.localhost
Correct handling is to send all requests to localhost:8080, do not attempt to resolve localhost subdomain and add Host: header or maybe send full url like to proxy server.