Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About Currupted Img #18

Open
Caraws opened this issue Aug 1, 2017 · 3 comments
Open

About Currupted Img #18

Caraws opened this issue Aug 1, 2017 · 3 comments

Comments

@Caraws
Copy link

Caraws commented Aug 1, 2017

Hi, I try to use dynamic link to change the camera screen. But the result is this

img

qq 20170801162202

this is my code

var rtsp = require('rtsp-ffmpeg');
var uri = 'rtsp://xxxx:[email protected]:554/h264/ch1/main/av_stream',
    stream = new rtsp.FFMpeg({
        input: uri,
        rate: 10,
        resolution: '640x480',
        quality: 3
    });


 io.on('connection', socket => {
  console.log('connection')
    var pipeStream = function(data) {
      socket.emit('data', new Buffer(data).toString('base64'));
    };
    stream.on('data', pipeStream);
    socket.on('URI', data => {
      console.log(data);
      uri = `rtsp://${data.userName}:${data.passWord}@${data.ip}:${data.RTSP}/h264/ch1/main/av_stream`
      stream.input = uri;
      console.log(stream.input)
      stream.restart()
    })
    socket.on('disconnect', function() {
      stream.removeListener('data', pipeStream);
    });
}) 

please tell me where am i wrong. :)

@Seikon
Copy link
Collaborator

Seikon commented Sep 5, 2017

Thre is a new version on the master branch, you can test the code for cropped images. This may be caused for quality parameter, because some cameras does not support this option and produce cropped images.

@wraysu
Copy link

wraysu commented Sep 11, 2017

Hello
I have the same problem. I have updated the newest version. But the image is still corrupted like below!
image

@Caraws
Copy link
Author

Caraws commented Nov 24, 2017

@wraysu Hi,
I still has this problem, but you can try to change video streams into sub streams, some times it's work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants