github.com/livekit/protocol@v1.39.3/protobufs/livekit_ingress.proto (about) 1 // Copyright 2023 LiveKit, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package livekit; 18 19 import "livekit_models.proto"; 20 21 option go_package = "github.com/livekit/protocol/livekit"; 22 option csharp_namespace = "LiveKit.Proto"; 23 option ruby_package = "LiveKit::Proto"; 24 25 service Ingress { 26 // Create a new Ingress 27 rpc CreateIngress(CreateIngressRequest) returns (IngressInfo); 28 // Update an existing Ingress. Ingress can only be updated when it's in ENDPOINT_WAITING state. 29 rpc UpdateIngress(UpdateIngressRequest) returns (IngressInfo); 30 rpc ListIngress(ListIngressRequest) returns (ListIngressResponse); 31 rpc DeleteIngress(DeleteIngressRequest) returns (IngressInfo); 32 } 33 34 message CreateIngressRequest { 35 IngressInput input_type = 1; 36 // Where to pull media from, only for URL input type 37 string url = 9; 38 // User provided identifier for the ingress 39 string name = 2; 40 // room to publish to 41 string room_name = 3; 42 // publish as participant 43 string participant_identity = 4; 44 // name of publishing participant (used for display only) 45 string participant_name = 5; 46 // metadata associated with the publishing participant 47 string participant_metadata = 10; 48 // [depreacted ] whether to pass through the incoming media without transcoding, only compatible with some input types. Use `enable_transcoding` instead. 49 bool bypass_transcoding = 8 [deprecated = true]; 50 // Whether to transcode the ingested media. Only WHIP supports disabling transcoding currently. WHIP will default to transcoding disabled. Replaces `bypass_transcoding. 51 optional bool enable_transcoding = 11; 52 IngressAudioOptions audio = 6; 53 IngressVideoOptions video = 7; 54 optional bool enabled = 12; // The default value is true and when set to false, the new connection attempts will be rejected 55 56 // NEXT_ID: 13 57 } 58 59 enum IngressInput { 60 RTMP_INPUT = 0; 61 WHIP_INPUT = 1; 62 URL_INPUT = 2; // Pull from the provided URL. Only HTTP url are supported, serving either a single media file or a HLS stream 63 // FILE_INPUT = 3; 64 // SRT_INPUT = 4; 65 } 66 67 message IngressAudioOptions { 68 string name = 1; 69 TrackSource source = 2; 70 oneof encoding_options { 71 IngressAudioEncodingPreset preset = 3; 72 IngressAudioEncodingOptions options = 4; 73 } 74 } 75 76 message IngressVideoOptions { 77 string name = 1; 78 TrackSource source = 2; 79 oneof encoding_options { 80 IngressVideoEncodingPreset preset = 3; 81 IngressVideoEncodingOptions options = 4; 82 } 83 } 84 85 enum IngressAudioEncodingPreset { 86 OPUS_STEREO_96KBPS = 0; // OPUS, 2 channels, 96kbps 87 OPUS_MONO_64KBS = 1; // OPUS, 1 channel, 64kbps 88 } 89 90 enum IngressVideoEncodingPreset { 91 H264_720P_30FPS_3_LAYERS = 0; // 1280x720, 30fps, 1900kbps main layer, 3 layers total 92 H264_1080P_30FPS_3_LAYERS = 1; // 1980x1080, 30fps, 3500kbps main layer, 3 layers total 93 H264_540P_25FPS_2_LAYERS = 2; // 960x540, 25fps, 1000kbps main layer, 2 layers total 94 H264_720P_30FPS_1_LAYER = 3; // 1280x720, 30fps, 1900kbps, no simulcast 95 H264_1080P_30FPS_1_LAYER = 4; // 1980x1080, 30fps, 3500kbps, no simulcast 96 H264_720P_30FPS_3_LAYERS_HIGH_MOTION = 5; // 1280x720, 30fps, 2500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content 97 H264_1080P_30FPS_3_LAYERS_HIGH_MOTION = 6; // 1980x1080, 30fps, 4500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content 98 H264_540P_25FPS_2_LAYERS_HIGH_MOTION = 7; // 960x540, 25fps, 1300kbps main layer, 2 layers total, higher bitrate for high motion, harder to encode content 99 H264_720P_30FPS_1_LAYER_HIGH_MOTION = 8; // 1280x720, 30fps, 2500kbps, no simulcast, higher bitrate for high motion, harder to encode content 100 H264_1080P_30FPS_1_LAYER_HIGH_MOTION = 9; // 1980x1080, 30fps, 4500kbps, no simulcast, higher bitrate for high motion, harder to encode content 101 } 102 103 message IngressAudioEncodingOptions { 104 // desired audio codec to publish to room 105 AudioCodec audio_codec = 1; 106 uint32 bitrate = 2; 107 bool disable_dtx = 3; 108 uint32 channels = 4; 109 } 110 111 message IngressVideoEncodingOptions { 112 // desired codec to publish to room 113 VideoCodec video_codec = 1; 114 double frame_rate = 2; 115 // simulcast layers to publish, when empty, should usually be set to layers at 1/2 and 1/4 of the dimensions 116 repeated VideoLayer layers = 3; 117 } 118 119 message IngressInfo { 120 string ingress_id = 1; 121 string name = 2; 122 string stream_key = 3; 123 string url = 4; // URL to point the encoder to for push (RTMP, WHIP), or location to pull media from for pull (URL) 124 // for RTMP input, it'll be a rtmp:// URL 125 // for FILE input, it'll be a http:// URL 126 // for SRT input, it'll be a srt:// URL 127 IngressInput input_type = 5; 128 bool bypass_transcoding = 13 [deprecated = true]; 129 optional bool enable_transcoding = 15; 130 IngressAudioOptions audio = 6; 131 IngressVideoOptions video = 7; 132 string room_name = 8; 133 string participant_identity = 9; 134 string participant_name = 10; 135 string participant_metadata = 14; 136 bool reusable = 11; 137 IngressState state = 12; // Description of error/stream non compliance and debug info for publisher otherwise (received bitrate, resolution, bandwidth) 138 optional bool enabled = 16; // The default value is true and when set to false, the new connection attempts will be rejected 139 140 // NEXT_ID: 17 141 } 142 143 message IngressState { 144 enum Status { 145 ENDPOINT_INACTIVE = 0; 146 ENDPOINT_BUFFERING = 1; 147 ENDPOINT_PUBLISHING = 2; 148 ENDPOINT_ERROR = 3; 149 ENDPOINT_COMPLETE = 4; 150 } 151 152 Status status = 1; 153 string error = 2; // Error/non compliance description if any 154 InputVideoState video = 3; 155 InputAudioState audio = 4; 156 string room_id = 5; // ID of the current/previous room published to 157 int64 started_at = 7; 158 int64 ended_at = 8; 159 int64 updated_at = 10; 160 string resource_id = 9; 161 repeated TrackInfo tracks = 6; 162 163 // next ID: 11 164 } 165 166 message InputVideoState { 167 string mime_type = 1; 168 uint32 average_bitrate = 2; 169 uint32 width = 3; 170 uint32 height = 4; 171 double framerate = 5; 172 } 173 174 message InputAudioState { 175 string mime_type = 1; 176 uint32 average_bitrate = 2; 177 uint32 channels = 3; 178 uint32 sample_rate = 4; 179 } 180 181 message UpdateIngressRequest { 182 string ingress_id = 1; 183 string name = 2; 184 string room_name = 3; 185 string participant_identity = 4; 186 string participant_name = 5; 187 string participant_metadata = 9; 188 optional bool bypass_transcoding = 8 [deprecated = true]; 189 optional bool enable_transcoding = 10; 190 IngressAudioOptions audio = 6; 191 IngressVideoOptions video = 7; 192 optional bool enabled = 11; // The default value is true and when set to false, the new connection attempts will be rejected 193 // NEXT_ID: 12 194 } 195 196 message ListIngressRequest { 197 // when blank, lists all ingress endpoints 198 string room_name = 1; // (optional, filter by room name) 199 string ingress_id = 2; // (optional, filter by ingress ID) 200 } 201 202 message ListIngressResponse { 203 repeated IngressInfo items = 1; 204 } 205 206 message DeleteIngressRequest { 207 string ingress_id = 1; 208 }