rtsp-relay icon indicating copy to clipboard operation
rtsp-relay copied to clipboard

error read sdp file

Open CristianoSword opened this issue 3 years ago • 1 comments

I'm trying to run a streamign on my dvr camera, but it doesn't read, the dvr returns the following url:

rtsp://painel.**mysite**.com:554/user=admin&password=pass1&channel=4&stream=0.sdp which is read perfectly in vlc. But in rtsp-player it doesn't run

I also tried with the formatting informed in read.me but it also doesn't work

const express = require('express');
const app = express();

const { proxy, scriptUrl } = require('rtsp-relay')(app);

const handler = proxy({

 //  url: `rtsp://admin:[email protected]:554/feed`,
 // if your RTSP stream need credentials, include them in the URL as above
 
   url: 'rtsp://admin:pass1@painel.**mysite**.com:554/sdp:channel=4&stream=0.sdp',
//url: 'rtsp://painel.**mysite**.com:554/user=admin&password=pass1&channel=4&stream=0.sdp'


  verbose: false,
});

// the endpoint our RTSP uses
app.ws('/api/stream', handler);

// this is an example html page to view the stream
app.get('/', (req, res) =>
  res.send(`
  <h1>Player rtsp</h1>
  <div style="border-style: double; width: 260px; height: 160px">
      <canvas id='canvas'></canvas>
  </div>

  <script src='${scriptUrl}'></script>
  <script>
    loadPlayer({
      url: 'ws://' + location.host + '/api/stream',
      canvas: document.getElementById('canvas')
    });
  </script>
`),
);

app.listen(2000);

CristianoSword avatar Sep 01 '22 19:09 CristianoSword

this problem was a codec h265

CristianoSword avatar Sep 05 '22 18:09 CristianoSword