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

94
Vistas
Flickering in video stream in HTML

I'm currently working on a video streaming website with WebSockets, streaming data from the webcam using open cv Python, sending them over frame by frame to a web socket. the client web socket reads the data and displays the image. I'm however experiencing a flickering issue with the images when all the feed elements are not visible, however when all feeds are visible it seems to work fine.

I've attached the html code (using jinja templates) and also the javascript

Could someone help me figure out why this is happening and how I can overcome it?

Here are the two YouTube videos to show the issue:

Without flicker - YT (All camera elements with ids 0-5 are visible)

With flicker - YT (Only camera elements with ids 0-3 are visible, 4-5 aren't visible)

-Javascript

const sock2 = new WebSocket('ws://' + location.host + '/camera');
sock2.addEventListener('message', ev=>{
    for(i=0;i<6;i++){
        var webcam_element = document.getElementById(`camera_${i}`);
        webcam_element.src = "data:image/jpg;base64,"+ev.data;
    }
});

-HTML

{% for i in range(6) %}
            <div>
              <img class="feed" id="camera_{{ i }}">
              <div class="feed_title_div">
                <h5 class="font_def feed_title">Room</h5>
              </div>
            </div>
{% endfor %}
about 4 years ago · Juan Pablo Isaza
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