Crates.io | rsprobe |
lib.rs | rsprobe |
version | 0.7.8 |
source | src |
created_at | 2024-04-20 00:04:37.064075 |
updated_at | 2024-08-22 16:15:59.876092 |
description | MpegTS Stream Analysis Probe with Kafka and GStreamer |
homepage | https://github.com/groovybits/rscap |
repository | https://github.com/groovybits/rscap |
max_upload_size | |
id | 1214233 |
size | 338,737 |
Capture MpegTS off a network and analyze for broadcast monitoring purposes. Measure various properties and extract assets from a PCap-sourced MpegTS multicast network stream. Efficiently send metrics with image assets and stream metadata to Kafka for display in graphs and charts with alerts setup on data points. The project captures the MpegTS using pcap with filter rules for specifying the stream IP and port, then validates the stream for conformance. If requested, metrics are sent to Kafka for long-term storage along with images and other stream metadata using Gstreamer to extract assets.
Gstreamer support is available with the --features gst
flag (make build_gst
) for using Gstreamer for stream demuxing/decoding. Currently, --extract-images
will extract images from the stream and save them to disk or send them off to a Kafka feed as base64 with JSON metadata. See scripts/probe.sh for examples of how to use RsProbe in a common use case.
The src/bin/probe.rs is the main entry point for the probe client. It captures the MpegTS stream and extracts metrics and assets from the stream. The probe client is the main entry point for the project and is the main executable for the project.
Use .env
and/or command line args to override the default/env variables. See .env.example for an example configuration. The command line args are the same as the environment variables but with --
prepended to the variable name and lower case.
specs/rsprobe.spec builds for CentOS 7 with all the Gstreamer build dependencies handled for you.
rpmbuild -bb specs/rsprobe.spec
The Dockerfile Dockerfile in the root of the project builds a CentOS 7 image with RsProbe installed. The image has various env variables matching the .env file for configuration. The image is built with the --build-arg
flag for the environment variables.
/opt/rsprobe
contained directory./opt/rsprobe
.# Install RsProbe w/gstreamer in /opt/rsprobe/ (MacOS or CentOS 7)
./scripts/install.sh # or make install
# Optionally rebuild RsProbe if making changes
./scripts/compile.sh gst # or make build_gst
# Run the probe
./scripts/probe.sh -h # help to see what options are available
After processing and extraction, the project sends JSON metrics to Kafka. See the Kafka Schema for the format of the data sent to Kafka.
--kafka-broker sun:9092 \
--kafka-topic test \
--send-to-kafka
--kafka-interval 1000 \ # in milliseconds
Get VTune: Intel oneAPI Base Toolkit
Running VTune scripts/vtune.sh
## Runtime for VTune
# Web UI (Best) Read [Intel VTune Documentation](https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2024-0/web-server-ui.html)
./scripts/vtune.sh