[Streaming media] Android real-time video collection/encoding/transmission/decoding/playback-Solution Research (initial)
Skyseraph Mar 23rd 2012
Email: zgzhaobo@gmail.com QQ: 452728574
Real-Time Video Stream collection
Solution 1: Set setpreviewcallback in Android camera shooting preview to implement the onpreviewframe interface to capture video stream data of each frame in real time
Solution 2: Use mediarecorder of Android to bind localsocket to the setoutputfile function.
Solution 3: Use the Streaming Media Server to obtain the camera video by using FFMPEG or getstreamer.
Solution 4: To be supplemented...
Compression encoding
Solution 1: Without encoding, the original yuv420sp video frame is transmitted directly through the socket.
Solution 2: JPEG: Convert the original yuv420sp video frame compression to JPEG format, and transmit
Solution 3: H.264/AVC. compress the original yuv420sp video frame to H.264 for further transmission.
Common open-source Encoder Based on h264 include JM, x264, t264, hdot264, etc.
Solution 4: mpeg4. compress the original yuv420sp video frame to MPEG4 for further transmission
Solution 5: To be supplemented...
Transmission
Solution 1: Socket Transmission
Solution 2: HTTP Transmission
Solution 3: RTP/RTSP Transmission
Solution 4: streaming media servers, such as live555
Solution 5: To be supplemented...
Decoding
Decoder corresponding to the Encoding
Video Playback
Solution 1: Use Android videoview
Solution 2: Android mediaplay
Solution 3: directly paste the frame chart through the canvas
Solution 4: To be supplemented...
Repair