service-schema-v4.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "type": "object",
  4. "properties": {
  5. "format_version": {
  6. "type": "integer",
  7. "description": "Identifier for parsing this file.\n- v4 introduced 'ffmpeg_mpegts_muxer' to services/recommended/output\n - v3 introduced 'ffmpeg_hls_muxer' to services/recommended/output\n - v2 introduced 'alt_names' to services"
  8. },
  9. "services": {
  10. "type": "array",
  11. "items": {
  12. "type": "object",
  13. "properties": {
  14. "name": {
  15. "type": "string",
  16. "description": "Name of the streaming service. Will be displayed in the Service dropdown.",
  17. "minLength": 1
  18. },
  19. "common": {
  20. "type": "boolean",
  21. "description": "Whether or not the service is shown in the list before it is expanded to all services by the user.",
  22. "default": false
  23. },
  24. "stream_key_link": {
  25. "$ref": "#/definitions/saneUrl",
  26. "description": "Link where a logged-in user can find the 'stream key', presented as a button alongside the stream key field."
  27. },
  28. "supported video codecs": {
  29. "type": "array",
  30. "description": "Video codecs that are supported by the service.",
  31. "items": {
  32. "type": "string",
  33. "description": "Short-form codec names.",
  34. "minLength": 1,
  35. "enum": [
  36. "h264",
  37. "hevc"
  38. ]
  39. }
  40. },
  41. "supported audio codecs": {
  42. "type": "array",
  43. "description": "Audio codecs that are supported by the service.",
  44. "items": {
  45. "type": "string",
  46. "description": "Short-form codec names.",
  47. "minLength": 1,
  48. "enum": [
  49. "aac",
  50. "opus"
  51. ]
  52. }
  53. },
  54. "servers": {
  55. "type": "array",
  56. "description": "List of servers.",
  57. "items": {
  58. "type": "object",
  59. "properties": {
  60. "name": {
  61. "type": "string",
  62. "description": "Name of the server (e.g. location, primary/backup), displayed in the Server dropdown.",
  63. "minLength": 1
  64. },
  65. "url": {
  66. "$ref": "#/definitions/serviceUri",
  67. "description": "RTMP(S) or HLS URL of the ingest server.",
  68. "minLength": 1
  69. }
  70. },
  71. "additionalProperties": false,
  72. "required": [
  73. "name",
  74. "url"
  75. ]
  76. },
  77. "default": [
  78. {
  79. "name": "",
  80. "url": ""
  81. }
  82. ],
  83. "minItems": 1,
  84. "additionalItems": true
  85. },
  86. "recommended": {
  87. "type": "object",
  88. "description": "Recommended service settings. Users will be unable to choose values outside of these by default, so choose recommended values carefully.",
  89. "properties": {
  90. "keyint": {
  91. "type": "integer",
  92. "description": "Keyframe interval (seconds)."
  93. },
  94. "max video bitrate": {
  95. "type": "integer",
  96. "description": "Highest supported video bitrate (kbps)."
  97. },
  98. "max audio bitrate": {
  99. "type": "integer",
  100. "description": "Highest supported audio bitrate (kbps)."
  101. },
  102. "x264opts": {
  103. "type": "string",
  104. "description": "Additional x264 encoder options. Space-separated.",
  105. "pattern": "^(\\S+=\\S+\\s*)+$"
  106. },
  107. "output": {
  108. "type": "string",
  109. "description": "OBS output module used.",
  110. "enum": [
  111. "rtmp_output",
  112. "ffmpeg_hls_muxer",
  113. "ftl_output",
  114. "ffmpeg_mpegts_muxer"
  115. ]
  116. },
  117. "profile": {
  118. "type": "string",
  119. "description": "H.264 Profile.",
  120. "minLength": 1,
  121. "enum": [
  122. "high",
  123. "main",
  124. "baseline"
  125. ]
  126. },
  127. "bframes": {
  128. "type": "integer",
  129. "description": "Maximum allowed number of B-Frames."
  130. },
  131. "supported resolutions": {
  132. "type": "array",
  133. "description": "List of supported resolutions in format {width}x{height}",
  134. "items": {
  135. "$ref": "#/definitions/resolution"
  136. },
  137. "minItems": 1,
  138. "additionalItems": true
  139. },
  140. "max fps": {
  141. "type": "integer",
  142. "description": "Maximum supported framerate."
  143. },
  144. "bitrate matrix": {
  145. "type": "array",
  146. "description": "List of resolutions and frame rate combinations with their recommended maximum bitrate.",
  147. "items": {
  148. "type": "object",
  149. "properties": {
  150. "res": {
  151. "$ref": "#/definitions/resolution",
  152. "description": "Resolution in format {width}x{height}"
  153. },
  154. "fps": {
  155. "type": "integer",
  156. "description": "Frame rate"
  157. },
  158. "max bitrate": {
  159. "type": "integer",
  160. "description": "Maximum bitrate in kbps."
  161. }
  162. },
  163. "minItems": 1,
  164. "additionalProperties": false,
  165. "required": [
  166. "res",
  167. "fps",
  168. "max bitrate"
  169. ]
  170. },
  171. "default": [
  172. {
  173. "res": "",
  174. "fps": "",
  175. "max bitrate": ""
  176. }
  177. ],
  178. "additionalItems": true
  179. }
  180. },
  181. "additionalProperties": false
  182. },
  183. "more_info_link": {
  184. "$ref": "#/definitions/saneUrl",
  185. "description": "Link that provides additional info about the service, presented in the UI as a button next to the services dropdown."
  186. },
  187. "alt_names": {
  188. "type": "array",
  189. "description": "Previous names of the service used for migrating existing users to the updated entry.",
  190. "items": {
  191. "type": "string",
  192. "minLength": 1
  193. },
  194. "default": [
  195. ""
  196. ]
  197. }
  198. },
  199. "additionalProperties": false,
  200. "required": [
  201. "name",
  202. "servers"
  203. ]
  204. },
  205. "additionalItems": true
  206. }
  207. },
  208. "additionalProperties": true,
  209. "required": [
  210. "format_version",
  211. "services"
  212. ],
  213. "definitions": {
  214. "resolution": {
  215. "type": "string",
  216. "pattern": "^\\d+x\\d+$",
  217. "default": ""
  218. },
  219. "saneUrl": {
  220. "type": "string",
  221. "format": "uri",
  222. "pattern": "^https?://.+",
  223. "default": "https://"
  224. },
  225. "serviceUri": {
  226. "anyOf": [
  227. {
  228. "type": "string",
  229. "format": "uri",
  230. "pattern": "^(https|http|rtmps|rtmp|srt|rist)?://"
  231. },
  232. {
  233. "type": "string",
  234. "format": "hostname"
  235. }
  236. ]
  237. }
  238. }
  239. }