labgrid-project / labgrid-project/labgrid
High latency in USBVideo stream via SSH due to playbin3 buffering
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 528
- Forks
- 278
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Hello,
I’m currently using Labgrid’s USBVideoDriver to stream a remote USB camera.
The stream works, but the latency is extremely high (around 30 seconds).
The exporter and coordinator run on the same machine as the USB camera, and the client PC (running the viewer) is on the same LAN.
To rule out network issues, I tested the link with an scp transfer of a large file and achieved 112.6 MB/s, so the network bandwidth is not the bottleneck.
After investigating, I found that the latency completely disappears when I replace the default playbin3-based RX pipeline with a manual GStreamer pipeline:
rx_cmd = [
"gst-launch-1.0",
"fdsrc",
"!",
"jpegdec",
"!",
"queue", "max-size-buffers=1", "leaky=downstream",
"!",
"videoconvert",
"!",
"autovideosink",
"sync=false",
]
With this RX pipeline, the latency becomes near zero.
This makes me think that playbin3 might be introducing buffering or synchronization that is not suitable for low-latency SSH transport.
Questions
- Is this behavior expected when using
playbin3in this context? - Is there an existing way in Labgrid to override the RX pipeline?
- As a workaround I created my own driver, is this the recommended approach, or should this be handled inside
USBVideoDriver?
Thanks in advance for the guidance.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with USBVideoDriver's receive path and the playbin3-based RX pipeline described in the report; compare it with the manual gst-launch-1.0 pipeline and its queue and sync settings. Done requires determining whether Labgrid exposes a supported RX-pipeline override or whether USBVideoDriver needs a defined low-latency option.
Written by the indexing model from the issue text.
Assessment
- Domain
- audio-video-rtc, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100