-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathopenapi.yaml
112 lines (110 loc) · 2.73 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
openapi: "3.0.0"
info:
title: LBRY Video Transcoder
version: "0.0.1"
servers:
- url: https://api.example.com/api/v1
paths:
/video/{type}/{url}:
get:
summary: Get a video stream
responses:
"200":
description: transcoded stream found and can be delivered
content:
application/x-mpegURL: {}
"202":
description: transcoding is underway
content:
application/json:
schema:
$ref: "#/components/schemas/TranscodingProgress"
"403":
description: transcoded stream was not found but will not be queued for processing
"404":
description: stream not found
parameters:
- name: url
in: path
required: true
schema:
type: string
- name: type
in: path
required: true
schema:
type: string
enum:
- dash
- hls
- range
- name: touch
in: query
required: false
description: >
if present in the query, will only return http/transcoding status,
omitting video data even if present
schema:
type: boolean
default: false
components:
schemas:
URL:
description: LBRY content URL
type: string
pattern: ^lbry://.+
TranscodingProgress:
type: object
properties:
progress:
type: integer
minimum: 0
maximum: 100
speed:
type: number
minimum: 0
started:
type: string
format: date-time
TranscodingTask:
type: object
required:
- claim_id
- signed_channel_address
properties:
url:
$ref: "#/components/schemas/URL"
claim_id:
type: string
format: byte
maxLength: 41
progress:
$ref: "#/components/schemas/TranscodingProgress"
encoding_parameters:
nullable: true
type: object
properties:
resolution:
type: array
enum:
- 1080p
- 720p
- 360p
created:
type: string
format: date-time
status:
type: string
enum:
- waiting
- abandoned
- encoding
- done
signed_channel_address:
type: string
format: byte
description: |
Signed channel address should be a channel address signed
by channel's key owner.
Transcoder will validate this signature against channel's public key
to prevent unauthorized requests.