Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stream system audio to web browser (javascript) over network

I'm searching if is possible to bring up an environment made by 1 PC and 1 smartphone:

  1. PC1 running without screen and with JACK audio server (or alsa or whatever)
  2. smartphone connected to the same network of PC1 and with the browser pointing to http://pc1/

Is possible to stream PC1'system audio on the smartphone's WebBrowser? Anyone can explain me how? Both in server-side (Linux/Jackd) and in client-side (Javascript on WebBrowser with Audio API)

Regards

like image 491
MadPapo Avatar asked Aug 26 '26 23:08

MadPapo


1 Answers

Ok, so you have a pc with jack and nodejs as http server.

What you need to do is to install ffmpeg, and follow this instructions: https://www.ffmpeg.org/ffmpeg-devices.html#jack

You will use ffmpeg within nodejs to stream the output to the browser.

There are several questions about streaming videos and audio with nodejs. You can simply serve a progressive http stream and the browser will play it.

In the end you will not use web-audio api, sockets or WebRTC

like image 163
Keyne Viana Avatar answered Aug 28 '26 13:08

Keyne Viana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!