Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
WebRTC Recording Size

After few hours of research I can't find a solution to my problem and it seems impossible.

I built a simple WebRTC chat (2 clients) where you can create / join a room.

When two clients join the same room they can talk to each other. I have one localStream which is the local user camera and one remoteStream which is the other client camera from the PeerConnection.

I created a button that allows me to start a recording (local) of the remoteStream video. So my client 1 press this button and start record the video of the client 2.

My problem is when I check video data from the remoteStream the frame rate and the video resolution change over time. When I start recording the MediaRecorder grab the current remoteStream size and create a blob which contain my video. Later I can download this video by stopping the recording and download the blob. The problem is the size (definition) of the final video will depend on the current remoteStream size when the user click the button.

So if we are unlucky we will get an entire 360p video for example, if we start the recording later we can have a 1000p video or 868p or other random value between 1p and 2160p. So the video size will depend on the timing and will never be the same.

Is that possible to create a recording which take a fix video size and ignore this WebRTC fluctuation ?

Regards

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

WebRTC implements congestion control: the size, framerate and quality of the video is varied depending on the network conditions (packet loss and packet delay).

There are some knobs to control the behaviour. The one that I've found to be most useful is the contentHint field of MediaStreamTrack; if you set this field to the string detail, then the stack will prefer to reduce framerate rather than reducing the resolution.

At the end of the day, however, there doesn't seem to be anything you can do to forcibly prevent the stack from reducing the resolution when the network conditions are bad, so your code will need to handle that case.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda