Android Live streaming, playback for Android

Source: Internet
Author: User
Tags flv file
<span id="Label3"></p><p><p>Recently want to achieve an Android live, but for this aspect of the data are relatively fragmented, initially intended to use FFMPEG to achieve the code push stream, during the collection of data, found a few powerful open source libraries, directly avoid the JNI code, integrated only with a small amount of Java code can be encoded, Push stream and fetch stream play, organize a bit and do a demo, here to record</p></p><p><p>:<br></p></p><p><p>Coding and push flow, there are two options:</p></p> <blockquote> <blockquote> <p>One:<br>Using JAVACV to achieve, and eventually used ffmpeg to encode and push the stream, JAVACV to achieve direct access to the camera frame data<br>The code that needs to be implemented on its own is simply to turn on the camera, write a preview of the surfaceview, and then implement Previewcallback to give JAVACV the data for each frame of the camera<br>JAVACV address: HTTPS://GITHUB.COM/BYTEDECO/JAVACV<br>Demo Address: Https://</p> <p>Two:<br>Using Android's own encoding tool, can be hard-coded, there is a domestic big God Open-source package is a well-developed library yasea, the first method needs to implement the camera acquisition part is packaged together, to carry out some simple configuration can realize the coded push stream, And Yasea currently has direct support for the Camera's eager swap, and various filter effects<br>Yasea address (built-in demo): Https://</p> </blockquote> </blockquote><p><p>Server</p></p> <blockquote> <blockquote> <p>Streaming media server I'm using srs, project Address: Https://<br>About the SRS compilation, configuration, deployment, in the official wiki has been written in detail, and SRS is also a domestic developer open source projects, with all Chinese documents, it seems very convenient<br>Here is the most basic simple compilation deployment process for Android Live streaming (ii) SRS Streaming Media Server deployment</p> </blockquote> </blockquote><p><p>Player</p></p> <blockquote> <blockquote> <p>Android play using vitamio, or the domestic open-source player, is not feeling the domestic predecessors more and more Dick ^~^!<br>Vitamio supports almost all common video formats and streaming protocols<br>Vitamio address (built-in demo): Https://</p> </blockquote> </blockquote><p><p>The Yaesa library is used here to introduce the flow of live implementation:<br>One: using Yaesa for Camera capture, encoding and then streaming to the SRS server rtmp<br>Two: deploying an SRS streaming media server<br>Three: use Vitamio to stream playback</p></p><p><p>Coded and pushed streams have been integrated, demo Address:</p></p>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.