globocom / globocom/m3u8

the behavior of M3U8(builtins.object).files

Open
#93 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
2.3k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

```
>>> import m3u8
>>> p=m3u8.load('http://qv.gaiamount.com/playlist/u116/v810_mp4.m3u8?e=1477373423&token=_6yhTpZI-AHtfULMSiW7eOCvrNEnOS_YcLV9GNfH:a6ZdAsiLXdfy10QBiWguUyq26yU=')
>>> p.files
['http://www.gaiamount.com/keys/3958/4k', '/seg/u116/v810_mp4_0000.ts', '/seg/u116/v810_mp4_0001.ts', '/seg/u116/v810_mp4_0002.ts', '/seg/u116/v810_mp4_0003.ts', '/seg/u116/v810_mp4_0004.ts', '/seg/u116/v810_mp4_0005.ts', '/seg/u116/v810_mp4_0006.ts', '/seg/u116/v810_mp4_0007.ts', '/seg/u116/v810_mp4_0008.ts', '/seg/u116/v810_mp4_0009.ts', '/seg/u116/v810_mp4_0010.ts', '/seg/u116/v810_mp4_0011.ts', '/seg/u116/v810_mp4_0012.ts', '/seg/u116/v810_mp4_0013.ts', '/seg/u116/v810_mp4_0014.ts', '/seg/u116/v810_mp4_0015.ts', '/seg/u116/v810_mp4_0016.ts', '/seg/u116/v810_mp4_0017.ts', '/seg/u116/v810_mp4_0018.ts', '/seg/u116/v810_mp4_0019.ts', '/seg/u116/v810_mp4_0020.ts', '/seg/u116/v810_mp4_0021.ts', '/seg/u116/v810_mp4_0022.ts', '/seg/u116/v810_mp4_0023.ts', '/seg/u116/v810_mp4_0024.ts', '/seg/u116/v810_mp4_0025.ts', '/seg/u116/v810_mp4_0026.ts', '/seg/u116/v810_mp4_0027.ts', '/seg/u116/v810_mp4_0028.ts', '/seg/u116/v810_mp4_0029.ts', '/seg/u116/v810_mp4_0030.ts']
>>>
```

(1) what should I do to get the absolute URIs of all the segments?
(2) I think `M3U8(builtins.object).files` should return all the URIs of the segments , but why present the key uri along with them ? This makes the result difficult to use , for example if I want to use the returned result to download all the chunks, then I have to judge whether the first element is a key uri or not, so annoying! It would be better to create another method like `M3U8(builtins.object).key_uri` to specifically return the key uri .

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the M3U8.files entry point and reproduce the supplied playlist example. Inspect how segment and key URIs are collected, then verify the expected absolute segment URIs and separate key URI behavior; the work is done when files can be used to download segments without treating the key as a segment.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.