Skip to content

Conversation

lqs
Copy link
Contributor

@lqs lqs commented May 14, 2025

This pull request introduces initial support for USB audio devices in JetKVM. With this feature, remote hosts can now select a USB audio output, and JetKVM will capture the audio stream from that device and transmit it to the web console for playback.

To set it up:

  1. Build the audio module from https://github.com/lqs/jetkvm-audio

  2. Copy the binary JetKVM device

Make sure the binary is placed at /userdata/jetkvm/bin/jetkvm_audio and is executable.

TODO

  • Add a mute button to the web console
  • Allow enabling/disabling the audio device
  • Remove the FFmpeg dependency

It’s still rough, but I hope it can be a step toward better sound functionality.

@lqs lqs mentioned this pull request May 14, 2025
@john--
Copy link
Contributor

john-- commented May 15, 2025

Very cool that you were able to accomplish this! Agreed, it's a little choppy. By any chance are you exhausting the resources of the hardware?
I use absolute mouse positioning and noticed cursor lag. Without audio (on the dev branch code) my cursor movement is instantaneous. Has anyone else noticed this?

@lqs
Copy link
Contributor Author

lqs commented May 16, 2025

Finally turned out that the RTP timestamps generated by FFmpeg were uneven and had incorrect intervals. Adjusted according to RFC7587 with a 960 increment per packet, resulting in perfectly smooth music playback.

@john-- Maybe the cursor lag is also caused by incorrect timestamps, which slow down the video to stay in sync with the audio.

@john--
Copy link
Contributor

john-- commented May 18, 2025

Finally turned out that the RTP timestamps generated by FFmpeg were uneven and had incorrect intervals. Adjusted according to RFC7587 with a 960 increment per packet, resulting in perfectly smooth music playback.

@john-- Maybe the cursor lag is also caused by incorrect timestamps, which slow down the video to stay in sync with the audio.

Interesting. It does seem a lot better now, nice work. The only thing I've noticed is that ffmpeg seems to use quite a lot CPU.

@adrianmeraz
Copy link
Contributor

@lqs any word on when this can be merged in? Hope your PR doesn't stick around in limbo

@jeisom
Copy link

jeisom commented Jul 2, 2025

Would/Could it be have the option of a half rate audio? Say 22500 or 24000. Should be lower cpu usage and bandwidth if those are concerns. Would be good enough for basic remote management stuff.

@euforic
Copy link

euforic commented Jul 19, 2025

Is it possible to make the device you are adding have audio out and audio in?

@pennycoders
Copy link

Hey guys! Any updates on this?

@adamshiervani
Copy link
Contributor

Awesome work, and thanks for building the foundation, @lqs!

As the @pennycoders took this to the finishing line in #718, I will close this PR. Their PR is currently in review and tracked for the next release, 0.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants