srs-archived/full.conf at master - GitHub

文章推薦指數: 80 %
投票人數:10人

SRS's a simplest, conceptual integrated, industrial-strength live streaming origin ... the http api config, export for external program to manage srs. Skiptocontent {{message}} 17media / srs-archived Public forkedfromossrs/srs Notifications Fork 4.7k Star 0 Code Pullrequests 0 Actions Projects 0 Wiki Security Insights More Code Pullrequests Actions Projects Wiki Security Insights Permalink master Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default srs-archived/trunk/conf/full.conf Gotofile Gotofile T Gotoline L Copypath Copypermalink Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository.     Cannotretrievecontributorsatthistime 1468lines(1434sloc) 59.2KB Raw Blame Editthisfile E OpeninGitHubDesktop OpenwithDesktop Viewraw Viewblame ThisfilecontainsbidirectionalUnicodetextthatmaybeinterpretedorcompileddifferentlythanwhatappearsbelow.Toreview,openthefileinaneditorthatrevealshiddenUnicodecharacters. LearnmoreaboutbidirectionalUnicodecharacters Showhiddencharacters #allconfigforsrs ############################################################################################# #RTMPsections ############################################################################################# #thertmplistenports,splitbyspace,eachlistenentryis #forexample,192.168.1.100:193510.10.10.100:1935 #wheretheipisoptional,defaultto0.0.0.0,thatis1935equalsto0.0.0.0:1935 listen1935; #thepidfile #toensureonlyoneprocesscanuseapidfile #andprovidesthecurrentrunningprocessid,forscript, #forexample,init.dscripttomanagetheserver. #default:./objs/srs.pid pid./objs/srs.pid; #thedefaultchunksizeis128,maxis65536, #someclientdoesnotsupportchunksizechange, #however,mostclientssupportsitanditcanimprove #performanceabout10%. #default:60000 chunk_size60000; #thelogsdir. #ifenabledffmpeg,eachstracodingstreamwillcreatealogfile. #/dev/nulltodisablethelog. #default:./objs ff_log_dir./objs; #thelogtank,consoleorfile. #ifconsole,printlogtoconsole. #iffile,writelogtofile.requiressrs_log_fileiflogtofile. #default:file. srs_log_tankfile; #theloglevel,foralllogtanks. #canbe:verbose,info,trace,warn,error #default:trace srs_log_leveltrace; #whensrs_log_tankisfile,specifiesthelogfile. #default:./objs/srs.log srs_log_file./objs/srs.log; #themaxconnections. #ifexceedthemaxconnections,serverwilldropthenewconnection. #default:1000 max_connections1000; #whetherstartasdaemon #@remark:donotsupportreload. #default:on daemonon; #whetheruseutc_timetogeneratethetimestruct, #ifoff,uselocaltime()togenerateit, #ifon,usegmtime()instead,whichuseUTCtime. #default:off utc_timeoff; #theworkdirforserver,tochdir(work_dir)whennotemptyor"./" #usercanconfigthisdirectorytochangethedir. #@reamrkdonotsupportreload. #default:./ work_dir./; #whetherquitwhenparentprocesschanged, #usedforsupervisormode(notdaemon),srsshouldalwaysquitwhen #supervisorprocessexited. #@remarkconflictwithdaemon,errorwhenbothdaemonandasprocessareon. #@reamrkdonotsupportreload. #default:off asprocessoff; ############################################################################################# #heartbeat/statssections ############################################################################################# #heartbeattoapiserver #@remark,theipreporttoserver,isretrievefromsystemstat, #whichneedtheconfigitemstats.network. heartbeat{ #whetherheartbeatisenalbed. #default:off enabledoff; #theintervalsecondsforheartbeat, #recommend0.3,0.6,0.9,1.2,1.5,1.8,2.1,2.4,2.7,3,...,6,9,12,.... #default:9.9 interval9.3; #whenstartup,srswillheartbeattothisapi. #@remark:mustbearestfulhttpapiurl,whereSRSwillPOSTwithfollowingdata: #{ #"device_id":"my-srs-device", #"ip":"192.168.1.100" #} #default:http://127.0.0.1:8085/api/v1/servers urlhttp://127.0.0.1:8085/api/v1/servers; #theidofdevide. device_id"my-srs-device"; #whetherreportwithsummaries #ifon,put/api/v1/summariestotherequestdata: #{ #"summaries":summariesobject. #} #@remark:optionalconfig. #default:off summariesoff; } #systemstatisticssection. #themaincyclewillretrievethesystemstat, #forexample,thecpu/mem/network/disk-iodata, #thehttpapi,forinstance,/api/v1/summarieswillshowthesedata. #@remarktheheartbeatdependsonthenetwork, #forexample,theeth0maybethedevicewhichindexis0. stats{ #theindexofdeviceip. #wemayretrievemorethanonenetworkdevice. #default:0 network0; #thedevicenametostatthediskiops. #ignorethedeviceof/proc/diskstatsifnotconfiged. disksdasdbxvdaxvdb; } ############################################################################################# #HTTPsections ############################################################################################# #apiofsrs. #thehttpapiconfig,exportforexternalprogramtomanagesrs. #usercanaccesshttpapiofsrsinbrowserdirectly,forinstance,toaccessby: #curlhttp://192.168.1.170:1985/api/v1/reload #whichwillreloadsrs,likecmdkillall-1srs,butthejscanalsoinvokethehttpapi, #wheretheclicanonlybeusedinshell/terminate. http_api{ #whetherhttpapiisenabled. #default:off enabledon; #thehttpapilistenentryis #forexample,192.168.1.100:1985 #wheretheipisoptional,defaultto0.0.0.0,thatis1985equalsto0.0.0.0:1985 #default:1985 listen1985; #whetherenablecrossdomainrequest. #default:on crossdomainon; } #embededhttpserverinsrs. #thehttpstreamingconfig,forHLS/HDS/DASH/HTTPProgressive #globalconfigforhttpstreaming,usermustconfigthehttpsectionforeachvhost. #theembedhttpserverusedtosubstitutenginxin./objs/nginx, #forexample,srsruninginarm,canprovidesRTMPandHTTPservice,onlywithsrsinstalled. #usercanaccessthehttpserverpages,generally: #curlhttp://192.168.1.170:80/srs.html #whichwillshowsrsversionandwelcometosrs. #@remark,thehttpembededstreamneedtoconfigthevhost,forinstance,the__defaultVhost__ #needtoopenthefeaturehttpofvhost. http_server{ #whetherhttpstreamingserviceisenabled. #default:off enabledon; #thehttpstreaminglistenentryis #forexample,192.168.1.100:8080 #wheretheipisoptional,defaultto0.0.0.0,thatis8080equalsto0.0.0.0:8080 #@remark,ifuselowerport,forinstance80,usermuststartsrsbyroot. #default:8080 listen8080; #thedefaultdirforhttproot. #default:./objs/nginx/html dir./objs/nginx/html; } ############################################################################################# #Streamersections ############################################################################################# #thestreamercaststreamfromotherprotocoltoSRSoverRTMP. #@seehttps://github.com/ossrs/srs/tree/develop#stream-architecture stream_caster{ #whetherstreamcasterisenabled. #default:off enabledoff; #thecastertypeofstream,thecasters: #mpegts_over_udp,MPEG-TSoverUDPcaster. #rtsp,RealTimeStreamingProtocol(RTSP). #flv,FLVoverHTTPPOST. castermpegts_over_udp; #theoutputrtmpurl. #formpegts_over_udpcaster,thetypicallyoutputurl: #rtmp://127.0.0.1/live/livestream #forrtspcaster,thetypicallyoutputurl: #rtmp://127.0.0.1/[app]/[stream] #forexample,thertspurl: #rtsp://192.168.1.173:8544/live/livestream.sdp #wherethe[app]is"live"and[stream]is"livestream",outputis: #rtmp://127.0.0.1/live/livestream outputrtmp://127.0.0.1/live/livestream; #thelistenportforstreamcaster. #formpegts_over_udpcaster,listenatudpport.forexample,8935. #forrtspcaster,listenattcpport.forexample,554. #forflvcaster,listenattcpport.forexample,8936. #TODO:supportlistenat listen8935; #forthertspcaster,thertpserverlocalportoverudp, #whichreplythertspsetuprequestmessage,theportwillbeused: #[rtp_port_min,rtp_port_max) rtp_port_min57200; rtp_port_max57300; } stream_caster{ enabledoff; castermpegts_over_udp; outputrtmp://127.0.0.1/live/livestream; listen8935; } stream_caster{ enabledoff; casterrtsp; outputrtmp://127.0.0.1/[app]/[stream]; listen554; rtp_port_min57200; rtp_port_max57300; } stream_caster{ enabledoff; casterflv; outputrtmp://127.0.0.1/[app]/[stream]; listen8936; } ############################################################################################# #RTMP/HTTPVHOSTsections ############################################################################################# #vhostlist,the__defaultVhost__isthedefaultvhost #forexample,useruseiptoaccessthestream:rtmp://192.168.1.2/live/livestream. #forwhichcannotidentifytherequiredvhost. vhost__defaultVhost__{ } #thesecuritytoallowordenyclients. vhostsecurity.srs.com{ #securityforhosttoallowordenyclients. #@seehttps://github.com/ossrs/srs/issues/211 security{ #whetherenablethesecurityforvhost. #default:off enabledon; #thesecuritylist,eachitemformatas: #allow|denypublish|playall| #forexample: #allowpublishall; #denypublishall; #allowpublish127.0.0.1; #denypublish127.0.0.1; #allowplayall; #denyplayall; #allowplay127.0.0.1; #denyplay127.0.0.1; #SRSapplythefollowingsimplestrategiesonebyone: #1.allowallifsecuritydisabled. #2.defaulttodenyallwhensecurityenabled. #3.allowifmatchesallowstrategy. #4.denyifmatchesdenystrategy. allowplayall; allowpublishall; } } #theMR(merged-read)settingforpublisher. #theMW(merged-write)settingsforplayer. vhostmrw.srs.com{ #whetherenablemindelaymodeforvhost. #forminlatencemode: #1.disablethemrforvhost. #2.usetimeoutforcondwaitforconsumerqueue. #@seehttps://github.com/ossrs/srs/issues/257 #default:off min_latencyoff; #aboutMR,readhttps://github.com/ossrs/srs/issues/241 mr{ #whetherenabletheMR(merged-read) #default:off enabledon; #thelatencyinmsforMR(merged-read), #theperformance+whenlatency+,andmemory+, #memory(buffer)=latency*kbps/8 #forexample,latency=500ms,kbps=3000kbps,eachpublishconnectionwillconsume #memory=500*3000/8=187500B=183KB #whenthereare2500publisher,thetotalmemoryofSRSatleast: #183KB*2500=446MB #thevaluerecommentis[300,2000] #default:350 latency350; } #settheMW(merged-write)latencyinms. #SRSalwayssetmwon,sowejustsetthelatencyvalue. #thelatencyofstream>=mw_latency+mr_latency #thevaluerecommentis[300,1800] #default:350 mw_latency350; } #vhostforedge,edgeandoriginisthesamevhost vhostsame.edge.srs.com{ #themodeofvhost,localorremote. #local:vhostisoriginvhost,whichprovidesstreamsource. #remote:vhostisedgevhost,whichpull/pushtoorigin. #default:local moderemote; #foredge(remotemode),usermustspecifiestheoriginserver #formatas:[:port] #@remarkusercanspecifiesmultipleoriginforerrorbackup,byspace, #forexample,192.168.1.100:1935192.168.1.101:1935192.168.1.102:1935 origin127.0.0.1:1935localhost:1935; #foredge,whetheropenthetokentraversemode, #iftokentraverseon,allconnectionsofedgewillforwardtoorigintocheck(auth), #it'sveryimportantfortheedgetodothetokenauth. #thebetterwayisusehttpcallbacktodothetokenauthbytheedge, #butifuserpreferorigincheck(auth),thetoken_traverseifbettersolution. #default:off token_traverseoff; } #vhostforedge,edgetransformvhosttofetchfromanothervhost. vhosttransform.edge.srs.com{ moderemote; origin127.0.0.1:1935; #thevhosttotransformforedge, #tofetchfromthespecifiedvhostatorigin, #ifnotspecified,usethecurrentvhostofedgeinorigin,thevariable[vhost]. #default:[vhost] vhostsame.edge.srs.com; } #vhostfordvr vhostdvr.srs.com{ #dvrRTMPstreamtofile, #starttorecordtofilewhenencoderpublish, #reapflvaccordingbyspecifieddvr_plan. dvr{ #whetherenableddvrfeatures #default:off enabledon; #thedvrplan.canbe: #sessionreapflvwhensessionend(unpublish). #segmentreapflvwhenflvdurationexceedthespecifieddvr_duration. #appendalwaysappendtoflvfile,neverreapit. #default:session dvr_plansession; #thedvroutputpath. #wesupportssomevariablestogeneratethefilename. #[vhost],thevhostofstream. #[app],theappofstream. #[stream],thestreamnameofstream. #[2006],replacethisconsttocurrentyear. #[01],replacethisconsttocurrentmonth. #[02],replacethisconsttocurrentdate. #[15],replacethisconsttocurrenthour. #[04],repleacethisconsttocurrentminute. #[05],repleacethisconsttocurrentsecond. #[999],repleacethisconsttocurrentmillisecond. #[timestamp],replacethisconsttocurrentUNIXtimestampinms. #@remarkweusegolangtimeformat"2006-01-0215:04:05.999"as"[2006]-[01]-[02]_[15].[04].[05]_[999]" #forexample,forurlrtmp://ossrs.net/live/livestreamandtime2015-01-0310:57:30.776 #1.Novariables,theruleofSRS1.0(autoadd[stream].[timestamp].flvasfilename): #dvr_path./objs/nginx/html; #=> #dvr_path./objs/nginx/html/live/livestream.1420254068776.flv; #2.Usestreamanddateasdirname,timeasfilename: #dvr_path/data/[vhost]/[app]/[stream]/[2006]/[01]/[02]/[15].[04].[05].[999].flv; #=> #dvr_path/data/ossrs.net/live/livestream/2015/01/03/10.57.30.776.flv; #3.Usestreamandyear/monthasdirname,dateandtimeasfilename: #dvr_path/data/[vhost]/[app]/[stream]/[2006]/[01]/[02]-[15].[04].[05].[999].flv; #=> #dvr_path/data/ossrs.net/live/livestream/2015/01/03-10.57.30.776.flv; #4.Usevhost/appandyear/monthasdirname,stream/date/timeasfilename: #dvr_path/data/[vhost]/[app]/[2006]/[01]/[stream]-[02]-[15].[04].[05].[999].flv; #=> #dvr_path/data/ossrs.net/live/2015/01/livestream-03-10.57.30.776.flv; #@seehttps://github.com/ossrs/srs/wiki/v2_CN_DVR#custom-path #@seehttps://github.com/ossrs/srs/wiki/v2_EN_DVR#custom-path #segment,sessionapplyit. #default:./objs/nginx/html/[app]/[stream].[timestamp].flv dvr_path./objs/nginx/html/[app]/[stream].[timestamp].flv; #thedurationfordvrfile,reapifexeed,inseconds. #segmentapplyit. #session,appendignore. #default:30 dvr_duration30; #whetherwaitkeyframetoreapsegment, #ifoff,reapsegmentwhendurationexceedthedvr_duration, #ifon,reapsegmentwhendurationexceedandgotkeyframe. #segmentapplyit. #session,appendignore. #default:on dvr_wait_keyframeon; #aboutthestreammonotonicallyincreasing: #1.videotimestampismonotonicallyincreasing, #2.audiotimestampismonotonicallyincreasing, #3.videoandaudiotimestampisinterleavedmonotonicallyincreasing. #it'sspecifiedbyRTMPspecification,@see3.ByteOrder,Alignment,andTimeFormat #however,someencodercannotprovidesthisfeature,pleasesetthistoofftoignoretimejitter. #thetimejitteralgorithm: #1.full,toensurestreamstartatzero,andensurestreammonotonicallyincreasing. #2.zero,onlyensuresttreamstartatzero,ignoretimestampjitter. #3.off,disablethetimejitteralgorithm,likeatc. #applyforalldvrplan. #default:full time_jitterfull; #on_dvr,neverconfiginhere,shouldconfiginhttp_hooks. #forthedvrhttpcallback,@seehttp_hooks.on_dvrofvhosthooks.callback.srs.com #@readhttps://github.com/ossrs/srs/wiki/v2_CN_DVR#http-callback #@readhttps://github.com/ossrs/srs/wiki/v2_EN_DVR#http-callback } } #vhostforingest vhostingest.srs.com{ #ingestfile/stream/devicethenpushtoSRSoverRTMP. #thename/idusedtoidentifytheingest,mustbeuniqueinglobal. #ingestidisusedinreloadorhttpapimanagement. ingestlivestream{ #whetherenabledingestfeatures #default:off enabledon; #inputfile/stream/device #@remarkonlysupportoneinput. input{ #thetypeofinput. #canbefile/stream/device,thatis, #file:ingestfilespecifiesbyurl. #stream:ingeststreamspecifeisbyurl. #device:notsupportyet. #default:file typefile; #theurloffile/stream. url./doc/source.200kbps.768x320.flv; } #theffmpeg ffmpeg./objs/ffmpeg/bin/ffmpeg; #thetranscodeengine,@seeall.transcode.srs.com #@remark,theoutputisspecifiedfollowing. engine{ #@seeenabledoftranscodeengine. #ifdisabledorvcodec/acodecnotspecified,usecopy. #default:off. enabledoff; #outputstream.variables: #[vhost]currentvhostwhichstarttheingest. #[port]systemRTMPstreamport. outputrtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream; } } } #vhostforhttpstaticandflvvodstreamforeachvhost. vhosthttp.static.srs.com{ #httpstaticvhostspecifiedconfig http_static{ #whetherenabledthehttpstaticserviceforvhost. #default:off enabledon; #theurltomountto, #typicalmountto[vhost]/ #thevariables: #[vhost]currentvhostforhttpserver. #@remarkthe[vhost]isoptional,usedtomountatspecifiedvhost. #@remarkthehttpof__defaultVhost__willoverridethehttp_serversection. #forexample: #mountto[vhost]/ #accessbyhttp://ossrs.net:8080/xxx.html #mountto[vhost]/hls #accessbyhttp://ossrs.net:8080/hls/xxx.html #mountto/ #accessbyhttp://ossrs.net:8080/xxx.html #orbyhttp://192.168.1.173:8080/xxx.html #mountto/hls #accessbyhttp://ossrs.net:8080/hls/xxx.html #orbyhttp://192.168.1.173:8080/hls/xxx.html #@remarktheportofhttpisspecifiedbyhttp_serversection. #default:[vhost]/ mount[vhost]/hls; #maindirofvhost, #todeliveryHTTPstreamofthisvhost. #default:./objs/nginx/html dir./objs/nginx/html/hls; } } #vhostforhttpflv/aac/mp3livestreamforeachvhost. vhosthttp.remux.srs.com{ #httpflv/mp3/aac/tsstreamvhostspecifiedconfig http_remux{ #whetherenablethehttplivestreamingserviceforvhost. #default:off enabledon; #thefastcacheforaudiostream(mp3/aac), #tocachemoreaudioandsendtoclientinatimetomakeandroid(weixin)happy. #@remarktheflv/tsstreamignoreit #@remark0todisablefastcacheforhttpaudiostream. #default:0 fast_cache30; #thestreammoutforrtmptoremuxtolivestreaming. #typicalmountto[vhost]/[app]/[stream].flv #thevariables: #[vhost]currentvhostforhttplivestream. #[app]currentappforhttplivestream. #[stream]currentstreamforhttplivestream. #@remarkthe[vhost]isoptional,usedtomountatspecifiedvhost. #theextension: #.flvmounthttpliveflvstream,usedefaultgopcache. #.tsmounthttplivetsstream,usedefaultgopcache. #.mp3mounthttplivemp3stream,ignorevideoandaudiomp3codecrequired. #.aacmounthttpliveaacstream,ignorevideoandaudioaaccodecrequired. #forexample: #mountto[vhost]/[app]/[stream].flv #accessbyhttp://ossrs.net:8080/live/livestream.flv #mountto/[app]/[stream].flv #accessbyhttp://ossrs.net:8080/live/livestream.flv #orbyhttp://192.168.1.173:8080/live/livestream.flv #mountto[vhost]/[app]/[stream].mp3 #accessbyhttp://ossrs.net:8080/live/livestream.mp3 #mountto[vhost]/[app]/[stream].aac #accessbyhttp://ossrs.net:8080/live/livestream.aac #mountto[vhost]/[app]/[stream].ts #accessbyhttp://ossrs.net:8080/live/livestream.ts #@remarktheportofhttpisspecifiedbyhttp_serversection. #default:[vhost]/[app]/[stream].flv mount[vhost]/[app]/[stream].flv; #whetherhttpstreamtriggerrtmpstreamsourcewhennostreamavailable, #forexample,whenencoderhasnotpublishstreamyet, #usercanplaythehttpflvstreamandwaitforstream. #default:on hstrson; } } #thevhostwithhlsspecified. vhostwith-hls.srs.com{ hls{ #whetherthehlsisenabled. #ifoff,donotwritehls(tsandm3u8)whenpublish. #default:off enabledon; #thehlsfragmentinseconds,thedurationofapieceofts. #default:10 hls_fragment10; #thehlsm3u8targetdurationratio, #EXT-X-TARGETDURATION=hls_td_ratio*hls_fragment//init #EXT-X-TARGETDURATION=max(ts_duration,EXT-X-TARGETDURATION)//foreachts #@seehttps://github.com/ossrs/srs/issues/304#issuecomment-74000081 #default:1.5 hls_td_ratio1.5; #theaudiooverflowratio. #forpureaudio,thedurationtoreapthesegment. #forexample,thehls_fragmentis10s,hsl_aof_ratiois2.0, #thesegemntwillreapto20sforpureaudio. #default:2.0 hls_aof_ratio2.0; #thehlswindowinseconds,thenumberoftsinm3u8. #default:60 hls_window60; #theerrorstrategy.canbe: #ignore,disablethehls. #disconnect,requireencoderrepublish. #continue,ignorefailedtrytocontinueoutputhls. #@seehttps://github.com/ossrs/srs/issues/264 #default:continue hls_on_errorcontinue; #thehlsoutputpath. #them3u8fileisconfigedbyhls_path/hls_m3u8_file,thedefaultis: #./objs/nginx/html/[app]/[stream].m3u8 #thetsfileisconfigedbyhls_path/hls_ts_file,thedefaultis: #./objs/nginx/html/[app]/[stream]-[seq].ts #@remarkthehls_pathiscompatiblewithsrsv1config. #default:./objs/nginx/html hls_path./objs/nginx/html; #thehlsm3u8filename. #wesupportssomevariablestogeneratethefilename. #[vhost],thevhostofstream. #[app],theappofstream. #[stream],thestreamnameofstream. #default:[app]/[stream].m3u8 hls_m3u8_file[app]/[stream].m3u8; #thehlstsfilename. #wesupportssomevariablestogeneratethefilename. #[vhost],thevhostofstream. #[app],theappofstream. #[stream],thestreamnameofstream. #[2006],replacethisconsttocurrentyear. #[01],replacethisconsttocurrentmonth. #[02],replacethisconsttocurrentdate. #[15],replacethisconsttocurrenthour. #[04],repleacethisconsttocurrentminute. #[05],repleacethisconsttocurrentsecond. #[999],repleacethisconsttocurrentmillisecond. #[timestamp],replacethisconsttocurrentUNIXtimestampinms. #[seq],thesequencenumberofts. #@seehttps://github.com/ossrs/srs/wiki/v2_CN_DVR#custom-path #@seehttps://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS#hls-config #default:[app]/[stream]-[seq].ts hls_ts_file[app]/[stream]-[seq].ts; #whetherusefloorforthehls_ts_filepathgeneration. #ifon,usefloor(timestamp/hls_fragment)asthevariable[timestamp], #anduseenahancedalgorithmtocalcdeviationforsegment. #@remarkwhenflooron,recommendthehls_segment>=2*gop. #default:off hls_ts_flooroff; #thehlsentryprefix,whichisbaseurloftsurl. #ifspecified,thetspathinm3u8willbelike: #http://your-server/live/livestream-0.ts #http://your-server/live/livestream-1.ts #... #optional,defaulttoemptystring. hls_entry_prefixhttp://your-server; #thedefaultaudiocodecofhls. #whencodecchanged,writethePAT/PMTtable,butmaybeokutilnextts. #sousercansetthedefaultcodecformp3. #theavailableaudiocodec: #aac,mp3,an #default:aac hls_acodecaac; #thedefaultvideocodecofhls. #whencodecchanged,writethePAT/PMTtable,butmaybeokutilnextts. #sousercansetthedefaultcodecforpureaudio(withoutvideo)tovn. #theavailablevideocodec: #h264,vn #default:h264 hls_vcodech264; #whethercleanuptheoldexpiredtsfiles. #default:on hls_cleanupon; #thetimeoutinsecondstodisposethehls, #disposeistoremoveallhlsfiles,m3u8andtsfiles. #whenpublishertimeoutdisposehls. #@remark0todisabledisposeforpublisher. #@remarkapplyforpublishertimeoutonly,while"etc/init.d/srsstop"alwaysdisposehls. #default:0 hls_dispose0; #themaxsizetonotifyhls, #toreadmaxbytesfromtsofspecifiedcdnnetwork, #@remarkonlyusedwhenon_hls_notifyisconfig. #default:64 hls_nb_notify64; #whetherwaitkeyframetoreapsegment, #ifoff,reapsegmentwhendurationexceedthefragment, #ifon,reapsegmentwhendurationexceedandgotkeyframe. #default:on hls_wait_keyframeon; #on_hls,neverconfiginhere,shouldconfiginhttp_hooks. #forthehlshttpcallback,@seehttp_hooks.on_hlsofvhosthooks.callback.srs.com #@readhttps://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS#http-callback #@readhttps://github.com/ossrs/srs/wiki/v2_EN_DeliveryHLS#http-callback #on_hls_notify,neverconfiginhere,shouldconfiginhttp_hooks. #wesupportthevariablestogeneratethenotifyurl: #[app],replacewiththeapp. #[stream],replacewiththestream. #[ts_url],replacewiththetsurl. #forthehlshttpcallback,@seehttp_hooks.on_hls_notifyofvhosthooks.callback.srs.com #@readhttps://github.com/ossrs/srs/wiki/v2_CN_DeliveryHLS#on-hls-notify #@readhttps://github.com/ossrs/srs/wiki/v2_EN_DeliveryHLS#on-hls-notify } } #thevhostwithhlsdisabled. vhostno-hls.srs.com{ hls{ #whetherthehlsisenabled. #ifoff,donotwritehls(tsandm3u8)whenpublish. #default:off enabledoff; } } #thevhostwithadobehds vhosthds.srs.com{ hds{ #whetherhdsenabled #default:off enabledon; #thehdsfragmentinseconds. #default:10 hds_fragment10; #thehdswindowinseconds,erasethesegmentwhenexceedthewindow. #default:60 hds_window60; #thepathtostorethehdsfiles. #default:./objs/nginx/html hds_path./objs/nginx/html; } } #thehttphookcallbackvhost,srswillinvokethehooksforspecifiedevents. vhosthooks.callback.srs.com{ http_hooks{ #whetherthehttphooksenalbe. #defaultoff. enabledon; #whenclientconnecttovhost/app,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_connect", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"tcUrl":"rtmp://video.test.com/live?key=d2fa801d08e3f90ed1e1670e6e52651a", #"pageUrl":"http://www.test.com/live.html" #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 #supportmultipleapihooks,format: #on_connecthttp://xxx/api0http://xxx/api1http://xxx/apiN on_connecthttp://127.0.0.1:8085/api/v1/clientshttp://localhost:8085/api/v1/clients; #whenclientclose/disconnecttovhost/app/stream,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_close", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"send_bytes":10240,"recv_bytes":10240 #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 #supportmultipleapihooks,format: #on_closehttp://xxx/api0http://xxx/api1http://xxx/apiN on_closehttp://127.0.0.1:8085/api/v1/clientshttp://localhost:8085/api/v1/clients; #whenclient(encoder)publishtovhost/app/stream,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_publish", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"stream":"livestream","param":"?token=xxx&salt=yyy" #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 #supportmultipleapihooks,format: #on_publishhttp://xxx/api0http://xxx/api1http://xxx/apiN on_publishhttp://127.0.0.1:8085/api/v1/streamshttp://localhost:8085/api/v1/streams; #whenclient(encoder)stoppublishtovhost/app/stream,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_unpublish", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"stream":"livestream","param":"?token=xxx&salt=yyy" #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 #supportmultipleapihooks,format: #on_unpublishhttp://xxx/api0http://xxx/api1http://xxx/apiN on_unpublishhttp://127.0.0.1:8085/api/v1/streamshttp://localhost:8085/api/v1/streams; #whenclientstarttoplayvhost/app/stream,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_play", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"stream":"livestream","param":"?token=xxx&salt=yyy", #"pageUrl":"http://www.test.com/live.html" #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 #supportmultipleapihooks,format: #on_playhttp://xxx/api0http://xxx/api1http://xxx/apiN on_playhttp://127.0.0.1:8085/api/v1/sessionshttp://localhost:8085/api/v1/sessions; #whenclientstoptoplayvhost/app/stream,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_stop", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"stream":"livestream","param":"?token=xxx&salt=yyy" #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 #supportmultipleapihooks,format: #on_stophttp://xxx/api0http://xxx/api1http://xxx/apiN on_stophttp://127.0.0.1:8085/api/v1/sessionshttp://localhost:8085/api/v1/sessions; #whensrsreapadvrfile,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_dvr", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"stream":"livestream","param":"?token=xxx&salt=yyy", #"cwd":"/usr/local/srs", #"file":"./objs/nginx/html/live/livestream.1420254068776.flv" #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 on_dvrhttp://127.0.0.1:8085/api/v1/dvrshttp://localhost:8085/api/v1/dvrs; #whensrsreapatsfileofhls,callthehook, #therequestinthePOSTdatastringisaobjectencodebyjson: #{ #"action":"on_hls", #"client_id":1985, #"ip":"192.168.1.10","vhost":"video.test.com","app":"live", #"stream":"livestream","param":"?token=xxx&salt=yyy", #"duration":9.36,//inseconds #"cwd":"/usr/local/srs", #"file":"./objs/nginx/html/live/livestream/2015-04-23/01/476584165.ts", #"url":"live/livestream/2015-04-23/01/476584165.ts", #"m3u8":"./objs/nginx/html/live/livestream/live.m3u8", #"m3u8_url":"live/livestream/live.m3u8", #"seq_no":100 #} #ifvalid,thehookmustreturnHTTPcode200(StautsOK)andresponse #anintvaluespecifiestheerrorcode(0correspondingtosuccess): #0 on_hlshttp://127.0.0.1:8085/api/v1/hlshttp://localhost:8085/api/v1/hls; #whensrsreapatsfileofhls,callthishook, #usedtopushfiletocdnnetwork,bygetthetsfilefromcdnnetwork. #soweuseHTTPGETandusethevariablefollowing: #[app],replacewiththeapp. #[stream],replacewiththestream. #[param],replacewiththeparam. #[ts_url],replacewiththetsurl. #ignoreanyreturndataofserver. #@remarkrandomselectaurltoreport,notreportall. on_hls_notifyhttp://127.0.0.1:8085/api/v1/hls/[app]/[stream]/[ts_url][param]; } } #thevhostforsrsdebuginfo,whethersendargsinconnect(tcUrl). vhostdebug.srs.com{ #whenupnode(forwardto,edgepushto,edgepullfrom)issrs, #it'sstronglyrecommendtoopenthedebug_srs_upnode, #whenconnecttoupnode,itwilltakethedebuginfo, #forexample,theid,sourceid,pid. #pleasesee:https://github.com/ossrs/srs/wiki/v1_CN_SrsLog #default:on debug_srs_upnodeon; } #thevhostformindelay,donotcacheanystream. vhostmin.delay.com{ #@seevhostmrw.srs.comfordetail. min_latencyon; mr{ enabledoff; } mw_latency100; #whethercachethelastgop. #ifon,cachethelastgopanddispatchtoclient, #toenabledfaststartupforclient,clientplayimmediately. #ifoff,sendthelatestmediadatatoclient, #clientneedtowaitforthenextIframetodecodeandshowthevideo. #settooffifrequiresmindelay; #settoonifrequiresclientfaststartup. #default:on gop_cacheoff; #themaxlivequeuelengthinseconds. #ifthemessagesinthequeueexceedthemaxlength, #droptheoldwholegop. #default:30 queue_length10; #whetherenabletheTCP_NODELAY #ifon,setthenodelayoffdbysetsockopt #default:off tcp_nodelayon; } #whetherdisablethespsparse,fortheresolutionofvideo. vhostno.parse.sps.com{ publish{ #whetherparsethespswhenpublishstream. #wecangottheresolutionofvideoforstatapi. #butwemayfailedtocausepublishfailed. #default:on parse_spson; } } #thevhosttocontrolthestreamdeliveryfeature vhoststream.control.com{ #@seevhostmrw.srs.comfordetail. min_latencyon; mr{ enabledoff; } mw_latency100; #@seevhostmin.delay.com queue_length10; tcp_nodelayon; #theminimalpacketssendintervalinms, #usedtocontrolthendiffofstreambysrs_rtmp_dump, #forexample,somedevicecanonlyacceptsomestreamwhich #deliverypacketsinconstantinterval(notcbr). #@remark0todisabletheminimalinterval. #@remark>0tomakethesrstosendmessageonebyone. #@remarkusercangettherightpacketsintervalinmsbysrs_rtmp_dump. #default:0 send_min_interval10.0; #whetherreducethesequenceheader, #forsomeclientwhichcannotgotduplicatedsequenceheader, #whilethesequenceheaderisnotchangedyet. #default:off reduce_sequence_headeron; #the1stpackettimeoutinmsforencoder. #default:20000 publish_1stpkt_timeout20000; #thenormalpackettimeoutinmsforencoder. #default:5000 publish_normal_timeout7000; } #thevhostforantisuck. vhostrefer.anti_suck.com{ #thecommonreferforplayandpublish. #ifthepageurlofclientnotintherefer,accessdenied. #ifnotspecifiedthisfield,allowall. #default:notspecified. refergithub.comgithub.io; #referforpublishclientsspecified. #thecommonreferisnotoverridedbythis. #ifnotspecifiedthisfield,allowall. #default:notspecified. refer_publishgithub.comgithub.io; #referforplayclientsspecified. #thecommonreferisnotoverridedbythis. #ifnotspecifiedthisfield,allowall. #default:notspecified. refer_playgithub.comgithub.io; } #thevhostwhichforwardpublishstreams. vhostsame.vhost.forward.srs.com{ #forwardallpublishstreamtothespecifiedserver. #thisusedtosplit/forwardthecurrentstreamforclusteractive-standby, #active-activeforcdntobuildhighavailablefaulttolerancesystem. #format:{ip}:{port}{ip_N}:{port_N} forward127.0.0.1:1936127.0.0.1:1937; } #themaincommentsfortranscode vhostexample.transcode.srs.com{ #thestreamingtranscodeconfigs. transcode{ #whetherthetranscodeenabled. #ifoff,donottranscode. #default:off. enabledon; #theffmpeg ffmpeg./objs/ffmpeg/bin/ffmpeg; #thetranscodeengineformatchedstream. #allmatchedstreamwilltranscodedtothefollowingstream. #thetranscodesetname(ie.hd)isoptionalandnotused. engineexample{ #whethertheengineisenabled #default:off. enabledon; #inputformat,canbe: #off,donotspecifiestheformat,ffmpegwillguessit. #flv,forflvorRTMPstream. #otherformat,forexample,mp4/aacwhatever. #default:flv iformatflv; #ffmpegfilters,followsthemaininput. vfilter{ #thelogoinputfile. i./doc/ffmpeg-logo.png; #theffmpegcomplexfilter. #forfilters,@see:http://ffmpeg.org/ffmpeg-filters.html filter_complex'overlay=10:10'; } #videoencodername.canbe: #libx264:useh.264(libx264)videoencoder. #copy:donotencoderthevideostream,copyit. #vn:disablevideooutput. vcodeclibx264; #videobitrate,inkbps #@remark0tousesourcevideobitrate. #default:0 vbitrate1500; #videoframerate. #@remark0tousesourcevideofps. #default:0 vfps25; #videowidth,mustbeevennumbers. #@remark0tousesourcevideowidth. #default:0 vwidth768; #videoheight,mustbeevennumbers. #@remark0tousesourcevideoheight. #default:0 vheight320; #themaxthreadsforffmpegtoused. #default:1 vthreads12; #x264profile,@seex264-help,canbe: #high,main,baseline vprofilemain; #x264preset,@seex264-help,canbe: #ultrafast,superfast,veryfast,faster,fast #medium,slow,slower,veryslow,placebo vpresetmedium; #otherx264orffmpegvideoparams vparams{ #ffmpegoptions,@see:http://ffmpeg.org/ffmpeg.html t100; #264params,@see:http://ffmpeg.org/ffmpeg-codecs.html#libx264 coder1; b_strategy2; bf3; refs10; } #audioencodername.canbe: #libfdk_aac:useaac(libfdk_aac)audioencoder. #copy:donotencodertheaudiostream,copyit. #an:disableaudiooutput. acodeclibfdk_aac; #audiobitrate,inkbps.[16,72]forlibfdk_aac. #@remark0tousesourceaudiobitrate. #default:0 abitrate70; #audiosamplerate.forflv/rtmp,itmustbe: #44100,22050,11025,5512 #@remark0tousesourceaudiosamplerate. #default:0 asample_rate44100; #audiochannel,1formono,2forstereo. #@remark0tousesourceaudiochannels. #default:0 achannels2; #otherffmpegaudioparams aparams{ #audioparams,@see:http://ffmpeg.org/ffmpeg-codecs.html#Audio-Encoders #@remarkSRSsupportedaacprofileforHLSis:aac_low,aac_he,aac_he_v2 profile:aaac_low; bsf:aaac_adtstoasc; } #outputformat,canbe: #off,donotspecifiestheformat,ffmpegwillguessit. #flv,forflvorRTMPstream. #otherformat,forexample,mp4/aacwhatever. #default:flv oformatflv; #outputstream.variables: #[vhost]theinputstreamvhost. #[port]theintputstreamport. #[app]theinputstreamapp. #[stream]theinputstreamname. #[engine]thetanscodeenginename. outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #themirrorfilterofffmpeg,@see:http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction vhostmirror.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; enginemirror{ enabledon; vfilter{ vf'split[main][tmp];[tmp]crop=iw:ih/2:0:0,vflip[flip];[main][flip]overlay=0:H/2'; } vcodeclibx264; vbitrate300; vfps20; vwidth768; vheight320; vthreads2; vprofilebaseline; vpresetsuperfast; vparams{ } acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #thedrawtextfilterofffmpeg,@see:http://ffmpeg.org/ffmpeg-filters.html#drawtext-1 #remark:weremovethelibfreetypewhichalwayscausebuildfailed,youmustadditmanualifneeded. ####################################################################################################### #thecropfilterofffmpeg,@see:http://ffmpeg.org/ffmpeg-filters.html#crop vhostcrop.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; enginecrop{ enabledon; vfilter{ vf'crop=in_w-20:in_h-160:10:80'; } vcodeclibx264; vbitrate300; vfps20; vwidth768; vheight320; vthreads2; vprofilebaseline; vpresetsuperfast; vparams{ } acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #thelogofilterofffmpeg,@see:http://ffmpeg.org/ffmpeg-filters.html#overlay vhostlogo.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; enginelogo{ enabledon; vfilter{ i./doc/ffmpeg-logo.png; filter_complex'overlay=10:10'; } vcodeclibx264; vbitrate300; vfps20; vwidth768; vheight320; vthreads2; vprofilebaseline; vpresetsuperfast; vparams{ } acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #audiotranscodeonly. #forexample,FMLEpublishaudiocodecinmp3,anddonotsupportHLSoutput, #wecantranscodetheaudiotoaacandcopyvideotothenewstreamwithHLS. vhostaudio.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; engineacodec{ enabledon; vcodeccopy; acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #disablevideo,transcode/copyaudio. #forexample,publishpureaudiostream. vhostvn.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; enginevn{ enabledon; vcodecvn; acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #ffmpeg-copy(forwardimplementsbyffmpeg). #copythevideoandaudiotoanewstream. vhostcopy.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; enginecopy{ enabledon; vcodeccopy; acodeccopy; outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #transcodeallappandstreamofvhost #thecomments,readexample.transcode.srs.com vhostall.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; engineffsuper{ enabledon; iformatflv; vfilter{ i./doc/ffmpeg-logo.png; filter_complex'overlay=10:10'; } vcodeclibx264; vbitrate1500; vfps25; vwidth768; vheight320; vthreads12; vprofilemain; vpresetmedium; vparams{ t100; coder1; b_strategy2; bf3; refs10; } acodeclibfdk_aac; abitrate70; asample_rate44100; achannels2; aparams{ profile:aaac_low; } oformatflv; outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } engineffhd{ enabledon; vcodeclibx264; vbitrate1200; vfps25; vwidth1382; vheight576; vthreads6; vprofilemain; vpresetmedium; vparams{ } acodeclibfdk_aac; abitrate70; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } engineffsd{ enabledon; vcodeclibx264; vbitrate800; vfps25; vwidth1152; vheight480; vthreads4; vprofilemain; vpresetfast; vparams{ } acodeclibfdk_aac; abitrate60; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } enginefffast{ enabledon; vcodeclibx264; vbitrate300; vfps20; vwidth768; vheight320; vthreads2; vprofilebaseline; vpresetsuperfast; vparams{ } acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } enginevcopy{ enabledon; vcodeccopy; acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } engineacopy{ enabledon; vcodeclibx264; vbitrate300; vfps20; vwidth768; vheight320; vthreads2; vprofilebaseline; vpresetsuperfast; vparams{ } acodeccopy; outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } enginecopy{ enabledon; vcodeccopy; acodeccopy; outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #transcodeallstreamusingtheemptyffmpegdemo,donothing. vhostffempty.transcode.srs.com{ transcode{ enabledon; ffmpeg./objs/research/ffempty; engineempty{ enabledon; vcodeclibx264; vbitrate300; vfps20; vwidth768; vheight320; vthreads2; vprofilebaseline; vpresetsuperfast; vparams{ } acodeclibfdk_aac; abitrate45; asample_rate44100; achannels2; aparams{ } outputrtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine]; } } } #transcodeallappandstreamofapp vhostapp.transcode.srs.com{ #thestreamingtranscodeconfigs. #ifappspecified,transcodeallstreamsofapp. transcodelive{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; engine{ enabledoff; } } } #transcodespecifiedstream. vhoststream.transcode.srs.com{ #thestreamingtranscodeconfigs. #ifstreamspecified,transcodethematchedstream. transcodelive/livestream{ enabledon; ffmpeg./objs/ffmpeg/bin/ffmpeg; engine{ enabledoff; } } } #vhostforbandwidthcheck #generally,thebandcheckvhostmustbe:bandcheck.srs.com, #orneedtomodifythevhostofclient. vhostbandcheck.srs.com{ enabledon; chunk_size65000; #bandwidthcheckconfig. bandcheck{ #whethersupportbandwidthcheck, #default:off. enabledon; #thekeyforservertovalid, #ifinvalidkey,serverdisconnectandabortthebandwidthcheck. key"35c9b402c12a7246868752e2878f7e0e"; #theintervalinsecondsforbandwidthcheck, #serverdonotallownewtestrequest. #default:30 interval30; #themaxavailablecheckbandwidthinkbps. #toavoidattackofbandwidthcheck. #default:1000 limit_kbps4000; } } #setthechunksizeofvhost. vhostchunksize.srs.com{ #thedefaultchunksizeis128,maxis65536, #someclientdoesnotsupportchunksizechange, #vhostchunksizewilloverridetheglobalvalue. #default:globalchunksize. chunk_size128; } #vhostfortimejitter vhostjitter.srs.com{ #aboutthestreammonotonicallyincreasing: #1.videotimestampismonotonicallyincreasing, #2.audiotimestampismonotonicallyincreasing, #3.videoandaudiotimestampisinterleaved/mixedmonotonicallyincreasing. #it'sspecifiedbyRTMPspecification,@see3.ByteOrder,Alignment,andTimeFormat #however,someencodercannotprovidesthisfeature,pleasesetthistoofftoignoretimejitter. #thetimejitteralgorithm: #1.full,toensurestreamstartatzero,andensurestreammonotonicallyincreasing. #2.zero,onlyensuresttreamstartatzero,ignoretimestampjitter. #3.off,disablethetimejitteralgorithm,likeatc. #default:full time_jitterfull; #whetherusetheinterleaved/mixedalgorithmtocorrectthetimestamp. #ifon,alwaysensurethetimestampofaudio+videoisinterleaved/mixedmonotonicallyincrease. #ifoff,usetime_jittertocorrectthetimestampifrequired. #default:off mix_correctoff; } #vhostforatc. vhostatc.srs.com{ #vhostforatcforhls/hds/rtmpbackup. #generally,atcdefaulttooff,serverdeliveryrtmpstreamtoclient(flash)timestampfrom0. #whenatcison,serverdeliveryrtmpstreambyabsolutetime. #atcisused,forinstance,encoderwillcopystreamtomasterandslaveserver, #serveruseatctodeliverystreamtoedge/client,wherestreamtimefrommaster/slaveserver #isalwaysthesame,client/toolscansliceRTMPstreamtoHLSaccordingtothesametime, #ifthetimenotthesame,theHLSstreamcannotslicetosupportsystembackup. # #@seehttp://www.adobe.com/cn/devnet/adobe-media-server/articles/varnish-sample-for-failover.html #@seehttp://www.baidu.com/#wd=hds%20hls%20atc # #default:off atcon; #whetherenabletheautoatc, #ifenabled,detectthebravo_atc="true"inonMetaDatapacket, #setatctoonifmatched. #alwaysignoretheonMetaDataifatc_autoisoff. #default:on atc_autoon; } #thevhostdisabled. vhostremoved.srs.com{ #whetherthevhostisenabled. #ifoff,allrequestaccessdenied. #default:on enabledoff; } #configforthepithyprint, #whichalwaysprintconstantmessagespecifiedbyinterval, #whatevertheclientsinconcurrency. #default:10000 pithy_print_ms10000; Copylines Copypermalink Viewgitblame Go Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?