Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from urllib.parse import parse_qs, urlparse

import aiohttp
import cv2
import numpy as np
from loguru import logger as _logger
from PIL import Image
Expand Down Expand Up @@ -711,7 +710,7 @@ async def _stream_impl(
self,
) -> AsyncGenerator[rtc.VideoFrame | rtc.AudioFrame | AudioSegmentEnd, None]:
def create_video_frame(image: np.ndarray) -> rtc.VideoFrame:
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image = np.ascontiguousarray(image[:, :, ::-1]) # BGR -> RGB
return rtc.VideoFrame(
width=image.shape[1],
height=image.shape[0],
Expand Down
Loading