Using nginx + nginx-rtmp-module + ffmpeg to build a streaming media server note (5)

Source: Internet
Author: User
: This article mainly introduces how to use nginx + nginx-rtmp-module + ffmpeg to build a streaming media server (5). If you are interested in the PHP Tutorial, refer to it. Part 5

Some time ago, we set up a streaming media server that supports HLS on Ubuntu. The final goal was to build such a streaming media server on the arm Development Board. Now the job is only a small part. we are porting and recording it so that we can continue to do it later.

1. First, we need to Port nginx to the arm Development Board.

Someone has already done this and can use other people's projects.

Https://bitbucket.org/ntakimura/android-nginx/src/c80cb9c41a725ecf57f73a196735100aeef5b6e4? At = android

This is an open-source android-nginx project and continues development.

2. after downloading the original code, follow the steps above:

First, make sure that the NDK environment is available and call the tool chain of the NDK.

Android ndk provides scripts that allow you to customize a tool chain by yourself:

$NDK_HOME/build/tools/make-standalone-toolchain.sh \    --platform=android-14 --install-dir=$HOME/local/android-toolchain
NDK_HOME is your NDK path.

3. according to its second step, the project's official website says:

auto/configure \    --crossbuild=android-arm \    --prefix=/sdcard/nginx \    --with-cc=$HOME/local/android-toolchain/arm-linux-androideabi/bin/gcc \    --without-pcre --without-http_rewrite_module --without-http_userid_module \    --with-cc-opt=-Wno-sign-compare
However, when running the command in the upper directory of auto, an error is prompted and gcc cannot be found. Therefore, modify the following command:
auto/configure \    --crossbuild=android-arm \    --prefix=/home/wangrui/arm-nginx \    --with-cc=/home/wangrui/local/android-toolchain/bin/arm-linux-androideabi-gcc \    --without-pcre --without-http_rewrite_module --without-http_userid_module \    --with-cc-opt=-Wno-sign-compare
Because make and make install will be in the root directory in the future, the HOME directory in the command is changed to my directory/home/wangrui/

4. if there is no error, it can be completed smoothly, and then make, make install

5. copy arm-nginx to android SDCARD.

When copying a file, you may have permission issues and cannot copy the file. modify the arm-nginx folder permission:

chmod 777 arm-nginx -R
-R indicates that the subfolders and files in the folder are also modified.

6. connect the mobile phone to the data cable, enable the USB mode, and install the adb tool.

sudo apt-get install android-tools-adb

7. go to the SDK Directory. my options are/home/wangrui/java/sdk/platform-tools.

Run the following command:

adb shell
Will enter the mobile phone and execute the command:
cd sdcard
Go to the SD card and find the arm-nginx directory.

8. the complete command is:

cd sdcard/arm-nginx/sbin/ 

Run
./nginx
Error message:
nginx: [alert] could not open error log file: open() "/home/wangrui/arm-nginx/logs/error.log" failed (2: No such file or directory)2015/02/12 16:16:26 [emerg] 4079#0: open() "/home/wangrui/arm-nginx/conf/nginx.conf" failed (2: No such file or directory)
File Not Found. modify the command:
./nginx -p /sdcard/arm-nginx/ -c /sdcard/arm-nginx/conf/nginx.conf
Execution error:
nginx: [emerg] getgrnam("nogroup") failed (2: No such file or directory)
I still don't know how to modify it. I recorded it here today. due to the fast annual leave, it is easy to continue later ......

If you have encountered such a situation, I am enlightened by my predecessors!

Thanks.

The preceding section describes how to use nginx + nginx-rtmp-module + ffmpeg to set up a streaming media server (5), including some content. I hope my friends who are interested in the PHP Tutorial will be helpful.

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.