Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda