This examples launches a total of 6 containers, 3 for video, 3 for audio.
mxl-example-audio-flow-writer
mxl-example-video-flow-writer
These run the mxl-gst-testsrc tool provided in the repository to publish a test signal.
mxl-example-audio-fake-reader
mxl-example-video-fake-reader
These simulate side effects of a reader consuming the respective flows, such as updating the Last read time of discrete flows.
mxl-example-audio-flow-info
mxl-example-video-flow-info
These print out information about the video and audio flow to stdout. You can check the output and observe if everything is working correctly by running:
docker logs mxl-example-video-flow-info-1You can also bind the mxl domain created as part of the docker compose deployment to a local mountpoint using a script provided in the scripts directory.
scripts/bind-compose-domain.sh ./mxl-domainYou can then preview the flows published by the containerized media functions in your host environment:
# show video flow
mxl-gst-sink -d ./mxl-domain -v 5fbec3b1-1b0f-417d-9059-8b94a47197ed
# play audio flow
mxl-gst-sink -d ./local-domain -a b3bb5be7-9fe9-4324-a5bb-4c70e1084449NOTE: Out of the box, the setup works correctly only with docker.io. When using Docker CE,
docker compose upmay fail with:invalid mount config for type "bind": bind source path does not exist: /dev/shm/mxl
In the "examples" directory run:
docker compose buildIn the "examples" directory run:
docker compose upor to start in the background:
docker compose up -dNote: Tested on K3S and Kubernetes created with kubeadm. This will probably not run on more restrictive Kubernetes distributions like OpenShift or Rancher without modification.
Follow the same steps above to build the images. If you don't want to use a registry to access the images from the kubernetes cluster, you can export the images to a file and import them on your kubernetes cluster node. On the system where you built the images:
scripts/export-images.sh mxl-example-images.tar.gzOn the kubernetes node (when using containerd):
gunzip < mxl-example-images.tar.gz | sudo ctr image import -If you want to use a registry, you will need to change the image references in kube-example.yaml to point to the images in your registry.
sed -i 's%docker.io/library/%images.mycompany.com/repos/%g'Because PersistentVolumes requires a nodeAffinity clause you also need to inject the hostname of the node you want to run the example containers on into the deployment.
You can use the provided script.
scripts/render-kube-template.sh my-node-hostname > /tmp/deployment.ymlYou can then deploy the resources with:
kubectl apply -r /tmp/deployment.ymlTo check the pods that are running use this command:
kubectl get pod -wTo check if the video flow writer is producing frames:
kubectl logs -f mxl-video-flow-info-(...)To check if the audio flow writer is producing samples:
kubectl logs -f mxl-audio-flow-info-(...)