phoboslab / jsmpeg-vnc

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

Some questions about merging with latest jsmpeg version #66

Open roelvz opened 4 years ago

roelvz commented 4 years ago

Hello,

Do you think it's feasible to merge the latest version of jsmpeg into jsmpeg-vnc? I would like to do this because the latest jsmpeg version includes an audio decoder. I first tried with video only, but it doesn't work out of the box. The decoder thinks the received steam is garbage. I guess this is because the c++ part does not send a valid MPEG1-stream (because of a custom header each frame).

I tried to remove the custom header, but this does not seem to be working. Do you think it should be that simple? Or is there anything else I could be missing?

A better solution would be to take the custom header into account in the newest version of jsmpeg. Would this be hard? Could you give some directions on where to start?

For the audio part in the c++ code, I think this is pretty straightforward, but any tips are welcome.

Thank you

phoboslab commented 4 years ago

For jsmpeg-vnc to work with the current jsmpeg version, it needs to send out an MPEGTS Stream. FFMpeg has a muxer to create this stream. So, yeah, it's certainly possible.

I want to come back to this project eventually, but I'm buried with "real" work at the moment. Don't hold your breath :/

roelvz commented 4 years ago

Just for info, I wrote c++ code (started from jsmpeg-vnc for the idea but it turned out to me completely new code) that works together with the latest version of jsmpeg and also includes audio.

stefan-scott commented 2 years ago

@roelvz Is your version (with sound) published anywhere? I would be interested to check it out!

dragonballa commented 2 years ago

Just for info, I wrote c++ code (started from jsmpeg-vnc for the idea but it turned out to me completely new code) that works together with the latest version of jsmpeg-vnc and also includes audio.

Hi Roel....by any chance you could share this?

roelvz commented 2 years ago

I cannot make the code available, but here are some tips that may be helpful:

Note: I'm not using this code anymore and it was all build to work with ffmpeg 4.0.2. Some of these functions are probably deprecated or deleted in recent ffmpeg versions.