Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epiclabs-io/hls-analyzer
Analyzer for HTTP Live Streams (HLS) content
https://github.com/epiclabs-io/hls-analyzer
Last synced: 2 months ago
JSON representation
Analyzer for HTTP Live Streams (HLS) content
- Host: GitHub
- URL: https://github.com/epiclabs-io/hls-analyzer
- Owner: epiclabs-io
- License: other
- Created: 2015-03-17T22:15:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-12T16:28:10.000Z (almost 6 years ago)
- Last Synced: 2024-08-01T13:37:24.239Z (5 months ago)
- Language: Python
- Size: 274 KB
- Stars: 179
- Watchers: 16
- Forks: 54
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-video - hls-analyzer - Analyzer for HTTP Live Streams (HLS) content. (Language and platform specific libraries / Python)
- awesome-video - epiclabs-io/hls-analyzer - Analyzer for HTTP Live Streams (HLS) content. (HLS / Talks Presentations Podcasts)
README
# HLS Analyzer
Tool for analyzing HTTP Live Streams (HLS) compatible with both VOD and Live content.It analyzes TS segments of the stream and provide useful information about the content, pretty useful to catch encoding or playback quality issues:
* HLS information. Type of the stream (live or vod), media sequence, type of encryption and number of segments.
* Tracks information. Video and audio tracks information (codecs, profiles, resolution, sample rate, channels, etc)
* Timing information (PTS and segment duration). Useful to check if bitrates and segments are properly aligned.
* Frames information. Keyframe interval, frames sequence. Useful to check if every segment starts with a keyframe. Useful to ensure smooth bitrate switching.## Command line tool syntax
`python hls-analyzer.py [-h] [-s SEGMENTS] [-l FRAME_INFO_LEN] Url`
* `Url`: Url of the stream to be analyzed
Optional arguments:
* `-s SEGMENTS` Number of segments to be analyzed per playlist. By default, one segment per playlist is analyzed
* `-l FRAME_INFO_LEN` Max length per track for frames information
* `-h, --help` Show help message## Example of use
`python hls-analyzer.py https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8`
Output:
```
Master playlist. List of variants:
Playlist: https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/prog_index.m3u8, bw: 232370
Playlist: https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8, bw: 649879***** Analyzing variant (232370) *****
** Generic information **
Version: 3
Media sequence: 0
Is Live: False
Encrypted: False
Number of segments: 181
Downloading https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/fileSequence0.ts, Range: None** Tracks and Media formats **
Track #0 - Type: video/avc, Format: Video (H.264) - Profile: Main, Level: 64, Resolution: 400x300, Encoded aspect ratio: 0/1, Display aspect ratio: 1
Track #1 - Type: audio/mp4a-latm, Format: Audio (AAC) - Sample Rate: 22050, Channels: 2** Timing information **
Segment declared duration: 9.97667
Track #0 - Duration: 9.943333 s, First PTS: 10.0 s, Last PTS: 19.943333 s
Track #1 - Duration: 9.473739 s, First PTS: 9.904222 s, Last PTS: 19.377961 s
Duration difference (declared vs real): 0.502931 s (5.31%)** Frames **
Track #0 - KF: 0.067, Frames: I-I-P-P-B-B-P-P-B-B-P-P-B-B-P-P-B-B-P-P-B-B-P-P-B-B-P-P-B-B-P-P-B-B-P-P-B-B-P-P-
Track #1 - KF: 0.046, Frames: I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-***** Analyzing variant (649879) *****
** Generic information **
Version: 3
Media sequence: 0
Is Live: False
Encrypted: False
Number of segments: 181
Downloading https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/fileSequence0.ts, Range: None** Tracks and Media formats **
Track #0 - Type: video/avc, Format: Video (H.264) - Profile: Main, Level: 64, Resolution: 640x480, Encoded aspect ratio: 0/1, Display aspect ratio: 1
Track #1 - Type: audio/mp4a-latm, Format: Audio (AAC) - Sample Rate: 22050, Channels: 2** Timing information **
Segment declared duration: 9.97667
Track #0 - Duration: 9.943333 s, First PTS: 10.0 s, Last PTS: 19.943333 s
Track #1 - Duration: 9.473739 s, First PTS: 9.904222 s, Last PTS: 19.377961 s
Duration difference (declared vs real): 0.502931 s (5.31%)** Frames **
Track #0 - KF: 0.067, Frames: I-I-I-I-I-P-P-P-P-P-B-B-B-B-B-P-P-P-P-P-B-B-B-B-B-P-P-P-P-P-B-B-B-B-B-P-P-P-P-P-
Track #1 - KF: 0.046, Frames: I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-I-
```## Third party libraries
This project uses m3u8 library created by Globo.com: https://github.com/globocom/m3u8