IOS: rtmp-based video push stream

Source: Internet
Author: User
Tags install homebrew

IOS RTMP -based video push stream

First, the basic introduction

iOS live a birth, immediately fiery not, a variety of live platforms springing up, because of this, also led to the rapid development of live broadcasting technology, in the IT industry proficient in live technology monkeys are very valuable. Broadcast technology involves a wide range of knowledge, the most important is probably the following: soft and hard decoding. H264, beauty processing, push-streaming rtmp, pull stream playback, video recording, send bomb screen, instant messaging.

Second, common technology

    • Soft and hard decoding. H264: After using iOS8.0, Apple's Open source Videotoolbox, which is the reason why many live software is the lowest compatible iOS8
    • Beauty treatment: Cpuimage, built-in more than 150 kinds of filters, powerful
    • Pull stream Playback: ijkplayer.framework, VLC
    • Push stream rtmp: Install nginx+rtmp server, FFmpeg push stream
    • Video recording: Uiimagepiackercontroller, Avcapturesession, Gpuimagevideocamera
    • Send barrage: Barragerenderer third-party library
    • Instant Messaging: XMPP, ring-letter, cloud-melting, etc.

Third, install the NGINX+RTMP server process, here I directly install the success, if there is a failure, please see the following reference to the original address of the second article

1, install homebrew, open the terminal, to see if the homebrew has been installed, direct terminal input command

Mans Brew

2. If your Mac is already installed, it will display help for some commands. Enter Q to exit and go directly to the second step. Conversely, if there is no installation, execute the command. You may need to enter a password here to modify the host directory read and write permissions.

Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

3, install Nginx, first clone Nginx project to the local

Brew Tap Homebrew/nginx

4. Perform the installation

Brew Install Nginx-full--with-rtmp-module

5, Nginx and RTMP module is installed, enter the command

Nginx

6, open the http://localhost:8080in the browser, view the installation results

7. After successful installation, configure Nginx and ramp to find the location of the nginx.conf file.

Brew Info Nginx-full

8. Edit the nginx.conf, add the rtmp configuration after the HTTP node

  #在http节点后面加上rtmp配置
rtmp { server { listen 1935; Application Rtmplive { live on; Record Off;}}}

9. View Nginx Version number

Nginx-v

10. Replace with your own Nginx version number, restart Nginx

/usr/local/cellar/nginx-full/1.10.3/bin/nginx-s Reload

11, installation FFmpeg, probably more than 50 m, it is recommended to turn or wall installation, I turn or wall installation quickly succeeded.

Brew Install FFmpeg

12. Install a video player that supports RTMP protocol VLC

HTTPS://GITHUB.COM/VIDEOLAN/VLC

13, FFmpeg Push the stream, prepare a local video file

  Ffmpeg-re-i  /users/xiayuanquan/desktop/movie.mp4-vcodec Libx264-acodec aac-strict-2-F FLV rtmp://localhost:193 5/rtmplive/room

14, the video is pushed to the server, open VLC, and then File->open network-> input, to achieve the effect please see the following reference to the original address of the second article

Rtmp://localhost:1935/rtmplive/room

Third, reference the original address

1, videotoolbox:http://www.jianshu.com/p/a6530fa46a88

2, based on RTMP push stream: http://www.jianshu.com/p/8ea016b2720e (the Bo master Monkey_alin Jane wrote great, benefited, thanks)

3, GitHub: Full version of the video Live: Meow (the blogger Monkey_alin the GitHub address on the book)

4, gpuimage:http://www.cnblogs.com/xyq-208910/p/5859683.html

5, ffmpeg:http://www.cnblogs.com/xyq-208910/category/742527.html

6, ijkplayer:http://www.cnblogs.com/xyq-208910/p/5856815.html

IOS: rtmp-based video push stream

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: 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.