livekit / python-sdks

LiveKit real-time and server SDKs for Python
https://docs.livekit.io
Apache License 2.0
80 stars 26 forks source link

No video codecs supported VP9 #106

Closed TheNha closed 7 months ago

TheNha commented 8 months ago

Hi. Im using android SDK publish video encode VP9, then I used python sdks read buffer stream. I got an error.

[2023-11-21T09:59:01Z INFO  livekit::rtc_engine::rtc_session] received JoinResponse: JoinResponse { room: Some(Room { sid: "RM_aGQRqwMEptQM", name: "my-first-room", empty_timeout: 300, max_participants: 0, creation_time: 1700560707, turn_password: "8WrVZbte63ZB1d4UpXqX2ZujdcjBfpQdm0gJLRatf6XA", enabled_codecs: [Codec { mime: "video/vp9", fmtp_line: "" }], metadata: "", num_participants: 1, num_publishers: 1, active_recording: false, playout_delay: None }), participant: Some(ParticipantInfo { sid: "PA_9j2DKPYw6iUh", identity: "ai", state: Joining, tracks: [], metadata: "", joined_at: 1700560741, name: "ai", version: 0, permission: Some(ParticipantPermission { can_subscribe: true, can_publish: true, can_publish_data: true, can_publish_sources: [], hidden: false, recorder: false, can_update_metadata: false }), region: "", is_publisher: false }), other_participants: [ParticipantInfo { sid: "PA_8ZMxZhQJxh5r", identity: "sdk", state: Active, tracks: [TrackInfo { sid: "TR_VCaMGWBiP4VSxD", r#type: Video, name: "", muted: false, width: 1280, height: 720, simulcast: false, disable_dtx: false, source: Camera, layers: [VideoLayer { quality: High, width: 1280, height: 720, bitrate: 1700000, ssrc: 0 }, VideoLayer { quality: Medium, width: 640, height: 360, bitrate: 566667, ssrc: 0 }, VideoLayer { quality: Low, width: 320, height: 180, bitrate: 188889, ssrc: 0 }], mime_type: "video/VP9", mid: "2", codecs: [SimulcastCodecInfo { mime_type: "video/VP9", mid: "2", cid: "38a4b1a3-fd4c-4aa0-a8b1-50f7277be2de", layers: [VideoLayer { quality: High, width: 1280, height: 720, bitrate: 1700000, ssrc: 0 }, VideoLayer { quality: Medium, width: 640, height: 360, bitrate: 566667, ssrc: 0 }, VideoLayer { quality: Low, width: 320, height: 180, bitrate: 188889, ssrc: 0 }] }], stereo: false, disable_red: false, encryption: None, stream: "camera" }], metadata: "", joined_at: 1700560707, name: "sdk", version: 3, permission: Some(ParticipantPermission { can_subscribe: true, can_publish: true, can_publish_data: true, can_publish_sources: [], hidden: false, recorder: false, can_update_metadata: false }), region: "", is_publisher: true }], server_version: "1.5.0", ice_servers: [IceServer { urls: ["turn:turn-dev.seauat.com.vn:3478?transport=udp"], username: "user-1", credential: "pass-1" }, IceServer { urls: ["stun:turn-dev.seauat.com.vn:3478"], username: "", credential: "" }], subscriber_primary: true, alternative_url: "", client_configuration: None, server_region: "", ping_timeout: 15, ping_interval: 5, server_info: Some(ServerInfo { edition: Standard, version: "1.5.0", protocol: 10, region: "", node_id: "ND_FDPXurdDNwHL", debug_info: "" }), sif_trailer: [57, 116, 86, 88, 67, 51, 97, 50, 56, 120, 89, 122, 51, 103, 114, 50, 86, 86, 112, 48, 108, 88, 56, 51, 83, 79, 55, 102, 66, 102, 56, 121, 89, 81, 81, 71, 97, 102, 101, 49, 76, 67, 67, 65] }
[2023-11-21T09:59:01Z WARN  libwebrtc] (sctp_data_channel.cc:369): DataChannelObserver - adapter needed
[2023-11-21T09:59:01Z WARN  libwebrtc] (sctp_data_channel.cc:369): DataChannelObserver - adapter needed
[2023-11-21T09:59:01Z ERROR libwebrtc] (webrtc_video_engine.cc:788): No video codecs supported.
[2023-11-21T09:59:01Z ERROR libwebrtc] (sdp_offer_answer.cc:887): Failed to set remote offer sdp: Failed to set remote video description send parameters for m-section with mid='1'.
[2023-11-21T09:59:01Z ERROR livekit::rtc_engine::rtc_session] failed to handle signal: Rtc(RtcError { error_type: Internal, message: "Failed to set remote offer sdp: Failed to set remote video description send parameters for m-section with mid='1'." })

Can you support video codecs VP9 in python SDKs, and how to use it in code. Thank you.

davidzhao commented 8 months ago

Currently VP9 isn't supported. this will be added soon.

TheNha commented 8 months ago

Thanks you @davidzhao . What codecs does python sdk currently support?

theomonnom commented 8 months ago

Hey @TheNha, VP8 and H264