• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Streaming Video, Audio on Demand with Nginx (HP Cloud)

By Abhishek Ghosh August 15, 2015 9:40 pm Updated on August 15, 2015

Streaming Video, Audio on Demand with Nginx (HP Cloud)

Advertisement

Here is a Very Easy Guide For Streaming Video, Audio on Demand with Nginx on HP Cloud Using RTMP Protocol, Which is Needed For YouTube Live. This guide does not requires VLC Player unlike we described before, Wowza Player or any other web software. This is very easy and highly scalable. We are using Nginx Community Edition. Nginx Plus has some extra features for streaming. RTMP Protocol is Real Time Streaming Protocol. VLC Player supports RTMP protocol so you can play to test it directly from VLC menu > Media-> Open Network Stream.

Google servers will catch the stream and Geographically distribute for Free of cost. We are basically magnifying 1 GB server to huge resource plus the chance of money making is present on YouTube Live.

 

Streaming Video, Audio on Demand with Nginx : Pre-requisite For HP Cloud

 

We have written the guide for Ubuntu server 14.04 LTS. However, it is basically server OS independent. Real Time Messaging Protocol (RTMP) is a TCP-based protocol which maintains persistent connections and is defined as a stateful protocol. HTTP is a stateless application protocol.

Advertisement

---

As we need to open Port 1935, you should configure the virtual router in HP Cloud rightly and set proper ingress-egress policy.

 

Streaming Video, Audio on Demand with Nginx : Compatibility With Rackspace Cloud

 

Rackspace Cloud is not intent ended for corporate setup, hence has no virtual router by default. Readers need not to follow the Pre-requisite For HP Cloud paragraph written above. However, their operating system can block via Firewall. Test with VLC player.

 

Streaming Video, Audio on Demand with Nginx : Commands

 

You can check this git which has ready to use 1 step command to run a bash script to do the works :

Vim
1
https://github.com/upggr/UPG.GR-MEDIA-SERVER

The git is good but needs some work, has no clear cut License. It is your matter use or not use. We have to describe in classical way. For so few commands, you may use the commands & use the settings files from the git.

nginx-extras comes with Nginx RTMP module, so you do not need to compile & build from source. After login to the server via SSH as root user, just install nginx-extras :

Vim
1
apt-get install nginx-extras

If you want to compile from source then run :

Vim
1
2
3
4
5
6
7
8
9
apt update -y && apt upgrade -y
apt-get install git gcc make libpcre3-dev libssl-dev
cd ~ && mkdir nginx
cd nginx && git clone https://github.com/arut/nginx-rtmp-module
# check nginx latest - http://nginx.org/en/download.html
wget http://nginx.org/download/nginx-1.8.0.tar.gz && tar zxpvf nginx*
cd nginx* && ./configure --add-module=/root/nginx/nginx-rtmp-module/ --with-http_ssl_module --prefix=/usr/local/nginx-streaming/
make
make install

Streaming Video, Audio on Demand with Nginx (HP Cloud)

We have tested with compiled version, so :

Vim
1
2
cd /usr/local/nginx-streaming/conf && mv nginx.conf nginx_config.backup
nano nginx.conf

Like normal web server, we need to set it rightly :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
user www-data;
worker_processes  1;
events {
    worker_connections  1024;
}
rtmp {
    server {
        listen 1935;
        chunk_size 4000;
        # vod for flv files
        application vod {
            play /var/flvs;
        }
        # vod for mp4 files
        application vod2 {
            play /var/mp4s;
        }
    }
}
# HTTP can be used for accessing RTMP stats
http {
    include       mime.types;
    default_type  application/octet-stream;
 
    sendfile        on;
    keepalive_timeout  65;
    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log debug;
    server {
        # normal web server on port 80
        listen      8080;
        server_name  localhost;
        # RTMP statistics in XML
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
        location /stat.xsl {
            # Copy stat.xsl wherever you want
            # and put the full directory path here
            root /var/www/;
        }
        location /hls {
            # HLS fragments
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            alias /tmp/app;
            expires -1;
        }
    }
}

Then copy the xml file :

Vim
1
mkdir /var/www && cp /root/nginx/nginx-rtmp-module/stat.xsl /var/www/

Restart nginx web server. If you wget some FLV files at /var/flvs, you will see on this path it is streaming :

Vim
1
rtmp://IP.OF.THE.SERVER:1935/vod2/yourfile.flv

Base is usually /vod2/ but you probably need checking the Git of the module for more settings :

Vim
1
2
https://github.com/arut/nginx-rtmp-module/wiki/Getting-started-with-nginx-rtmp
https://github.com/arut/nginx-rtmp-module

Tagged With acessórios para câmeras dsmc , Video on demand with nginx , streaming video nginx , streaming con nginx demanda , stream ondemand audio from dropbox , paperuri:(f33407c5ed3692fdfd08393362db1bb8) , nginx video streaming , nginx stream avi video , https://github com/upggr/greektv upg gr , audio streaming nginx
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Streaming Video, Audio on Demand with Nginx (HP Cloud)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • Streaming Video and Audio from Server using VLC Player Video Guide

    Streaming Video and Audio from Server using VLC Player Video Guide shows how to configure Rackspace Cloud Server with VLC Player to stream your Audio or Video.

  • Nginx Cache Purge With nginx-extras Apt & Yum Repo

    Those who do not want to build Nginx from source to get Nginx Cache Purge Module Can Test Official apt or yum version of nginx-extras version.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy