File tree 8 files changed +17
-17
lines changed
8 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const createFFTask = () => {
29
29
log : true ,
30
30
preset : 'veryfast' ,
31
31
vprofile : 'baseline' ,
32
- pushLive : true ,
32
+ upStreaming : true ,
33
33
audio,
34
34
} ) ;
35
35
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class Conf {
28
28
this . copyByDefaultVal ( conf , 'vprofile' , 'main' ) ;
29
29
this . copyByDefaultVal ( conf , 'debug' , false ) ;
30
30
this . copyByDefaultVal ( conf , 'audioLoop' , true ) ;
31
- this . copyByDefaultVal ( conf , 'pushLive ' , false ) ;
31
+ this . copyByDefaultVal ( conf , 'upStreaming ' , false ) ;
32
32
this . copyByDefaultVal ( conf , 'cacheFormat' , 'mp4' ) ;
33
33
this . copyByDefaultVal ( conf , 'hasTransition' , false ) ;
34
34
this . copyByDefaultVal ( conf , 'defaultOutputOptions' , true ) ;
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ class Renderer extends FFBase {
35
35
start ( ) {
36
36
const { creator } = this ;
37
37
const log = creator . getConf ( 'log' ) ;
38
- const pushLive = creator . getConf ( 'pushLive ' ) ;
38
+ const upStreaming = creator . getConf ( 'upStreaming ' ) ;
39
39
40
40
Perf . setEnabled ( log ) ;
41
41
Perf . start ( ) ;
42
42
43
43
const { scenes } = creator ;
44
- if ( ScenesUtil . isSingle ( creator ) || pushLive ) {
44
+ if ( ScenesUtil . isSingle ( creator ) || upStreaming ) {
45
45
const scene = scenes [ 0 ] ;
46
46
scene . addAudio ( ) ;
47
47
this . singleStart ( scene ) ;
Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ class Synthesis extends FFBase {
40
40
*/
41
41
start ( ) {
42
42
const { creator, conf } = this ;
43
- const pushLive = conf . getVal ( 'pushLive ' ) ;
43
+ const upStreaming = conf . getVal ( 'upStreaming ' ) ;
44
44
45
- if ( pushLive ) {
45
+ if ( upStreaming ) {
46
46
this . liveOutput ( ) ;
47
47
} else if ( ScenesUtil . isSingle ( creator ) ) {
48
48
this . mvOutput ( ) ;
Original file line number Diff line number Diff line change @@ -169,10 +169,10 @@ class FFCreator extends FFCon {
169
169
* @public
170
170
*/
171
171
generateOutput ( ) {
172
- const pushLive = this . getConf ( 'pushLive ' ) ;
172
+ const upStreaming = this . getConf ( 'upStreaming ' ) ;
173
173
let outputDir = this . getConf ( 'outputDir' ) ;
174
174
175
- if ( this . inCenter && outputDir && ! pushLive ) {
175
+ if ( this . inCenter && outputDir && ! upStreaming ) {
176
176
outputDir = outputDir . replace ( / \/ $ / , '' ) ;
177
177
const output = `${ outputDir } /${ Utils . uid ( ) } .mp4` ;
178
178
this . setConf ( 'output' , output ) ;
Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ class FFScene extends FFCon {
109
109
createNewCommand ( ) {
110
110
const conf = this . rootConf ( ) ;
111
111
const threads = conf . getVal ( 'threads' ) ;
112
- const pushLive = conf . getVal ( 'pushLive ' ) ;
112
+ const upStreaming = conf . getVal ( 'upStreaming ' ) ;
113
113
const command = FFmpegUtil . createCommand ( { threads } ) ;
114
- if ( ! pushLive ) {
114
+ if ( ! upStreaming ) {
115
115
command . setDuration ( this . duration ) ;
116
116
}
117
117
@@ -138,9 +138,9 @@ class FFScene extends FFCon {
138
138
139
139
addCommandOptions ( command ) {
140
140
const conf = this . rootConf ( ) ;
141
- const pushLive = conf . getVal ( 'pushLive ' ) ;
141
+ const upStreaming = conf . getVal ( 'upStreaming ' ) ;
142
142
143
- if ( pushLive ) {
143
+ if ( upStreaming ) {
144
144
FFmpegUtil . addDefaultOptions ( { command, conf, audio : true } ) ;
145
145
} else {
146
146
FFmpegUtil . addDefaultOptions ( { command, conf, audio : false } ) ;
@@ -157,9 +157,9 @@ class FFScene extends FFCon {
157
157
let filepath ;
158
158
const conf = this . rootConf ( ) ;
159
159
const output = conf . getVal ( 'output' ) ;
160
- const pushLive = conf . getVal ( 'pushLive ' ) ;
160
+ const upStreaming = conf . getVal ( 'upStreaming ' ) ;
161
161
162
- if ( pushLive ) {
162
+ if ( upStreaming ) {
163
163
filepath = output ;
164
164
command . outputOptions ( [ '-f' , 'flv' ] ) ;
165
165
} else {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ const FFmpegUtil = {
77
77
const crf = conf . getVal ( 'crf' ) ;
78
78
const preset = conf . getVal ( 'preset' ) ;
79
79
const vprofile = conf . getVal ( 'vprofile' ) ;
80
- const pushLive = conf . getVal ( 'pushLive ' ) ;
80
+ const upStreaming = conf . getVal ( 'upStreaming ' ) ;
81
81
82
82
let outputOptions = [ ]
83
83
//---- misc ----
@@ -118,7 +118,7 @@ const FFmpegUtil = {
118
118
}
119
119
120
120
//---- live stream ----
121
- if ( ! pushLive ) {
121
+ if ( ! upStreaming ) {
122
122
outputOptions = outputOptions . concat ( [ '-map' , '0' ] ) ;
123
123
}
124
124
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ffcreatorlite" ,
3
- "version" : " 2.3.5 " ,
3
+ "version" : " 2.3.6 " ,
4
4
"description" : " FFCreatorLite is a lightweight and flexible short video production library" ,
5
5
"main" : " lib/index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments