@@ -15,17 +15,14 @@ vhost __defaultVhost__ {
15
15
hls_path ./objs/nginx/html;
16
16
hls_fragment 5;
17
17
hls_window 30;
18
- forward 127.0.0.1:1936;
18
+ # forward 127.0.0.1:1936;
19
19
transcode {
20
20
enabled on;
21
21
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
22
- #ffmpeg ./research/ffempty/ffempty;
23
22
engine ld{
24
23
enabled on;
25
24
vfilter {
26
- #vf 'drawtext=text=SRS';
27
- #vf 'crop=in_w-20:in_h-160:10:80';
28
- i ./doc/ffmpeg-logo.png;
25
+ i ./doc/ffmpeg-min.png;
29
26
filter_complex 'overlay=10:10';
30
27
}
31
28
vcodec libx264;
@@ -43,7 +40,6 @@ vhost __defaultVhost__ {
43
40
asample_rate 44100;
44
41
achannels 2;
45
42
aparams {
46
- profile:a aac_low;
47
43
}
48
44
output rtmp://[vhost]:[port]/[app]/[stream]_ld;
49
45
}
@@ -72,6 +68,126 @@ vhost __defaultVhost__ {
72
68
}
73
69
}
74
70
}
71
+ # the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction
72
+ vhost mirror.transcode.vhost.com {
73
+ transcode {
74
+ enabled on;
75
+ ffmpeg ./objs/ffmpeg/bin/ffmpeg;
76
+ engine mirror{
77
+ enabled on;
78
+ vfilter {
79
+ vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
80
+ }
81
+ vcodec libx264;
82
+ vbitrate 300;
83
+ vfps 20;
84
+ vwidth 480;
85
+ vheight 320;
86
+ vthreads 2;
87
+ vprofile baseline;
88
+ vpreset superfast;
89
+ vparams {
90
+ }
91
+ acodec libaacplus;
92
+ abitrate 30;
93
+ asample_rate 44100;
94
+ achannels 2;
95
+ aparams {
96
+ }
97
+ output rtmp://[vhost]:[port]/[app]/[stream]_mirror;
98
+ }
99
+ }
100
+ }
101
+ # the drawtext filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#drawtext-1
102
+ vhost drawtext.transcode.vhost.com {
103
+ transcode {
104
+ enabled on;
105
+ ffmpeg ./objs/ffmpeg/bin/ffmpeg;
106
+ engine drawtext{
107
+ enabled on;
108
+ vfilter {
109
+ vf 'drawtext=text=SimpleRtmpServer(SRS):x=10:y=10:fontcolor=#EEEEEE:fontfile=./doc/FreeSerifBold.ttf';
110
+ }
111
+ vcodec libx264;
112
+ vbitrate 300;
113
+ vfps 20;
114
+ vwidth 480;
115
+ vheight 320;
116
+ vthreads 2;
117
+ vprofile baseline;
118
+ vpreset superfast;
119
+ vparams {
120
+ }
121
+ acodec libaacplus;
122
+ abitrate 30;
123
+ asample_rate 44100;
124
+ achannels 2;
125
+ aparams {
126
+ }
127
+ output rtmp://[vhost]:[port]/[app]/[stream]_drawtext;
128
+ }
129
+ }
130
+ }
131
+ # the crop filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
132
+ vhost crop.transcode.vhost.com {
133
+ transcode {
134
+ enabled on;
135
+ ffmpeg ./objs/ffmpeg/bin/ffmpeg;
136
+ engine crop{
137
+ enabled on;
138
+ vfilter {
139
+ vf 'crop=in_w-20:in_h-160:10:80';
140
+ }
141
+ vcodec libx264;
142
+ vbitrate 300;
143
+ vfps 20;
144
+ vwidth 480;
145
+ vheight 320;
146
+ vthreads 2;
147
+ vprofile baseline;
148
+ vpreset superfast;
149
+ vparams {
150
+ }
151
+ acodec libaacplus;
152
+ abitrate 30;
153
+ asample_rate 44100;
154
+ achannels 2;
155
+ aparams {
156
+ }
157
+ output rtmp://[vhost]:[port]/[app]/[stream]_crop;
158
+ }
159
+ }
160
+ }
161
+ # the logo filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
162
+ vhost logo.transcode.vhost.com {
163
+ transcode {
164
+ enabled on;
165
+ ffmpeg ./objs/ffmpeg/bin/ffmpeg;
166
+ engine logo{
167
+ enabled on;
168
+ vfilter {
169
+ vf 'crop=200:100:10:10';
170
+ }
171
+ vcodec libx264;
172
+ vbitrate 300;
173
+ vfps 20;
174
+ vwidth 480;
175
+ vheight 320;
176
+ vthreads 2;
177
+ vprofile baseline;
178
+ vpreset superfast;
179
+ vparams {
180
+ }
181
+ acodec libaacplus;
182
+ abitrate 30;
183
+ asample_rate 44100;
184
+ achannels 2;
185
+ aparams {
186
+ }
187
+ output rtmp://[vhost]:[port]/[app]/[stream]_logo;
188
+ }
189
+ }
190
+ }
75
191
# transcode all app and stream of vhost
76
192
vhost all.transcode.vhost.com {
77
193
# the streaming transcode configs.
@@ -137,6 +253,8 @@ vhost all.transcode.vhost.com {
137
253
achannels 2;
138
254
# other ffmpeg audio params
139
255
aparams {
256
+ # audio params, @see: http://ffmpeg.org/ffmpeg-codecs.html#Audio-Encoders
257
+ profile:a aac_low;
140
258
}
141
259
# output stream. variables:
142
260
# [vhost] the input stream vhost.
@@ -207,96 +325,6 @@ vhost all.transcode.vhost.com {
207
325
}
208
326
}
209
327
}
210
- # the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction
211
- vhost mirror.transcode.vhost.com {
212
- transcode {
213
- enabled on;
214
- ffmpeg ./objs/ffmpeg/bin/ffmpeg;
215
- engine mirror{
216
- enabled on;
217
- vfilter {
218
- vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
219
- }
220
- vcodec libx264;
221
- vbitrate 300;
222
- vfps 20;
223
- vwidth 480;
224
- vheight 320;
225
- vthreads 2;
226
- vprofile baseline;
227
- vpreset superfast;
228
- vparams {
229
- }
230
- acodec libaacplus;
231
- abitrate 30;
232
- asample_rate 44100;
233
- achannels 2;
234
- aparams {
235
- }
236
- output rtmp://[vhost]:[port]/[app]/[stream]_mirror;
237
- }
238
- }
239
- }
240
- # the logo filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
241
- vhost crop.transcode.vhost.com {
242
- transcode {
243
- enabled on;
244
- ffmpeg ./objs/ffmpeg/bin/ffmpeg;
245
- engine crop{
246
- enabled on;
247
- vfilter {
248
- vf 'crop=in_w-20:in_h-160:10:80';
249
- }
250
- vcodec libx264;
251
- vbitrate 300;
252
- vfps 20;
253
- vwidth 480;
254
- vheight 320;
255
- vthreads 2;
256
- vprofile baseline;
257
- vpreset superfast;
258
- vparams {
259
- }
260
- acodec libaacplus;
261
- abitrate 30;
262
- asample_rate 44100;
263
- achannels 2;
264
- aparams {
265
- }
266
- output rtmp://[vhost]:[port]/[app]/[stream]_crop;
267
- }
268
- }
269
- }
270
- # the crop filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
271
- vhost logo.transcode.vhost.com {
272
- transcode {
273
- enabled on;
274
- ffmpeg ./objs/ffmpeg/bin/ffmpeg;
275
- engine logo{
276
- enabled on;
277
- vfilter {
278
- vf 'crop=200:100:10:10';
279
- }
280
- vcodec libx264;
281
- vbitrate 300;
282
- vfps 20;
283
- vwidth 480;
284
- vheight 320;
285
- vthreads 2;
286
- vprofile baseline;
287
- vpreset superfast;
288
- vparams {
289
- }
290
- acodec libaacplus;
291
- abitrate 30;
292
- asample_rate 44100;
293
- achannels 2;
294
- aparams {
295
- }
296
- output rtmp://[vhost]:[port]/[app]/[stream]_logo;
297
- }
298
- }
299
- }
300
328
# transcode all stream using the empty ffmpeg demo, donothing.
301
329
vhost ffempty.transcode.vhost.com {
302
330
transcode {
0 commit comments