-
-
Notifications
You must be signed in to change notification settings - Fork 781
Home
rtmp-rtsp-stream-client-java is a Android library for stream audio and video to a media server in RTMP or RTSP protocols.
This library get audio and video data, encode it in AAC and H264 respectively and send it to rtsp or rtmp module to stream.
In rtsp module create a RTP packets of video and audio and send to server. In rtmp module create a RTP packets of video and audio, encapsulate it in flv packets and send to server.
This library use MediaCodec Android class to do hardware encoding.
The different of this builders is the form that you get audio and video data to encode.
-
Camera1Base (API 16+): Get audio data from microphone in PCM buffer and from camera API1 in NV21 frames.
-
FromFileBase (API 18+): Get audio data from a file decoding it in PCM data and render video decoded data in a MediaCodec inputsurface. Only video is working.
-
Camera2Base (API 21+): Get audio data from microphone in PCM buffer and from camera API2 rendering a MediaCodec inputsurface. This builder can be executed in background mode if you use a context in the constructor instead of a surfaceview.
-
DisplayBase (API 21+): Get audio data from microphone in PCM buffer and video data from device display with MediaProjection android class rendering a mediacodec inputsurface. This builder can be executed in background.