streamdoctor 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamdoctor-0.1.0/LICENSE +21 -0
- streamdoctor-0.1.0/PKG-INFO +110 -0
- streamdoctor-0.1.0/README.md +93 -0
- streamdoctor-0.1.0/pyproject.toml +31 -0
- streamdoctor-0.1.0/setup.cfg +4 -0
- streamdoctor-0.1.0/src/streamdoctor/__init__.py +10 -0
- streamdoctor-0.1.0/src/streamdoctor/analyzer.py +1575 -0
- streamdoctor-0.1.0/src/streamdoctor/analyzers/__init__.py +0 -0
- streamdoctor-0.1.0/src/streamdoctor/analyzers/bitrate.py +483 -0
- streamdoctor-0.1.0/src/streamdoctor/analyzers/timing.py +230 -0
- streamdoctor-0.1.0/src/streamdoctor/api.py +148 -0
- streamdoctor-0.1.0/src/streamdoctor/cli.py +944 -0
- streamdoctor-0.1.0/src/streamdoctor/diagnosis.py +626 -0
- streamdoctor-0.1.0/src/streamdoctor/executor.py +46 -0
- streamdoctor-0.1.0/src/streamdoctor/models.py +62 -0
- streamdoctor-0.1.0/src/streamdoctor/network.py +215 -0
- streamdoctor-0.1.0/src/streamdoctor/probe.py +129 -0
- streamdoctor-0.1.0/src/streamdoctor/remediation.py +199 -0
- streamdoctor-0.1.0/src/streamdoctor/rest.py +64 -0
- streamdoctor-0.1.0/src/streamdoctor.egg-info/PKG-INFO +110 -0
- streamdoctor-0.1.0/src/streamdoctor.egg-info/SOURCES.txt +34 -0
- streamdoctor-0.1.0/src/streamdoctor.egg-info/dependency_links.txt +1 -0
- streamdoctor-0.1.0/src/streamdoctor.egg-info/entry_points.txt +2 -0
- streamdoctor-0.1.0/src/streamdoctor.egg-info/requires.txt +7 -0
- streamdoctor-0.1.0/src/streamdoctor.egg-info/top_level.txt +1 -0
- streamdoctor-0.1.0/tests/test_analyzer_behavior.py +268 -0
- streamdoctor-0.1.0/tests/test_api.py +110 -0
- streamdoctor-0.1.0/tests/test_cli_json.py +113 -0
- streamdoctor-0.1.0/tests/test_cli_remediate.py +113 -0
- streamdoctor-0.1.0/tests/test_diagnosis_engine.py +148 -0
- streamdoctor-0.1.0/tests/test_executor.py +83 -0
- streamdoctor-0.1.0/tests/test_network.py +44 -0
- streamdoctor-0.1.0/tests/test_network_diagnosis.py +125 -0
- streamdoctor-0.1.0/tests/test_network_integration.py +87 -0
- streamdoctor-0.1.0/tests/test_remediation.py +123 -0
- streamdoctor-0.1.0/tests/test_rest.py +70 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StreamDoctor Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: streamdoctor
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Video stream diagnostics and root-cause analysis toolkit
|
|
5
|
+
Author: StreamDoctor Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: fastapi>=0.95.0
|
|
11
|
+
Requires-Dist: uvicorn[standard]>=0.22.0
|
|
12
|
+
Requires-Dist: requests>=2.0
|
|
13
|
+
Requires-Dist: httpx>=0.24.0
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# StreamDoctor
|
|
19
|
+
|
|
20
|
+
StreamDoctor is an open-source Python toolkit for inspecting and diagnosing live video stream health. It helps detect timing issues, FPS drift, frame gaps, jitter, PTS anomalies, GOP behavior, and other stream-quality signals from real camera or media sources.
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
The project is designed for technical users who want a lightweight, evidence-based way to understand whether a live stream is delivering frames at the expected cadence and whether the problem is likely related to encoder side, transport, or stream delivery.
|
|
25
|
+
|
|
26
|
+
StreamDoctor focuses on:
|
|
27
|
+
|
|
28
|
+
- RTMP/RTSP-style stream inspection
|
|
29
|
+
- live frame and packet analysis
|
|
30
|
+
- declared-vs-measured FPS comparison
|
|
31
|
+
- jitter and timing gap detection
|
|
32
|
+
- PTS/DTS anomaly reporting
|
|
33
|
+
- diagnostic summaries and recommendations
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- `streamdoctor inspect <url>`: inspect stream/container metadata
|
|
38
|
+
- `streamdoctor analyze <url> --duration <seconds>`: run a timed live analysis
|
|
39
|
+
- JSON-friendly diagnostic output patterns for automation workflows
|
|
40
|
+
- Python API for integration into custom tooling
|
|
41
|
+
- evidence-first diagnosis instead of unsupported root-cause assumptions
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
### 1) Python requirement
|
|
46
|
+
|
|
47
|
+
- Python 3.10 or newer
|
|
48
|
+
|
|
49
|
+
### 2) Install the package
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m venv .venv
|
|
53
|
+
source .venv/bin/activate
|
|
54
|
+
python -m pip install --upgrade pip
|
|
55
|
+
python -m pip install -r requirements.txt
|
|
56
|
+
python -m pip install -e .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
On Windows PowerShell:
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
python -m venv .venv
|
|
63
|
+
.\.venv\Scripts\Activate.ps1
|
|
64
|
+
python -m pip install --upgrade pip
|
|
65
|
+
python -m pip install -r requirements.txt
|
|
66
|
+
python -m pip install -e .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 3) Install FFmpeg/FFprobe separately
|
|
70
|
+
|
|
71
|
+
This project does not bundle FFmpeg or FFprobe. You must install them on your system and ensure `ffprobe` is available on your `PATH`.
|
|
72
|
+
|
|
73
|
+
Examples:
|
|
74
|
+
|
|
75
|
+
- Ubuntu/Debian: `sudo apt install ffmpeg`
|
|
76
|
+
- macOS (Homebrew): `brew install ffmpeg`
|
|
77
|
+
- Windows: install FFmpeg and add it to `PATH`
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## Quick start
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
streamdoctor --help
|
|
85
|
+
streamdoctor inspect "rtmp://example.com/live/camera"
|
|
86
|
+
streamdoctor analyze "rtmp://example.com/live/camera" --duration 30
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Notes
|
|
90
|
+
|
|
91
|
+
- This project is built to analyze stream behavior from external media tooling.
|
|
92
|
+
- It does not ship FFmpeg binaries or proprietary media binaries.
|
|
93
|
+
- FFprobe output is used as a dependency for the time-based stream analysis pipeline.
|
|
94
|
+
- The project aims to remain evidence-based and avoids claiming precise root causes without clear supporting data.
|
|
95
|
+
|
|
96
|
+
## Requirements and dependency policy
|
|
97
|
+
|
|
98
|
+
The Python dependencies in `requirements.txt` are the only packaged runtime libraries included with this project. FFmpeg/FFprobe are external system dependencies and are not redistributed here.
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
This project is licensed under the MIT License. See `LICENSE` for details.
|
|
103
|
+
|
|
104
|
+
## Third-party notices
|
|
105
|
+
|
|
106
|
+
This project uses third-party Python dependencies and relies on externally installed FFmpeg/FFprobe tooling. See `THIRD_PARTY_LICENSES.md` for a summary of licensing obligations.
|
|
107
|
+
|
|
108
|
+
## Security and public release note
|
|
109
|
+
|
|
110
|
+
Before publishing this project publicly, remove any real stream URLs, credentials, private hostnames, and secret configuration from documentation and source files. Use placeholders such as `rtmp://example.com/live/camera` instead.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# StreamDoctor
|
|
2
|
+
|
|
3
|
+
StreamDoctor is an open-source Python toolkit for inspecting and diagnosing live video stream health. It helps detect timing issues, FPS drift, frame gaps, jitter, PTS anomalies, GOP behavior, and other stream-quality signals from real camera or media sources.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The project is designed for technical users who want a lightweight, evidence-based way to understand whether a live stream is delivering frames at the expected cadence and whether the problem is likely related to encoder side, transport, or stream delivery.
|
|
8
|
+
|
|
9
|
+
StreamDoctor focuses on:
|
|
10
|
+
|
|
11
|
+
- RTMP/RTSP-style stream inspection
|
|
12
|
+
- live frame and packet analysis
|
|
13
|
+
- declared-vs-measured FPS comparison
|
|
14
|
+
- jitter and timing gap detection
|
|
15
|
+
- PTS/DTS anomaly reporting
|
|
16
|
+
- diagnostic summaries and recommendations
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- `streamdoctor inspect <url>`: inspect stream/container metadata
|
|
21
|
+
- `streamdoctor analyze <url> --duration <seconds>`: run a timed live analysis
|
|
22
|
+
- JSON-friendly diagnostic output patterns for automation workflows
|
|
23
|
+
- Python API for integration into custom tooling
|
|
24
|
+
- evidence-first diagnosis instead of unsupported root-cause assumptions
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
### 1) Python requirement
|
|
29
|
+
|
|
30
|
+
- Python 3.10 or newer
|
|
31
|
+
|
|
32
|
+
### 2) Install the package
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python -m venv .venv
|
|
36
|
+
source .venv/bin/activate
|
|
37
|
+
python -m pip install --upgrade pip
|
|
38
|
+
python -m pip install -r requirements.txt
|
|
39
|
+
python -m pip install -e .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
On Windows PowerShell:
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
python -m venv .venv
|
|
46
|
+
.\.venv\Scripts\Activate.ps1
|
|
47
|
+
python -m pip install --upgrade pip
|
|
48
|
+
python -m pip install -r requirements.txt
|
|
49
|
+
python -m pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 3) Install FFmpeg/FFprobe separately
|
|
53
|
+
|
|
54
|
+
This project does not bundle FFmpeg or FFprobe. You must install them on your system and ensure `ffprobe` is available on your `PATH`.
|
|
55
|
+
|
|
56
|
+
Examples:
|
|
57
|
+
|
|
58
|
+
- Ubuntu/Debian: `sudo apt install ffmpeg`
|
|
59
|
+
- macOS (Homebrew): `brew install ffmpeg`
|
|
60
|
+
- Windows: install FFmpeg and add it to `PATH`
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## Quick start
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
streamdoctor --help
|
|
68
|
+
streamdoctor inspect "rtmp://example.com/live/camera"
|
|
69
|
+
streamdoctor analyze "rtmp://example.com/live/camera" --duration 30
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Notes
|
|
73
|
+
|
|
74
|
+
- This project is built to analyze stream behavior from external media tooling.
|
|
75
|
+
- It does not ship FFmpeg binaries or proprietary media binaries.
|
|
76
|
+
- FFprobe output is used as a dependency for the time-based stream analysis pipeline.
|
|
77
|
+
- The project aims to remain evidence-based and avoids claiming precise root causes without clear supporting data.
|
|
78
|
+
|
|
79
|
+
## Requirements and dependency policy
|
|
80
|
+
|
|
81
|
+
The Python dependencies in `requirements.txt` are the only packaged runtime libraries included with this project. FFmpeg/FFprobe are external system dependencies and are not redistributed here.
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
This project is licensed under the MIT License. See `LICENSE` for details.
|
|
86
|
+
|
|
87
|
+
## Third-party notices
|
|
88
|
+
|
|
89
|
+
This project uses third-party Python dependencies and relies on externally installed FFmpeg/FFprobe tooling. See `THIRD_PARTY_LICENSES.md` for a summary of licensing obligations.
|
|
90
|
+
|
|
91
|
+
## Security and public release note
|
|
92
|
+
|
|
93
|
+
Before publishing this project publicly, remove any real stream URLs, credentials, private hostnames, and secret configuration from documentation and source files. Use placeholders such as `rtmp://example.com/live/camera` instead.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "streamdoctor"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Video stream diagnostics and root-cause analysis toolkit"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "StreamDoctor Contributors"}
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"fastapi>=0.95.0",
|
|
17
|
+
"uvicorn[standard]>=0.22.0",
|
|
18
|
+
"requests>=2.0",
|
|
19
|
+
"httpx>=0.24.0"
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
dev = [
|
|
24
|
+
"pytest>=7.0"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
streamdoctor = "streamdoctor.cli:main"
|
|
29
|
+
|
|
30
|
+
[tool.setuptools.packages.find]
|
|
31
|
+
where = ["src"]
|