(turn) Mac build local Nginx server based on rtmp error Homebrew/nginx was deprecated. This tap was now the empty as all its form

Source: Internet
Author: User
Tags deprecated install brew nginx server

Original address: 80063031

Recently built a local nginx server based on rtmp, did not expect the first step cloning error: Homebrew/nginx was deprecated. This tap was now the empty as all its formulae were migrated. Specific as follows:

The first step is to use:

Add Nginx clone to local $ brew tap Homebrew/nginx

The error is as follows:

The reason for this is that Homebrew/nginx's git path has changed (seemingly March 2018 update)

The lookup gets the clone to local command changed to be resolved and changed to:

brew tap denji/homebrew-nginx

The clone succeeds and then executes the second step:

Installing Nginx

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

The results are as follows:

Follow the prompts to perform:

brew unlink nginx

Execution succeeds, the total above steps are:

    1. Clone to local brew tap Homebrew/nginx
    2. Unlink Brew unlink Nginx
    3. Install Brew Install Nginx-full--with-rtmp-module
    4. Start Nginx

Path to the configuration file (/usr/local/etc/nginx/nginx.conf)

1> configuration Nginx, support HTTP protocol pull stream

    1. Location/hls {
    2. #Serve HLS Config
    3. Types {
    4. Application/vnd.apple.mpegurl m3u8;
    5. VIDEO/MP2T ts;
    6. }
    7. root/usr/local/var/www;
    8. Add_header Cache-control No-cache;
    9. }

2> configuration Nginx, support RTMP protocol push stream

    1. rtmp {
    2. server {
    3. Listen 1935;
    4. Application Rtmplive {
    5. Live on;
    6. Max_connections 1024;
    7. }
    8. Application hls{
    9. Live on;
    10. HLS on;
    11. Hls_path/usr/local/var/www/hls;
    12. Hls_fragment 1s;
    13. }
    14. }
    15. }

3> restart

nginx -s reload

Push Flow Test
    • Push stream to Rtmp to server
      • Generated Address: Rtmp://localhost:1935/rtmplive/demo
        ffmpeg -re -i story.mp4 -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 rtmp://localhost:1935/rtmplive/demo
    • Push stream to HLS to server
      • Generated Address: http://localhost:8080/hls/test.m3u8
        ffmpeg -re -i /Users/apple/Desktop/ffmepg/story.mp4 -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 rtmp://localhost:1935/hls/demo

(turn) Mac build local Nginx server based on rtmp error Homebrew/nginx was deprecated. This tap was now the empty as all its form

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.