Recording Simulcast - Issues with Demos

Hello @all,

i am pulling my hair out for several days now to get recording in high quality working.

I am running Ubuntu 22.10.

I first started to try to get this working: GitHub - ethand91/mediasoup3-record-demo: Simple Record Demo using Mediasoup 3 and GStreamer

Without any luck.

Then i setup this demo: GitHub - Kurento/mediasoup-demos: Demos that show how to use mediasoup

I did get this working (basically) after getting the dependencies to the latest version (deleting packagelock and npm install).

However nothing that i did leads to ffmpeg recoding the high quality stream. Actually trying to get hd resolution does lead to the video file having a lower resolution then all previous tests. Also throwing out all simulcast layers except one with max bitrate of 3Mbit/s leads to a file having a bitrate of about 512kbit/s.

Any help and guidance leading for the demo to recording 720p with the highest simulcast layer is highly appriciated. I would even throw money on that issue.

Thank you so much!

below is my code, it works well:

let rtpConsumer
try {
  rtpConsumer = await rtpTransport.consume({
    paused: true
} catch (err) {
  error('error !', err.stack)

if (rtpConsumer.type === 'simulcast') {
  await rtpConsumer.setPreferredLayers({
    spatialLayer: 1 /* 0 bad  1 good  */,
    temporalLayer: 2 /* 0 bad , 2 best */