service-schema-v5.json 13 KB

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