Skip to content

Commit 6b6fa11

Browse files
author
Sam Stenvall
committed
add a source option to disable realtime streaming (closes #38)
1 parent b436cc3 commit 6b6fa11

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ The file contains an array of JSON objects with the following definition:
4747
* `source`: the source URL
4848
* `avconvOptions`: (optional) special avconv parameters for this source. This is an object containing two arrays,
4949
`input`and `output`.
50+
* `realtime`: (optional) whether to add the `-re` input flag to the input options. Normally this is what you want, but
51+
some sources may not work correctly without disabling this. Defaults to `true`.
5052
* `prescript`: (optional) script to run before transcoding starts. Useful if you need to bring up temporary VPN
5153
interfaces etc. Four arguments are passed to the script; the source URL, the relative stream URL, the provider name
5254
and the channel name.

Diff for: libs/options.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ var getAvconvOptions = function(source) {
1414
* @returns array
1515
*/
1616
var getInputAvconvOptions = function(source) {
17-
var options = [
18-
'-re'
19-
];
17+
var options = [];
18+
19+
// Optionally disable realtime streaming
20+
if (source.realtime !== false) {
21+
options = [
22+
'-re'
23+
];
24+
}
2025

2126
if (source.avconvOptions !== undefined && source.avconvOptions.input !== undefined)
2227
options = options.concat(source.avconvOptions.input);

0 commit comments

Comments
 (0)