service-schema-v5.json 12 KB

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