winlin

add ingest config section of full.conf

@@ -90,6 +90,40 @@ http_stream { @@ -90,6 +90,40 @@ http_stream {
90 vhost __defaultVhost__ { 90 vhost __defaultVhost__ {
91 } 91 }
92 92
  93 +# vhost for ingest
  94 +vhost ingest.srs.com {
  95 + # ingest file/stream/device then push to SRS over RTMP.
  96 + ingest {
  97 + # whether enable ingest features
  98 + # default: off
  99 + enable on;
  100 + # input file/stream/device, can be multiple input.
  101 + input {
  102 + # the type of input.
  103 + # can be file/stream/device, that is,
  104 + # file: ingest file specifies by url.
  105 + # stream: ingest stream specifeis by url.
  106 + # devide: not support yet.
  107 + type file;
  108 + # the url of file/stream.
  109 + url ./doc/source.200kbps.768x320.flv;
  110 + }
  111 + # the ffmpeg
  112 + ffmpeg ./objs/ffmpeg/bin/ffmpeg;
  113 + # the transcode engine, @see all.transcode.srs.com
  114 + # @remark, the output is specified following.
  115 + engine {
  116 + # @see enabled of transcode engine.
  117 + # default: off.
  118 + enable off;
  119 + # output stream. variables:
  120 + # [vhost] current vhost which start the ingest.
  121 + # [port] system RTMP stream port.
  122 + output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
  123 + }
  124 + }
  125 +}
  126 +
93 # vhost for http 127 # vhost for http
94 vhost http.srs.com { 128 vhost http.srs.com {
95 # http vhost specified config 129 # http vhost specified config
@@ -151,7 +185,7 @@ vhost bandcheck.srs.com { @@ -151,7 +185,7 @@ vhost bandcheck.srs.com {
151 } 185 }
152 186
153 # set the chunk size of vhost. 187 # set the chunk size of vhost.
154 -vhost chunksize.vhost.com { 188 +vhost chunksize.srs.com {
155 # the default chunk size is 128, max is 65536, 189 # the default chunk size is 128, max is 65536,
156 # some client does not support chunk size change, 190 # some client does not support chunk size change,
157 # vhost chunk size will override the global value. 191 # vhost chunk size will override the global value.
@@ -160,7 +194,7 @@ vhost chunksize.vhost.com { @@ -160,7 +194,7 @@ vhost chunksize.vhost.com {
160 } 194 }
161 195
162 # the http hook callback vhost, srs will invoke the hooks for specified events. 196 # the http hook callback vhost, srs will invoke the hooks for specified events.
163 -vhost hooks.callback.vhost.com { 197 +vhost hooks.callback.srs.com {
164 http_hooks { 198 http_hooks {
165 # whether the http hooks enalbe. 199 # whether the http hooks enalbe.
166 # default off. 200 # default off.
@@ -252,7 +286,7 @@ vhost hooks.callback.vhost.com { @@ -252,7 +286,7 @@ vhost hooks.callback.vhost.com {
252 } 286 }
253 287
254 # the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction 288 # the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction
255 -vhost mirror.transcode.vhost.com { 289 +vhost mirror.transcode.srs.com {
256 transcode { 290 transcode {
257 enabled on; 291 enabled on;
258 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 292 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -282,7 +316,7 @@ vhost mirror.transcode.vhost.com { @@ -282,7 +316,7 @@ vhost mirror.transcode.vhost.com {
282 } 316 }
283 } 317 }
284 # the drawtext filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#drawtext-1 318 # the drawtext filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#drawtext-1
285 -vhost drawtext.transcode.vhost.com { 319 +vhost drawtext.transcode.srs.com {
286 transcode { 320 transcode {
287 enabled on; 321 enabled on;
288 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 322 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -312,7 +346,7 @@ vhost drawtext.transcode.vhost.com { @@ -312,7 +346,7 @@ vhost drawtext.transcode.vhost.com {
312 } 346 }
313 } 347 }
314 # the crop filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop 348 # the crop filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#crop
315 -vhost crop.transcode.vhost.com { 349 +vhost crop.transcode.srs.com {
316 transcode { 350 transcode {
317 enabled on; 351 enabled on;
318 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 352 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -342,7 +376,7 @@ vhost crop.transcode.vhost.com { @@ -342,7 +376,7 @@ vhost crop.transcode.vhost.com {
342 } 376 }
343 } 377 }
344 # the logo filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#overlay 378 # the logo filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#overlay
345 -vhost logo.transcode.vhost.com { 379 +vhost logo.transcode.srs.com {
346 transcode { 380 transcode {
347 enabled on; 381 enabled on;
348 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 382 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -375,7 +409,7 @@ vhost logo.transcode.vhost.com { @@ -375,7 +409,7 @@ vhost logo.transcode.vhost.com {
375 # audio transcode only. 409 # audio transcode only.
376 # for example, FMLE publish audio codec in mp3, and donot support HLS output, 410 # for example, FMLE publish audio codec in mp3, and donot support HLS output,
377 # we can transcode the audio to aac and copy video to the new stream with HLS. 411 # we can transcode the audio to aac and copy video to the new stream with HLS.
378 -vhost audio.transcode.vhost.com { 412 +vhost audio.transcode.srs.com {
379 transcode { 413 transcode {
380 enabled on; 414 enabled on;
381 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 415 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -394,7 +428,7 @@ vhost audio.transcode.vhost.com { @@ -394,7 +428,7 @@ vhost audio.transcode.vhost.com {
394 } 428 }
395 # disable video, transcode/copy audio. 429 # disable video, transcode/copy audio.
396 # for example, publish pure audio stream. 430 # for example, publish pure audio stream.
397 -vhost vn.transcode.vhost.com { 431 +vhost vn.transcode.srs.com {
398 transcode { 432 transcode {
399 enabled on; 433 enabled on;
400 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 434 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -413,7 +447,7 @@ vhost vn.transcode.vhost.com { @@ -413,7 +447,7 @@ vhost vn.transcode.vhost.com {
413 } 447 }
414 # ffmpeg-copy(forward implements by ffmpeg). 448 # ffmpeg-copy(forward implements by ffmpeg).
415 # copy the video and audio to a new stream. 449 # copy the video and audio to a new stream.
416 -vhost copy.transcode.vhost.com { 450 +vhost copy.transcode.srs.com {
417 transcode { 451 transcode {
418 enabled on; 452 enabled on;
419 ffmpeg ./objs/ffmpeg/bin/ffmpeg; 453 ffmpeg ./objs/ffmpeg/bin/ffmpeg;
@@ -426,7 +460,7 @@ vhost copy.transcode.vhost.com { @@ -426,7 +460,7 @@ vhost copy.transcode.vhost.com {
426 } 460 }
427 } 461 }
428 # transcode all app and stream of vhost 462 # transcode all app and stream of vhost
429 -vhost all.transcode.vhost.com { 463 +vhost all.transcode.srs.com {
430 # the streaming transcode configs. 464 # the streaming transcode configs.
431 transcode { 465 transcode {
432 # whether the transcode enabled. 466 # whether the transcode enabled.
@@ -602,7 +636,7 @@ vhost all.transcode.vhost.com { @@ -602,7 +636,7 @@ vhost all.transcode.vhost.com {
602 } 636 }
603 } 637 }
604 # transcode all stream using the empty ffmpeg demo, donothing. 638 # transcode all stream using the empty ffmpeg demo, donothing.
605 -vhost ffempty.transcode.vhost.com { 639 +vhost ffempty.transcode.srs.com {
606 transcode { 640 transcode {
607 enabled on; 641 enabled on;
608 ffmpeg ./objs/research/ffempty; 642 ffmpeg ./objs/research/ffempty;
@@ -629,7 +663,7 @@ vhost ffempty.transcode.vhost.com { @@ -629,7 +663,7 @@ vhost ffempty.transcode.vhost.com {
629 } 663 }
630 } 664 }
631 # transcode all app and stream of app 665 # transcode all app and stream of app
632 -vhost app.transcode.vhost.com { 666 +vhost app.transcode.srs.com {
633 # the streaming transcode configs. 667 # the streaming transcode configs.
634 # if app specified, transcode all streams of app. 668 # if app specified, transcode all streams of app.
635 transcode live { 669 transcode live {
@@ -641,7 +675,7 @@ vhost app.transcode.vhost.com { @@ -641,7 +675,7 @@ vhost app.transcode.vhost.com {
641 } 675 }
642 } 676 }
643 # transcode specified stream. 677 # transcode specified stream.
644 -vhost stream.transcode.vhost.com { 678 +vhost stream.transcode.srs.com {
645 # the streaming transcode configs. 679 # the streaming transcode configs.
646 # if stream specified, transcode the matched stream. 680 # if stream specified, transcode the matched stream.
647 transcode live/livestream { 681 transcode live/livestream {
@@ -654,31 +688,31 @@ vhost stream.transcode.vhost.com { @@ -654,31 +688,31 @@ vhost stream.transcode.vhost.com {
654 } 688 }
655 689
656 # the vhost which forward publish streams. 690 # the vhost which forward publish streams.
657 -vhost same.vhost.forward.vhost.com { 691 +vhost same.vhost.forward.srs.com {
658 # forward all publish stream to the specified server. 692 # forward all publish stream to the specified server.
659 # this used to split/forward the current stream for cluster active-standby, 693 # this used to split/forward the current stream for cluster active-standby,
660 # active-active for cdn to build high available fault tolerance system. 694 # active-active for cdn to build high available fault tolerance system.
661 # format: {ip}:{port} {ip_N}:{port_N} 695 # format: {ip}:{port} {ip_N}:{port_N}
662 - # or specify the vhost by params, @see: change.vhost.forward.vhost.com 696 + # or specify the vhost by params, @see: change.vhost.forward.srs.com
663 # if vhost not specified, use the request vhost instead. 697 # if vhost not specified, use the request vhost instead.
664 forward 127.0.0.1:1936 127.0.0.1:1937; 698 forward 127.0.0.1:1936 127.0.0.1:1937;
665 } 699 }
666 # TODO: FIXME: change the forward schema with vhost. 700 # TODO: FIXME: change the forward schema with vhost.
667 # [plan] the vhost which forward publish streams to other vhosts. 701 # [plan] the vhost which forward publish streams to other vhosts.
668 -vhost change.vhost.forward.vhost.com { 702 +vhost change.vhost.forward.srs.com {
669 forward 127.0.0.1:1936 127.0.0.1:1937 { 703 forward 127.0.0.1:1936 127.0.0.1:1937 {
670 # specify the vhost to override the vhost in client request. 704 # specify the vhost to override the vhost in client request.
671 - vhost forward2.vhost.com; 705 + vhost forward2.srs.com;
672 # specify the refer(pageUrl) to override the refer in client request. 706 # specify the refer(pageUrl) to override the refer in client request.
673 refer http://srs/index.html; 707 refer http://srs/index.html;
674 } 708 }
675 forward 127.0.0.1:1938 { 709 forward 127.0.0.1:1938 {
676 - vhost forward3.vhost.com; 710 + vhost forward3.srs.com;
677 } 711 }
678 } 712 }
679 713
680 # the vhost disabled. 714 # the vhost disabled.
681 -vhost removed.vhost.com { 715 +vhost removed.srs.com {
682 # whether the vhost is enabled. 716 # whether the vhost is enabled.
683 # if off, all request access denied. 717 # if off, all request access denied.
684 # default: on 718 # default: on
@@ -686,7 +720,7 @@ vhost removed.vhost.com { @@ -686,7 +720,7 @@ vhost removed.vhost.com {
686 } 720 }
687 721
688 # the vhost with hls specified. 722 # the vhost with hls specified.
689 -vhost with-hls.vhost.com { 723 +vhost with-hls.srs.com {
690 hls { 724 hls {
691 # whether the hls is enabled. 725 # whether the hls is enabled.
692 # if off, donot write hls(ts and m3u8) when publish. 726 # if off, donot write hls(ts and m3u8) when publish.
@@ -713,7 +747,7 @@ vhost with-hls.vhost.com { @@ -713,7 +747,7 @@ vhost with-hls.vhost.com {
713 } 747 }
714 } 748 }
715 # the vhost with hls disabled. 749 # the vhost with hls disabled.
716 -vhost no-hls.vhost.com { 750 +vhost no-hls.srs.com {
717 hls { 751 hls {
718 # whether the hls is enabled. 752 # whether the hls is enabled.
719 # if off, donot write hls(ts and m3u8) when publish. 753 # if off, donot write hls(ts and m3u8) when publish.