Netcam Studio UDP codec?


#1

Hi again,

Just out of curiosity. Does Netcam use a different codec for UDP stream than others (e.g. Dauhas own. Probably ripped somewhere tho)
When I use UDP on Netcam studio, I get plenty of artifacts, biterrors, latency etc etc. I do not get this when I use other UDP streaming programs. At least not the same amount of errors.
Yes, I know that UDP does not need ACK like TCP does, but it would be nice to be able to reduce the network overhead from the TCP packets and it should theoretically increase performance.

See attached link from my demo.

  1. Both uses the same VM (2 CPU 12 core @ 2.8Ghz, with 20Gb of RAM)
  2. 00:00 First showing Netcam Studio Client with RTSP-UDP.
  3. 00:48 Switches over to the webcam’s own “live” view. Transmitting from the camera to the browsers ActiveX (same path as to the server)
  4. 01:47 Back to Netcam Studio Client.

Youtube link

Spot the differences?
And what is causing it? Just curious…

Best Regards
Mads


#2

Codec is the exact same it’s just than in UDP you may get packets in the wrong order (so skipping some of them) and then resulting in these artefact.

Instead of skipping we should buffer more, delay the stream and somehow wait for the missing packets to arrive which we do not because it would use much more memory.

I’ve tried at some stage and due to the higher memory consumption decided that I will not go further in this direction and just keep skipping the packets occurring in the past.


#3

But that was really long time ago and it’s essentially internal at ffmpeg level so maybe we’re just lacking some configuration to improve that.

I’ll ask my expert which helped a lot with hardware acceleration and other RTSP related tasks so maybe he knows how to easily improve that…


#4

I was really close to give up on this because despite looking for a solution and trying for a couple of days we couldn’t find anything which helps.

People complain about this with ffmpeg since 2005 and I just really started to believe that it was because of having both computer and cameras on wifi that packets are effectively lost but today we just found out the magical switch in ffmpeg which seems to fix that problem. I’ll try a bit more during the weekend and hopefully it will be available in 1.6.1


#5

That´s the spirit. Never give up!
This will be great.
-Henrik


#6

I have the feeling that fps for this camera i use for testing this has never been so good so maybe we’ll soon all switch to udp :slight_smile:

And please don’t ask me if it will require to update the 2000+ templates :blush: