Build an android live broadcast Test Platform Based on Feng Streaming Server

Source: Internet
Author: User

Because Android does not have an HTTP live streaming client-to-end solution (to provide massive services) like the iPhone, open-source Feng (http://lscube.org/feng,mp4 (h264 + AAC) is currently used )) setting up an RTSP/RTP live video server for testing, Feng is easy to add a new media file parser compared with the advantages of streaming media servers such as Darwin and live555, based on the demux_avf.c structure, you can use ffmpeg api to Demux different container media files (such as Avi, 3GP, and mov) and upload the audio and video data to the client separately.

1. Install Feng streaming server's dependent libraries first

1) install glib-2.20.0,./configure -- prefix =/usr & make & sudo make install

2) install AAC codec faac/faad2 (http://www.audiocoding.com/downloads.html)./configure -- prefix =/usr, make & make install

3) install ffmpeg-0.6./configure -- prefix =/usr -- enable-libfaac -- enable-GPL -- enable-libfaad -- enable-nonfree cxxflags =-d1_stdc_constant_macros, make & sudo make install

4) install libev-4.01,./configure = prefix =/usr make & sudo make install

5) install netembryo-0.1.1,./configure -- prefix =/usr make & make install

 

2. Install feng-2.1.0_rc1. and flux-1.1 (./configure -- prefix =/usr, make & make install)

Feng is responsible for RTSP/SDP/RTP protocol resolution and RTP encapsulation of audio and video data. flux is responsible for managing RTP live streams, such as ing the real-time data stream of cameras to a port, flux-c udp: // 2900 * live * MQ: // audio-c udp: // 2902 * live * MQ: // video

 

3. Start Feng. If you transfer a media file, directly put the file to/usr/var/Feng/avroot.

Sudo Feng-V displays the following information, indicating that the startup is successful:

Feng-Feng 2.1.0 _ RC1
Lscube project-Politecnico di Torino
[Fri Dec 24 00:05:04 2010] listening to port 554 (TCP) on all interfaces
[Fri Dec 24 00:05:04 2010] [Warning] cannot get group Feng ID, success
[Fri Dec 24 00:05:04 2010] [Warning] cannot get user Feng ID, success
1) Use the VLC player to test the RTSP connection:

The complete RTSP Protocol control process (options, describe, setup, and play) can be clearly seen through Feng's log information. In the options stage, the media parameter information is transmitted mainly through the SDP protocol, for example, the payload type of h264 is 96 (A = rtpmap: 96 h264/90000)

2) You can use the android Test Program (using the videoview control to implement a media player) on the client to start playing the video.

 

Updating ....

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: info-contact@alibabacloud.com 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.