MediaSoup client running on a Raspberry PI

Hello,

I’m seeking for help for a specific problem. I’m having a MediaSoup client running on a Raspberry PI using skymaze/pymediasoup and GStreamer.

The PI acts as a producer, sending H.264 video to the Mediasoup server. From there a web client consumes the video.

The producer stats on the MediaSoup server confirm the proper reception of H.264 video from all sources mentioned below.

I’m feeding H.264 NAL units directly into the aiortc code used by pymediasoup, thus being able to utilize cameras which are providing H.264 directly. The video is provided by various different pipelines.

This works perfectly for H.264 USB cams. It does not work with the PI CSI cam. It also works with the output of the x264enc software encoder but again not with the output of the v4l2h264enc hardware encoder and also not with libcamerasrc.

Recordings of all H.264 feeds locally on the PI can be perfectly played back using ffplay.

I have added consumer stats on the server. In all cases there are upcounting stats for inbound-rtp, so the SFU works. But just in the case of the working USB cam I’m having upcounting stats on the outbound-rtp. How to say? Is the browser not fed or didn’t it start fetching? I don’t know.

Could anybody help me to narrow down this issue?

PS all feeds are working perfectly with the browser using aiortc and P2P webrtc.

Thanks in advance.

anyone?

please close it

Why? You asked a question. People may answer or not, but there is no reason to close the topic.

BTW if RTP reaches mediasoup but not the consumer then something is wrong at RTP level. Probably RTP packets being received in mediasoup are discarded because their SSRC (or MID if any) doesn’t match the RtpParameters given to transport.produce() in mediasoup. If you enable “rtp” logTags and also enable worker logs, you should see those warnings.

You are right, but I didn’t want to bother. In the end it was a content problem with the CSI H.264. I wasn’t able to detect any problems with RTP caps. The consumer session was established correctly according to all the logs. But setting the parameter ⁠ repeat_sequence_header=1 ⁠ for the CSI driver did make it. I interpret that as “send SPS/PPS periodically”, this is obviously not the case with the default settings. How far Mediasoup is concerned with RTP payload internals, is above my knowledge. But this was in the end the difference between the USB cam and the CSI cam.