FFmpeg H.264 decoder not found
anhtu-phan opened this issue · comments
Hello,
I am trying to get video feed from one of other participant through track_subscribed event (as code below)
async def receive_frames(stream: rtc.VideoStream):
async for frame in video_stream:
print(len(frame))
@room.on("track_subscribed")
def on_track_subscribed(track: rtc.Track, publication: rtc.RemoteTrackPublication, participant: rtc.RemoteParticipant):
if track.kind == rtc.TrackKind.KIND_VIDEO:
nonlocal video_stream
if video_stream is not None:
# only process the first stream received
return
print(f"subscribed to track: {track.name} pub id {publication.sid}")
video_stream = rtc.VideoStream(track)
task = asyncio.create_task(receive_frames(video_stream))
tasks.add(task)
task.add_done_callback(tasks.remove)`
But I got the error below and does not receive any frame
[2023-11-12T12:03:51Z ERROR libwebrtc] (h264_decoder_impl.cc:312): FFmpeg H.264 decoder not found.
[2023-11-12T12:03:51Z ERROR libwebrtc] (decoder_database.cc:148): Failed to initialize decoder.
I am using python3.10 and latest version of LiveKit-sdk (install through pip install livekit
and pip install livekit-api
Could you please guide me how to fix this error.
Thank you!
related to livekit/rust-sdks#169
@davidzhao thanks for your answer,
it means that it is the bug of the library and have not yet had the solution yet?
yes, we are aware of the issue and will have a fix soon.
Fixed in rtc-v0.6.0