I had so much fun at the conference in San Francisco! I met a lot of cool people who gave me advice on the app, although I didnāt see the downloads spike š. I primarily began working on a SW encoder and other miscellaneous changes:
17. Remote control toggle
Sometimes, the user doesnāt want a client to have remote control access. Although the purpose of the app is to have remote control, it is useful to disable this feature. On the frontend, I added a toggle switch that enables or disables the remote control backend. I was debating whether WebRTC negotiation was required as well, but decided to do so in the end. The remote control used data channels, so an unused data channel would result in slightly lower latency. Renegotiation ensured the stream stayed as efficient as possible without sending redundant data.
18. Update checking
In order for current users to access newer versions, I wanted to add an update functionality. Iām not using Tauriās update plugin just yet, so I run a simple check. The app, on startup, checks the latest release tag on GitHub. If itās not equal to the current version (rollback or higher version), the user is prompted to download the newer version. Automatic updates will come next.
19. The big boy: software encoding
This oneās been a long time coming. A lot of machines like VMs or computers with a weird setup just donāt have a working hardware encoder (Intel/AMD/Nvidia), and until now that meant the app straight up didnāt work there. So I built a full CPU-only x264 fallback.
For the pipeline, the frames come as raw BGRA bytes that the other supporters already encoded. They must be converted to I420 before going to libx264, whose build I pulled from OBS. As a side note, the DLL is bundled with the app at runtime to ensure no missing dependencies. As with any encoder, the rate control is ABR with a tight VBV, as well as an infinite GOP. Besides the technical jargon, this just means latency is the north star and nothing else matters.
The whole software variant is added to the encoder vendor enum, and wired into the fallback chain: if NVENC fails, try Intel; if Intel fails, fall back to software before giving up entirely. Thereās also a manual override if someone really prefers software encoding, but this is not the default. Thereās a big CPU cost compared to hardware encoding, so itās very much a last resort and only kicks in if absolutely no GPU encoders are available. But ālast resort that worksā beats ādoesnāt work at all.ā
Thatās it for this week! I plan to have some smaller quality-of-life changes and better updates coming soonā¦
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.