You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed there are video_frame_callback and audio_frame_callback in the Callbacks. Is there a way to deal with both video and audio in a single callback? My intention is to process the input audio, and transform it into a streaming video, is there any work-around to deal with that?
Thanks very much !!!
The text was updated successfully, but these errors were encountered:
Unfortunately it's not supported to handle both types of input in a single callback due to WebRTC's nature that video and audio tracks are streamed separately and asynchronously.
To do what you described, you have to continue using 2 types of callbacks and write the "bridging" code.
I might be something like this, while I'm writing this without real coding/testing so I can't ensure it works:
Prepare a thread-safe data transmitting object, e.g. data_queue = queue.Queue().
Push data from the audio callback, e.g. data_queue.put(some_data)
I noticed there are video_frame_callback and audio_frame_callback in the Callbacks. Is there a way to deal with both video and audio in a single callback? My intention is to process the input audio, and transform it into a streaming video, is there any work-around to deal with that?
Thanks very much !!!
The text was updated successfully, but these errors were encountered: