This repository contains examples related to GStreamer, Deepstream and Hailo. Some of the examples are written in Python and some of them are written in C/C++.
Directories are as follows:
- helper-package
- A package that contains helper functions and classes
- deepstream-examples
- Deepstream related examples
- hailo-examples
- Hailo related examples
- gst-examples
- GStreamer examples
- docker
- Docker files for generating containers
- Model Context Protocol (MCP) for GStreamer 1.28
- conda
- Conda virtual environments
Paul Bridger has excellent tutorials regarding how to speed up inference. For anyone interested in the subject, I recommend you to take a look at:
- https://paulbridger.com/posts/video-analytics-pytorch-pipeline/
- https://paulbridger.com/posts/video-analytics-pipeline-tuning/
Helpers is a Python package that contains some helper routines for creating gst-pipelines.
Some of the examples use modules from this package. If you get an error saying that the modules are missing, you can install it with the following instructions.
First make sure that you have the latest version of the build package installed using the following command:
python3 -m pip install --upgrade buildIn order to create the helper package, run the following command from the directory where the setup.py is located:
cd helper-package
python3 -m buildAbove command creates a new directory called dist where the package can be found. In order to install the created package,
run the following command from the dist directory:
pip3 install ./helpers-0.0.1-py3-none-any.whlReplace helpers-0.0.1-py3-none-any.whl with the actual name/path of the whl-file that was created.
Once you have installed the helpers package, you can use is as follows:
from helpers import gsthelpersFor more information regarding Python packagaging etc., take a look at:
- https://packaging.python.org/en/latest/tutorials/packaging-projects/
- https://docs.python.org/3/tutorial/modules.html#packages
- https://python-packaging-tutorial.readthedocs.io/en/latest/setup_py.html
Agents are a great help when writing code. Sometimes, however, the LLM can get "stuck" if it does not find the correct information for a particular library version. Typical harnesses expose tools for downloading the source code, but this can fill up the context window pretty fast. GStreamer is one of the largest, if not the largest, media framework in existence, so even LLMs with large context windows might be thrown off if they need to start analyzing source code. The MCP server defined in docker/README.md can help by giving access to correct documentation for GStreamer version 1.28.