service-schema-v5.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. "multitrack_video_configuration_url": {
  202. "$ref": "#/definitions/saneUrl",
  203. "description": "Accessed for multitrack video auto configuration"
  204. },
  205. "multitrack_video_name": {
  206. "type": "string",
  207. "description": "Marketing name for eRTMP multitrack video (e.g., Enhanced Broadcasting for Twitch)"
  208. },
  209. "multitrack_video_learn_more_link": {
  210. "$ref": "#/definitions/saneUrl",
  211. "description": "Link to additional information and privacy policy (for e.g., data sent to `multitrack_video_configuration_url`)"
  212. },
  213. "alt_names": {
  214. "type": "array",
  215. "description": "Previous names of the service used for migrating existing users to the updated entry.",
  216. "items": {
  217. "type": "string",
  218. "minLength": 1
  219. },
  220. "default": [
  221. ""
  222. ]
  223. }
  224. },
  225. "additionalProperties": false,
  226. "required": [
  227. "name",
  228. "servers"
  229. ],
  230. "allOf": [
  231. {
  232. "$comment": "Require protocol field if not an RTMP(S) URL",
  233. "if": { "not": { "properties": { "servers": { "items": { "properties": { "url": { "format": "uri", "pattern": "^rtmps?://" } } } } } } },
  234. "then": { "required": ["protocol"] }
  235. },
  236. {
  237. "$comment": "Require recommended output field if protocol field is not RTMP(S)",
  238. "if": { "required": ["protocol"], "properties": { "protocol": { "pattern": "^(HLS|SRT|RIST|FTL|WHIP)$" } } },
  239. "then": { "properties": { "recommended": { "required": ["output"] } } }
  240. }
  241. ]
  242. },
  243. "additionalItems": true
  244. }
  245. },
  246. "additionalProperties": true,
  247. "required": [
  248. "format_version",
  249. "services"
  250. ],
  251. "definitions": {
  252. "resolution": {
  253. "type": "string",
  254. "pattern": "^\\d+x\\d+$",
  255. "default": ""
  256. },
  257. "saneUrl": {
  258. "type": "string",
  259. "format": "uri",
  260. "pattern": "^https?://.+",
  261. "default": "https://"
  262. },
  263. "serviceUri": {
  264. "anyOf": [
  265. {
  266. "type": "string",
  267. "format": "uri",
  268. "pattern": "^(https|http|rtmps|rtmp|srt|rist)?://"
  269. },
  270. {
  271. "type": "string",
  272. "format": "hostname"
  273. }
  274. ]
  275. }
  276. }
  277. }