phoboslab / jsmpeg-vnc

A low latency, high framerate screen sharing server for Windows and client for browsers
2.39k stars 396 forks source link

How to push audio #81

Open bzmework opened 2 years ago

bzmework commented 2 years ago

I want to push audio, how should I achieve it, thank you!

zsinba commented 1 year ago

I don't think mpjpeg will be able to incorporate sound. This uses ffmpeg to push the data. Consider changing mjpeg to VP9, which may reduce bandwidth and increase clarity at the same time.

phoboslab commented 1 year ago

Have a look at the current JSMpeg version – it's able to accept a MPEG-TS stream, including mp2 audio. Using the updated JSMpeg for the client and implementing audio encoding and TS packetization in this project is certainly possible. My Magic Webcam App does exactly this.

That said, I currently don't have any interest in updating jsmpeg-vnc myself. Pull Requests are welcome.

zsinba commented 1 year ago

Have a look at the current JSMpeg version – it's able to accept a MPEG-TS stream, including mp2 audio. Using the updated JSMpeg for the client and implementing audio encoding and TS packetization in this project is certainly possible. My Magic Webcam App does exactly this.

That said, I currently don't have any interest in updating jsmpeg-vnc myself. Pull Requests are welcome. Magic Webcam App, Ipad pro(2021). Lan Env. about 200~300ms delay.

zsinba commented 1 year ago

No 100ms delay was tested.

zsinba commented 1 year ago

image

zsinba commented 1 year ago

Use the Ipad's camera to point at a timed web page; This web page is accurate to a thousandth of a second. In another browser, open the playback screen. The screen capture shows that the delay is about 200 to 300ms. The whole Intranet environment is used, and the network condition is good. May I ask how can I test the 100ms delay you mentioned? I use the free version of the Magic Webcam App. The 2021 Ipad Pro. IOS16.