Advertisement
Guest User

Untitled

a guest
Nov 30th, 2010
2,440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.29 KB | None | 0 0
  1. -- Start of the configuration. This is the only node in the config file.
  2. -- The rest of them are sub-nodes
  3. configuration=
  4. {
  5.     -- if true, the server will run as a daemon.
  6.     -- NOTE: all console appenders will be ignored if this is a daemon
  7.     daemon=false,
  8.     -- the OS's path separator. Used in composing paths
  9.     pathSeparator="/",
  10.     -- this is the async DNS resolver. This is a "clinet" connection
  11.     -- to the server.
  12.     dnsResolver=
  13.     {
  14.         -- the DNS resolver will connect to ip:port.
  15.         -- Whe a request of resolving a domain is made, instead of
  16.         -- using gethostbyname, we will pass that request to ip:port
  17.         -- This way, the request is async. Of course, it can be looped back
  18.         ip="127.0.0.1",
  19.         port=9311,
  20.         acceptors =
  21.         {
  22.             {
  23.                 ip="0.0.0.0",
  24.                 port=9311,
  25.                 protocol="inboundDns"
  26.             }, 
  27.         }
  28.     },
  29.     -- this is the place where all the logging facilities are setted up
  30.     -- you can add/remove any number of locations
  31.     logAppenders=
  32.     {
  33.         {
  34.             -- name of the appender. Not too important, but is mandatory
  35.             name="console appender",
  36.             -- type of the appender. We can have the following values:
  37.             -- console, coloredConsole and file
  38.             -- NOTE: console appenders will be ignored if we run the server
  39.             -- as a daemon
  40.             type="coloredConsole",
  41.             -- the level of logging. 6 is the FINEST message, 0 is FATAL message.
  42.             -- The appender will "catch" all the messages below or equal to this level
  43.             -- bigger the level, more messages are recorded
  44.             level=6
  45.         },
  46.         {
  47.             name="file appender",
  48.             type="file",
  49.             level=6,
  50.             -- the file where the log messages are going to land
  51.             fileName="/tmp/rtmpserver.log"
  52.         }
  53.     },
  54.    
  55.     -- this node holds all the RTMP applications
  56.     applications=
  57.     {
  58.         -- this is the root directory of all applications
  59.         -- usually this is relative to the binary execuable
  60.         rootDirectory="applications",
  61.        
  62.        
  63.         --this is where the applications array starts
  64.         {
  65.             -- The name of the application. It is mandatory and must be unique
  66.             name="appselector",
  67.             -- Short description of the application. Optional
  68.             description="Application for selecting the rest of the applications",
  69.            
  70.             -- The type of the application. Possible values are:
  71.             -- dynamiclinklibrary - the application is a shared library
  72.             protocol="dynamiclinklibrary",
  73.             -- the complete path to the library. This is optional. If not provided,
  74.             -- the server will try to load the library from here
  75.             -- <rootDirectory>/<name>/lib<name>.{so|dll|dylib}
  76.             -- library="/some/path/to/some/shared/library.so"
  77.            
  78.             -- Tells the server to validate the clien's handshake before going further.
  79.             -- It is optional, defaulted to true
  80.             validateHandshake=true,
  81.             -- this is the folder from where the current application gets it's content.
  82.             -- It is optional. If not specified, it will be defaulted to:
  83.             -- <rootDirectory>/<name>/mediaFolder
  84.             -- mediaFolder="/some/directory/where/media/files/are/stored"
  85.             -- the application will also be known by that names. It is optional
  86.             --aliases=
  87.             --{
  88.             --  "simpleLive",
  89.             --  "vod",
  90.             --  "live",
  91.             --},
  92.             -- This flag designates the default application. The default application
  93.             -- is responsable of analyzing the "connect" request and distribute
  94.             -- the future connection to the correct application.
  95.             default=true,
  96.             acceptors =
  97.             {
  98.                 {
  99.                     ip="0.0.0.0",
  100.                     port=1935,
  101.                     protocol="inboundRtmp"
  102.                 },
  103.                 {
  104.                     ip="0.0.0.0",
  105.                     port=8081,
  106.                     protocol="inboundRtmps",
  107.                     sslKey="server.key",
  108.                     sslCert="server.crt"
  109.                 },
  110.                 {
  111.                     ip="0.0.0.0",
  112.                     port=8080,
  113.                     protocol="inboundRtmpt"
  114.                 },
  115.             }
  116.         },
  117.         {
  118.             description="FLV Playback Sample",
  119.             name="flvplayback",
  120.             protocol="dynamiclinklibrary",
  121.             aliases=
  122.             {
  123.                 "simpleLive",
  124.                 "vod",
  125.                 "live",
  126.                 "WeeklyQuest",
  127.                 "SOSample",
  128.                 "oflaDemo",
  129.             },
  130.             acceptors =
  131.             {
  132.                 {
  133.                     ip="0.0.0.0",
  134.                     port=6666,
  135.                     protocol="inboundLiveFlv",
  136.                     waitForMetadata=true,
  137.                 },
  138.                 {
  139.                     ip="0.0.0.0",
  140.                     port=9999,
  141.                     protocol="inboundTcpTs"
  142.                 },
  143.                                 {
  144.                     ip="0.0.0.0",
  145.                     port=10000,
  146.                     protocol="inboundUdpTs"
  147.                 },
  148.                 --[[{
  149.                     ip="0.0.0.0",
  150.                     port=554,
  151.                     protocol="inboundRtsp"
  152.                 },]]--
  153.             },
  154.             externalStreams =
  155.             {
  156.                 --[[{
  157.                     uri="rtsp://0.0.0.0:2323/test.sdp",
  158.                     localStreamName="stream-1-udp"
  159.                 },
  160.                 {
  161.                     uri="rtsp://stream01.qt.slamtv.true.nl/slamtv.sdp",
  162.                     localStreamName="stream0-udp"
  163.                 },
  164.                 {
  165.                     uri="rtsp://stream01.qt.slamtv.true.nl/slamtv.sdp",
  166.                     localStreamName="stream0-tcp",
  167.                     forceTcp=true
  168.                 },
  169.                 {
  170.                     uri="rtmp://10.0.1.15/vod/mp4:test_mp4",
  171.                     localStreamName="stream1"
  172.                 },
  173.                 {
  174.                     uri="rtmp://10.0.1.15/vod/test_flv",
  175.                     localStreamName="stream2"
  176.                 },
  177.                 {
  178.                     uri="rtsp://media-us-2.soundreach.net/slcn_lifestyle.sdp",
  179.                     localStreamName="stream3",
  180.                     forceTcp=true
  181.                 },
  182.                 {
  183.                     uri="rtsp://82.177.67.61/axis-media/media.amp",
  184.                     localStreamName="stream4",
  185.                     forceTcp=false
  186.                 },
  187.                 {
  188.                     uri="http://v13.nonxt6.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dXSlFSVl9FSkNNN19JTFpF&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1285178400&key=yt1&signature=548764ECB414E3CA08BDD414F4B633853F9051AC.D8FFF913C9B3BF1C339BD1A60A77C5D1790775EE&factor=1.25&id=bcdad173a3ba8daa&redirect_counter=1",
  189.                     localStreamName="stream5",
  190.                 }
  191.                 {
  192.                     uri="rtmp://edge01.fms.dutchview.nl/botr/bunny",
  193.                     localStreamName="stream6",
  194.                     emulateUserAgent="MAC 10,1,82,76",
  195.                 }]]--
  196.             },
  197.             validateHandshake=true,
  198.             keyframeSeek=true,
  199.             seekGranularity=1.5, --in seconds, between 0.1 and 600
  200.             clientSideBuffer=12, --in seconds, between 5 and 30
  201.             --generateMetaFiles=true, --this will generate seek/meta files on application startup
  202.             --authentication=
  203.             --{
  204.             --  type="adobe",
  205.             --  encoderAgents=
  206.             --  {
  207.             --      "FMLE/3.0 (compatible; FMSc/1.0)",
  208.             --      "my 3rd party encoder",
  209.             --      "some other encoder",
  210.             --  }
  211.             --  --usersFile="users.lua",
  212.             --}
  213.         },
  214.         {
  215.             name="samplefactory",
  216.             description="asdsadasdsa",
  217.             protocol="dynamiclinklibrary",
  218.             aliases=
  219.             {
  220.                 "httpOutboundTest"
  221.             },
  222.             acceptors =
  223.             {
  224.                 {
  225.                     ip="0.0.0.0",
  226.                     port=8989,
  227.                     protocol="inboundHTTPDBAccess"
  228.                 }
  229.             }
  230.             --validateHandshake=true,
  231.             --default=true,
  232.         },
  233.         {
  234.             name="vptests",
  235.             description="Variant protocol tests",
  236.             protocol="dynamiclinklibrary",
  237.             aliases=
  238.             {
  239.                 "vptests_alias1",
  240.                 "vptests_alias2",
  241.                 "vptests_alias3",
  242.             },
  243.             acceptors =
  244.             {
  245.                 {
  246.                     ip="0.0.0.0",
  247.                     port=1111,
  248.                     protocol="inboundHttpXmlVariant"
  249.                 }
  250.             }
  251.             --validateHandshake=true,
  252.             --default=true,
  253.         },
  254.         {
  255.             name="admin",
  256.             description="Application for administering",
  257.             protocol="dynamiclinklibrary",
  258.             aliases=
  259.             {
  260.                 "admin_alias1",
  261.                 "admin_alias2",
  262.                 "admin_alias3",
  263.             },
  264.             --validateHandshake=true,
  265.             --default=true,
  266.         },
  267.         {
  268.             name="proxypublish",
  269.             description="Application for forwarding streams to another RTMP server",
  270.             protocol="dynamiclinklibrary",
  271.             acceptors =
  272.             {
  273.                 {  
  274.                     ip="0.0.0.0",
  275.                     port=6665,
  276.                     protocol="inboundLiveFlv"
  277.                 },
  278.             },
  279.             abortOnConnectError=true,
  280.             targetServers =
  281.             {
  282.                 --[[{
  283.                     targetUri="rtmp://x.xxxxxxx.fme.ustream.tv/ustreamVideo/xxxxxxx",
  284.                     targetStreamName="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  285.                     localStreamName="gigi",
  286.                     emulateUserAgent="FMLE/3.0 (compatible; FMSc/1.0 http://www.rtmpd.com)"
  287.                 }]]--,
  288.                 {
  289.                     targetUri="rtmp://localhost/vod",
  290.                     targetStreamType="record", -- (live, record or append)
  291.                     emulateUserAgent="My user agent"
  292.                 },
  293.             },
  294.             --[[externalStreams =
  295.             {
  296.                 {
  297.                     uri="rtsp://82.177.67.61/axis-media/media.amp",
  298.                     localStreamName="stream4",
  299.                     forceTcp=false
  300.                 },
  301.                 {
  302.                     uri="rtmp://edge01.fms.dutchview.nl/botr/bunny",
  303.                     localStreamName="stream1"
  304.                 },
  305.             },]]--
  306.             --validateHandshake=true,
  307.             --default=true,
  308.         },
  309.         {
  310.             name="stresstest",
  311.             description="Application for stressing a streaming server",
  312.             protocol="dynamiclinklibrary",
  313.             targetServer="localhost",
  314.             targetApp="vod",
  315.             active=false,
  316.             --[[streams =
  317.             {
  318.                 "lg00","lg01","lg02","lg03","lg04","lg05","lg06","lg07","lg08",
  319.                 "lg09","lg10","lg11","lg12","lg13","lg14","lg15","lg16","lg17",
  320.                 "lg18","lg19","lg20","lg21","lg22","lg23","lg24","lg25","lg26",
  321.                 "lg27","lg28","lg29","lg30","lg31","lg32","lg33","lg34","lg35",
  322.                 "lg36","lg37","lg38","lg39","lg40","lg41","lg42","lg43","lg44",
  323.                 "lg45","lg46","lg47","lg48","lg49"
  324.             },]]--
  325.             streams =
  326.             {
  327.                 "mp4:lg.mp4"
  328.             },
  329.             numberOfConnections=10,
  330.             randomAccessStreams=false
  331.         },
  332.         {
  333.             name="applestreamingclient",
  334.             description="Apple Streaming Client",
  335.             protocol="dynamiclinklibrary",
  336.             --[[acceptors =
  337.             {
  338.                 {
  339.                     ip="0.0.0.0",
  340.                     port=5544,
  341.                     protocol="inboundRtsp"
  342.                 }
  343.             },]]--
  344.             aliases=
  345.             {
  346.                 "asc",
  347.             },
  348.             --validateHandshake=true,
  349.             --default=true,
  350.         },
  351.         --#INSERTION_MARKER# DO NOT REMOVE THIS. USED BY appscaffold SCRIPT.
  352.     }
  353. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement