Project Description
I run openSUSE TW and FF with i7-5600U Intel CPU. Calls with ~4 (video) participants work but my CPU load is approaching number of cores. In slightly bigger calls (>=6 participants) the CPU load was insufficient and audio packets were being dropped. I'd like learn more about webrtc video streams in order to reduce the client's CPU work or make it more adaptive when running with limited resources.
Goal for this Hackweek
- Prepare a testbench for stressing a client (likely bunch of extrinsic VMs with v4l2loopback).
- Learn about webrtc and browser API wrt video.
- Profile CPU work -- where the time is spent.
- (Reduction: reap any low-hanging fruits discovered in the profile.)
- (Adaptibility: figure out to how to recognize tight-CPU situations in the client and ensure audio QoS.)
Resources
- upstream issue (still unresolved)
- Jitsi instance (as a blackbox and presumed bottleneck is the client)
This project is part of:
Hack Week 20
Activity
Comments
-
over 3 years ago by mkoutny | Reply
- I used built-in support in FF with
media.navigator.streams.fake
+ Selenium to realize test callers - Quite an exhaustive blog on webrtc, the codec benchmarking in browser (alas worked in Chromium only, not FF)
- webrtc abstracts away many fine-tunings from the JS code, the parts that allow some tuning aren't standardized and each browser implements it differently
- FF has built-in JS profiler (measures real-time, not CPU time), I used perf for cpu time debugging
- (surprisingly), remarkable amount of CPU work is spent in (local) audio processing -- might be possible to reduce (in FF codebase), that's where I stopped
- video (decoding) didn't seem to be an issue in my measurements but it may be caused by synthetic video streams that didn't stress the decoder
- I didn't got down to the adaptibility issue
- code and private notes
- I used built-in support in FF with
-
over 3 years ago by mkoutny | Reply
I've continued analyzing the excessive audio cpu consumption and filed a FF bug (TL;DR it's tackled in upstream libwebrtc but FF "vendors" a stale version.)
Ad the audio QoS, the audio threads apparently run with
SCHED_RR
(therefore my attempts to reproduce tight CPU situations with cpu controller won't be realistic (onlySCHED_NORMAL
are throttled)). However, it seems the crackling noise isn't directly caused by low cpu bandwidth but: a) scheduling latency dispersion, b) receive threads (no RT priority) lagging behind.
Similar Projects
Update my own python audio and video time-lapse and motion capture apps and publish by dmair
Project Description
Many years ago, in my own time, I wrote a Qt python application to periodically capture frames from a V4L2 video device (e.g. a webcam) and used it to create daily weather timelapse videos from windows at my home. I have maintained it at home in my own time and this year have added motion detection making it a functional video security tool but with no guarantees. I also wrote a linux audio monitoring app in python using Qt in my own time that captures live signal strength along with 24 hour history of audio signal level/range and audio spectrum. I recently added background noise filtering to the app. In due course I aim to include voice detection, currently I'm assuming via Google's public audio interface. Neither of these is a professional home security app but between them they permit a user to freely monitor video and audio data from a home in a manageable way. Both projects are on github but out-of-date with personal work, I would like to organize and update the github versions of these projects.
Goal for this Hackweek
It would probably help to migrate all the v4l2py module based video code to linuxpy.video based code and that looks like a re-write of large areas of the video code. It would also be good to remove a lot of python lint that is several years old to improve the projects with the main goal being to push the recent changes with better organized code to github. If there is enough time I'd like to take the in-line Qt QSettings persistent state code used per-app and write a python class that encapsulates the Qt QSettings class in a value_of(name)/name=value manner for shared use in projects so that persistent state can be accessed read or write anywhere within the apps using a simple interface.
Resources
I'm not specifically looking for help but welcome other input.
COOTWbot by ngetahun
Project Description
At SCC, we have a rotating task of COOTW (Commanding Office of the Week). This task involves responding to customer requests from jira and slack help channels, monitoring production systems and doing small chores. Usually, we have documentation to help the COOTW answer questions and quickly find fixes. Most of these are distributed across github, trello and SUSE Support documentation. The aim of this project is to explore the magic of LLMs and create a conversational bot.
Goal for this Hackweek
- Build data ingestion
Data source:
- SUSE KB docs
- scc github docs
- scc trello knowledge board
Test out new RAG architecture
https://gitlab.suse.de/ngetahun/cootwbot