|
|
@ -15,17 +15,14 @@ vhost __defaultVhost__ {
|
|
|
|
hls_path ./objs/nginx/html;
|
|
|
|
hls_path ./objs/nginx/html;
|
|
|
|
hls_fragment 5;
|
|
|
|
hls_fragment 5;
|
|
|
|
hls_window 30;
|
|
|
|
hls_window 30;
|
|
|
|
forward 127.0.0.1:1936;
|
|
|
|
#forward 127.0.0.1:1936;
|
|
|
|
transcode {
|
|
|
|
transcode {
|
|
|
|
enabled on;
|
|
|
|
enabled on;
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
#ffmpeg ./research/ffempty/ffempty;
|
|
|
|
|
|
|
|
engine ld{
|
|
|
|
engine ld{
|
|
|
|
enabled on;
|
|
|
|
enabled on;
|
|
|
|
vfilter {
|
|
|
|
vfilter {
|
|
|
|
#vf 'drawtext=text=SRS';
|
|
|
|
i ./doc/ffmpeg-min.png;
|
|
|
|
#vf 'crop=in_w-20:in_h-160:10:80';
|
|
|
|
|
|
|
|
i ./doc/ffmpeg-logo.png;
|
|
|
|
|
|
|
|
filter_complex 'overlay=10:10';
|
|
|
|
filter_complex 'overlay=10:10';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vcodec libx264;
|
|
|
|
vcodec libx264;
|
|
|
@ -43,7 +40,6 @@ vhost __defaultVhost__ {
|
|
|
|
asample_rate 44100;
|
|
|
|
asample_rate 44100;
|
|
|
|
achannels 2;
|
|
|
|
achannels 2;
|
|
|
|
aparams {
|
|
|
|
aparams {
|
|
|
|
profile:a aac_low;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_ld;
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_ld;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -72,6 +68,126 @@ vhost __defaultVhost__ {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction
|
|
|
|
|
|
|
|
vhost mirror.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine mirror{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_mirror;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# the drawtext filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#drawtext-1
|
|
|
|
|
|
|
|
vhost drawtext.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine drawtext{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'drawtext=text=SimpleRtmpServer(SRS):x=10:y=10:fontcolor=#EEEEEE:fontfile=./doc/FreeSerifBold.ttf';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_drawtext;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# the crop filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
|
|
|
|
|
|
|
|
vhost crop.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine crop{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'crop=in_w-20:in_h-160:10:80';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_crop;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# the logo filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
|
|
|
|
|
|
|
|
vhost logo.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine logo{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'crop=200:100:10:10';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_logo;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
# transcode all app and stream of vhost
|
|
|
|
# transcode all app and stream of vhost
|
|
|
|
vhost all.transcode.vhost.com {
|
|
|
|
vhost all.transcode.vhost.com {
|
|
|
|
# the streaming transcode configs.
|
|
|
|
# the streaming transcode configs.
|
|
|
@ -137,6 +253,8 @@ vhost all.transcode.vhost.com {
|
|
|
|
achannels 2;
|
|
|
|
achannels 2;
|
|
|
|
# other ffmpeg audio params
|
|
|
|
# other ffmpeg audio params
|
|
|
|
aparams {
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
# audio params, @see: http://ffmpeg.org/ffmpeg-codecs.html#Audio-Encoders
|
|
|
|
|
|
|
|
profile:a aac_low;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# output stream. variables:
|
|
|
|
# output stream. variables:
|
|
|
|
# [vhost] the input stream vhost.
|
|
|
|
# [vhost] the input stream vhost.
|
|
|
@ -207,96 +325,6 @@ vhost all.transcode.vhost.com {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction
|
|
|
|
|
|
|
|
vhost mirror.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine mirror{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_mirror;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# the logo filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
|
|
|
|
|
|
|
|
vhost crop.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine crop{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'crop=in_w-20:in_h-160:10:80';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_crop;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# the crop filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
|
|
|
|
|
|
|
|
vhost logo.transcode.vhost.com {
|
|
|
|
|
|
|
|
transcode {
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
|
|
|
|
|
|
|
engine logo{
|
|
|
|
|
|
|
|
enabled on;
|
|
|
|
|
|
|
|
vfilter {
|
|
|
|
|
|
|
|
vf 'crop=200:100:10:10';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
vcodec libx264;
|
|
|
|
|
|
|
|
vbitrate 300;
|
|
|
|
|
|
|
|
vfps 20;
|
|
|
|
|
|
|
|
vwidth 480;
|
|
|
|
|
|
|
|
vheight 320;
|
|
|
|
|
|
|
|
vthreads 2;
|
|
|
|
|
|
|
|
vprofile baseline;
|
|
|
|
|
|
|
|
vpreset superfast;
|
|
|
|
|
|
|
|
vparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
acodec libaacplus;
|
|
|
|
|
|
|
|
abitrate 30;
|
|
|
|
|
|
|
|
asample_rate 44100;
|
|
|
|
|
|
|
|
achannels 2;
|
|
|
|
|
|
|
|
aparams {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
output rtmp://[vhost]:[port]/[app]/[stream]_logo;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# transcode all stream using the empty ffmpeg demo, donothing.
|
|
|
|
# transcode all stream using the empty ffmpeg demo, donothing.
|
|
|
|
vhost ffempty.transcode.vhost.com {
|
|
|
|
vhost ffempty.transcode.vhost.com {
|
|
|
|
transcode {
|
|
|
|
transcode {
|
|
|
|