Balena web video speed

Hello,

I have been running a software called pikrellcam on several Rpi3 for a few years. I have adapted the code so that it works in a Balena image.

When the software is installed on a normal pi image the video stream is very fast with few glitches. Since using pikrellcam within a Balena container the web stream is a bit more glitchy and slow.

Do you know why this might be? Is there any obvious reason a video stream sent from within a container would be slower?

Many thanks,
Sam

Hello Sam,
Nothing obvious stands out initially. Do you notice high CPU usage? Perhaps the original code is using GPU acceleration? Do you see any error or warning messages in the console or in dmesg? If you’d like to post your Dockerfile or provide a link to your “balena-fied” repo we can take a look to see if we notice anything that may be causing that slowdown.

Thankyou much appreciated.

I’ve tried increasing the GPU flags but the video still has the same amount of stuttering.

This is the relevant section of my docker-compose file
services:
pikrellcam:
build: ./pikrellcam
labels:
io.balena.features.supervisor-api: ‘1’
io.balena.features.dbus: ‘1’
cap_add:
- NET_ADMIN
environment:
DBUS_SYSTEM_BUS_ADDRESS: “unix:path=/host/run/dbus/system_bus_socket”
privileged: true
network_mode: “host”
ports:
- “80:80/tcp”

My docker file contains no video settings, it just installs the pikrellcam software. Though this was a bit tricky because of permissions.,

1 Like

@tennisparty do you think you can share the source code so we can try to reproduce and detect what happens?

What’s the best way of sending you that privately?

If you can just create a minimal repo that still exhibits the issue and share that publicly. That way you don’t have to share any proprietary information. Otherwise, I think you can email hello@balena.io, and we should be able to find it.