agsh / rtsp-ffmpeg

Node.js FFMpeg wrapper for streaming RTSP into MotionJPEG
MIT License
249 stars 84 forks source link

Resolution setting does not work #33

Closed Venryx closed 4 years ago

Venryx commented 4 years ago

The resolution setting does not work currently: the setting is completed ignored.

The reason is that the code places the scaling flag (-s XXX) after the pipe flag (-), which makes it ignored:

return this.arguments.concat(
  [ <other flags> ]
  , [ <other flags> , '-']
  , this.resolution ? ['-s', this.resolution] : []
);

To fix, I simply moved the resolution flag before the pipe-flag:

return this.arguments.concat(
  [ <other flags> ]
  , this.resolution ? ['-s', this.resolution] : []
  , [ <other flags> , '-']
);
agsh commented 4 years ago

Ooops, missed that! Fixed it, please check

Venryx commented 4 years ago

Yep, that fixed it. Thanks!