• Stars
    star
    183
  • Rank 210,154 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created over 9 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Analyzer for HTTP Live Streams (HLS) content

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

More Repositories

1

winman

Go
131
star
2

epic-video-comparator

Javascript library which implements a video comparator component: two overlaped and synchronized video players each one playing an independent source.
TypeScript
83
star
3

inspector.js

Javascript Library that implements MpegTS, MP4 and WebM demuxers.
TypeScript
35
star
4

elastic

Converts go types no matter what
Go
23
star
5

diff3

diff3go 3-way diff in go
Go
11
star
6

docker-cucumber-protractor-chrome

Docker image to run cucumber protractor tests in headless chrome
JavaScript
8
star
7

angular-dashjs-player

Angular 6.0 wrapper for Dash.js player
TypeScript
6
star
8

browser-media-support

Check Media Source Extensions (MSE) and Encrypted Media Extensions support (EME)
TypeScript
6
star
9

swarm-samples

Collection of Swarm-related code snippets and examples
JavaScript
5
star
10

ngx-epic-video-player-demo

TypeScript
5
star
11

esphome-modbus-server

ESPHome Modbus Server component
C++
3
star
12

node-video-duration

NodeJs module that retrieves the duration of video/audio assets
JavaScript
3
star
13

macbook-facetimehd

Ubuntu driver install script for Macbook Pro
Shell
2
star
14

DeepAudioClassification

Jupyter Notebook
2
star
15

epic-video-player

JS library to wrap different video libraries.
TypeScript
2
star
16

epicmdns

mdns module for CoreDNS
Go
1
star
17

etherdune

EtherDune - Easy and extensible Arduino TCP/IP library
C++
1
star
18

tomcatjs

Nodejs library to interface with Tomcat Manager
TypeScript
1
star
19

beyondTheWallboard

Chrome extension to create a slideshow with the opened tabs.
JavaScript
1
star
20

epic-chatbot

ML Chatbot model trainer with tuits and Cornell databse movie. Also api service to use it
Python
1
star
21

YT8M

(Machine) Learning from YouTube8M dataset
Jupyter Notebook
1
star
22

across

Arduino/x86 cross-compile toolkit and runtime
C++
1
star