Can I user CameraX to LiveStream RTMP (or WebRTC) with Audio and Video?

399 views
Skip to first unread message

BRASA space

unread,
Oct 30, 2023, 10:35:36 AM10/30/23
to Android CameraX Discussion Group
I wonder if I can user CameraX to create a live streaming App that can live stream RTMP to my RTMP server.
Can it be done for WebRTC?

Thanks!

Kailiang Chen

unread,
Oct 30, 2023, 12:02:17 PM10/30/23
to Android CameraX Discussion Group, rui...@gmail.com
Hi, thank you for the question.

Yes, you should be able to create a live streaming app using CameraX + WebRTC.
Google Meet is 100% using CameraX as the the capturing system now.

You could use CameraX's preview usecase to produce frames and apply effects (if you need).
WebRTC provides APIs and a protocol for two peers to engage in bi-directional real-time communication.
However, CameraX don't have much expertise on video conferencing pipeline (mediarouter, peerconnection, muxer/demuxer, etc,.), 
we are just capturing and displaying the frames.

BRASA space

unread,
Oct 30, 2023, 1:27:43 PM10/30/23
to Android CameraX Discussion Group, kail...@google.com, BRASA space
Hi!
Thanks for the answer.
I'm going to look into WebRTC for Android and play with it, maybe I can write a very simple on-to-one video+audio chat and share it here.

Kailiang Chen

unread,
Oct 30, 2023, 1:34:55 PM10/30/23
to Android CameraX Discussion Group, rui...@gmail.com, Kailiang Chen
WebRTC is using RTC/RTSP, you should be able to build an online chatting app on top of it.
Yeah, let us know if you need any other help about Camera :)

Reply all
Reply to author
Forward
0 new messages