icy-nightfall-64225
08/07/2025, 7:58 AMtall-airline-16756
08/07/2025, 7:58 AMtall-airline-16756
08/07/2025, 7:59 AMicy-nightfall-64225
08/07/2025, 8:00 AMawait self.room.local_participant.publish_track(self._video_track)
self._video_source.capture_frame(
frame=self._image_frame,
timestamp_us=int(datetime.datetime.now(datetime.UTC).timestamp())
* 1000000, # Convert to microseconds
)
tall-airline-16756
08/07/2025, 8:01 AMargb_frame = bytearray(WIDTH * HEIGHT * 4)
while True:
# Update frame content
frame = rtc.VideoFrame(WIDTH, HEIGHT, rtc.VideoBufferType.RGBA, argb_frame)
source.capture_frame(frame)
• Proper Resource Cleanup: Make sure to close your video streams properly after you're done to free up memory: if video_stream:
await video_stream.aclose()
Following these steps should make managing memory a bit smoother when you're publishing your local image to a video track. If you have any questions or need a hand with anything else, just let me know! Sources: examples/publish_hue.py | Vision Agent Quickstart | LiveKit Docs