DuoS changing CAM stream framerate

Hi,

I’m using the Milk-V cam on a Duo-S, imaged with SDK 2. I’m using the camera test example with the vision model enabled.

I’m trying to access the stream over a slow connection and there’s a lot of frame losses. There was some loss over lan too, but nearly not as much.

I would rather have a low frame rate of reasonable quality than what I currently manage to squeeze out. Is there a way to change the encoding frame rate for the stream?

(I can see that most cam related questions fall into a black hole, but maybe this one is easy enough…)

made a little table of all the decoding etc. issues I find in the streams, maybe it helps others. There’s some that are just network issues but a good number point at little things with the encoder etc., solving a few should step by step should allow to make large progress

Mplayer component Message Meaning Impact Causes
packet reader? max delay reached. need to consume packet packet loss or not generated
RTP missed <NUM> packets packet loss, not generated
RTP bad cseq <SEQNUM> expected <SEQNUM> packet loss, retransmits, memory corruption in encoder process
RTP dropping old packet received too late packet loss, retransmits
h264 error while decoding MB <NUM> <POS?>
h264 mb_type <ID> in P slice too large at <POS> <POS>
h264 concealing <NYM> DC, <NUM> AC, <NUM> MV errors in P frame
h264 ]out of range intra chroma pred mode

There’s some that are just network issues but a good number point at little things with the encoder etc., solving a few should step by step should allow to make large progress.
The questions are mostly if there are stalls in sending / bufferbloat or similar things that IP stack tuning can already handle and which are bugs in the encoder and whether they are in the hardware processing or the example application.
I think the best approach is

  1. start from a lower framerate,
  2. look at generating only valid stream data
  3. identify stalls, ensure a 10/25/30fps stream is generated constantly with h264 + npu hardware engaged
  4. tune transmission
  5. ensure all out-of-order transmissions are addressed and not caused by processing pipeline side
  6. make sdk patches for 5) since this will be to noone’s disadvantage

thus my question about lowering the fps as a first step.

  • List item

could it be this from the SDK / examples?