handmade.network » Forums » Work-in-Progress » Veek - Slim live video chat
Positron
Mert
2 posts
#13959 Veek - Slim live video chat
1 month, 1 week ago Edited by Mert on Jan. 8, 2018, 7:19 p.m.

I think you're assuming that there was more designing than there actually was. :)
I probably started out with a minimal example of "I want to get audio input and output", hooked the two up to each other, added something resembling a UI to control it, and then added a layer of network IO to connect the two.
I certainly took the path of getting audio to work (nicely) first and then adding video later - and I'm *still* trying to make audio work nicely!

I'm probably missing something important but realtime video streaming simply doesn't have a bunch of the problems that audio does. If packets don't arrive or they arrive later or out-of-order it doesn't matter, you can always just show the latest frame of video that you have and it'll look fine. With audio you very quickly start getting very noticeable artifacts if you miss any number of packets.

I did spend a bunch of time at one point trying to rearrange code so that it was a bit more "elegant" and intuitive, but I eventually gave up, realising that if there's a nicer design in there it'll probably become clear later on, and carried on with doing actual work.



Actually, I don't like to work without designing it first :)

I never thought that audio streaming is harder than video streaming. Wow!

Thank you,I am going to start like you then. I'm planning to add encryption,too. Wish me luck!
D3zmodos
15 posts
#14002 Veek - Slim live video chat
1 month ago Edited by on Jan. 13, 2018, 11:28 a.m.

@Positron I look forward to seeing what you come up with!

I've uploaded a new version.
Of the issues mrmixer identified, I fixed the client not quitting correctly when it fails to setup the UI (it does indeed require OpenGL 3) as well as the "Send Tone" option not working if you do not have a microphone connected (or some other audio input device).

@mrmixer: I managed to find and fix at least one issue where the "Send Tone" option would cause 100% packet loss after being toggled off, but that may or may not have been the issue you were experiencing.

I've updated the links on the original post, but for convenience:
mrmixer
Simon Anciaux
338 posts
#14008 Veek - Slim live video chat
1 month ago

Seems to be working now (linux server, win 7 client and win 10 client).

I had 2 issues:
- sometime the client disconnect without reason. Is there a timeout if there is no audio input ?
- when joining a room where there is sound (like the test tone) the sound is weird for a second or two. Probably the same thing: when enabling speakers, the sound is also weird for a few seconds.