Comments (5)
Pretty cool! I didn't know the spec allowed this. Totally makes sense now! Thank you.
from m3u8-parser.
Each segment gets a map
property that points at the relevant map https://github.com/videojs/m3u8-parser/blob/main/src/parser.js#L654-L655
See the example in the README https://github.com/videojs/m3u8-parser#parsed-output
from m3u8-parser.
What if it's an init segment for fragmented MP4?
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-MAP:URI="init.mp4"
#EXTINF:8.333333,
index0.m4s
#EXTINF:8.333333,
index1.m4s
#EXTINF:8.333333,
index2.m4s
#EXTINF:8.333333,
index3.m4s
Edit: Oh... It's in the first segment, I see...
from m3u8-parser.
Oh, sorry, I should've made it more clear. The way that m3u8-parser models this is that the property is associated with the next segment that comes after it. So, in your example, it'll be the first segment. If there are multiple EXT-X-MAP
, each segment following the tag would get the map
property.
#EXT-X-MAP:URI="init.mp4"
#EXTINF:8.333333,
index0.m4s
#EXTINF:8.333333,
index1.m4s
#EXTINF:8.333333,
#EXT-X-MAP:URI="init2.mp4"
index2.m4s
#EXTINF:8.333333,
index3.m4s
So, index0
would have a map
pointing at init
and index2
would have a map pointing at init2
.
from m3u8-parser.
You're welcome. Yup, the spec allows for a new map per segment if you really wanted to, even! But I think most commonly you'll find it after a discontinuity.
from m3u8-parser.
Related Issues (20)
- Add file address
- 4.5.1 with Typescript crash (vhs-utils) HOT 6
- Stringify parsed manifest HOT 3
- Widevine + Fairplay multi-drm stream HOT 4
- PlayReady DRM HOT 2
- GitHub releases are outdated HOT 1
- Any plans to support trickplay manifest formats? HOT 1
- Parade
- Wiseplay support with videojs HOT 3
- Read tag EXT-OATCLS-SCTE35 in M3U8 manifest information HOT 2
- Support for basic vs extended format ? HOT 1
- A segment with several URLs is splitted into multiple segments HOT 1
- Fixable memory leak in Chromium based browsers HOT 5
- for the love of god please add typedefs HOT 4
- Skip error
- How can I parse one m3u8 after one HOT 1
- How to modify playlist urls or Segment urls
- @babel/runtime is listed as a production dependency
- How to get the manifest download duration , size and failure stats ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m3u8-parser.