Skip to content

Commit

Permalink
Reworked argument list
Browse files Browse the repository at this point in the history
  • Loading branch information
agsh committed Jun 18, 2020
1 parent 8f3d25a commit ac6b17b
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions lib/rtsp-ffmpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const spawn = require('child_process').spawn
/**
* Stream constructor
* @param {object} options
* @param {string} options.input Stream uri, for example rtsp://r3---sn-5hn7su76.c.youtube.com/CiILENy73wIaGQnup-1SztVOYBMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp
* @param {string} options.input Stream uri, for example rtsp://freja.hiof.no:1935/rtplive/definst/hessdalen03.stream
* @param {number|string} [options.rate] Framerate
* @param {string} [options.resolution] Resolution in WxH format
* @param {string|number} [options.quality] JPEG quality
Expand Down Expand Up @@ -67,18 +67,19 @@ function observer(changes) {

FFMpeg.prototype._args = function() {
return this.arguments.concat([
'-loglevel', 'quiet'
, '-i', this.input
, '-r', this.rate.toString()]
, this.quality ? ['-q:v', this.quality.toString()] : [],
'-loglevel', 'quiet',
'-i', this.input,
'-r', this.rate.toString()
],
this.quality ? ['-q:v', this.quality.toString()] : [],
this.resolution ? ['-s', this.resolution] : [],
[
//, '-vf', 'fps=25'
//, '-b:v', '32k'
'-f', 'image2'
, '-update', '1'
, '-'
]
, this.resolution ? ['-s', this.resolution] : []);
// '-vf', 'fps=25',
// '-b:v', '32k',
'-f', 'image2',
'-update', '1',
'-'
]);
};

/**
Expand Down

0 comments on commit ac6b17b

Please sign in to comment.