title: Not able to show RTSP stream with Angular
body: <p>i'm working on a web application with angular where i need to show an rtsp stream inside my window.
  I'm using JSMpeg player related to this topic : <a href="https://stackoverflow.com/questions/58899464/not-able-to-show-live-camera-rtsp-streaming-with-angular?noredirect=1#comment106224607_58899464">Not able to Show live camera RTSP streaming with Angular</a>.</p>
  
  <p>For my websocket i used the node websocket library and i runned it like this in my cmd : <code>node websocket-relay.js supersecret 8081 8082</code></p>
  
  <p>It detect each connection i make on it.</p>
  
  <p>Then for the conversion part i used FFMPEG where I <strong>convert a h264 format to mpegts</strong> (mpegvideo1 gave me an error)
  I run it like this :</p>
  
  <p><code>ffmpeg -i "rtsp://myurl/media.smp" -vcodec h264 -f mpegts -max_muxing_queue_size 9999 -b 800k -r 30 http://localhost:8081/supersecret/640/480/</code></p>
  
  <p>For the angular part I have this :</p>
  
  <pre><code>@ViewChild('streaming', {static: true}) streamingcanvas: ElementRef; 
  
  constructor( ... ) { }
  
  ngOnInit() {
      ....
      let player = new JSMpeg.Player('ws://localhost:8081/supersecret', {
          canvas: this.streamingcanvas, autoplay: true, audio: false, loop: true
        })
  }
  
  </code></pre>
  
  <p>Result in my window : 
  <a href="https://i.stack.imgur.com/rDsEH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rDsEH.png" alt="Nothing happen in my canvas even if the websocket detect a connexion"></a></p>
  
  <p>What did i missed to make it works and get a real video stream?</p>
  
  <p>Thanks for help</p>
  
  <p><strong>EDIT : My first ffmpeg command was wrong, only the audio was sent, now i got this :</strong></p>
  
  <pre><code>ffmpeg -i "rtsp://myurl/media.smp" -vcodec h264 -f mpegts -codec:v mpeg1video -s 640x360 -b: 700k -r 25 -bf 0 -codec:a mp2 -ar 44100 -ac 1 -b:a 64k -max_muxing_queue_size 9999 http://localhost:8081/supersecret/640/360/
  </code></pre>
  
  <p>It still doesnt work but the canvas is not black anymore</p>