• 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 , https://github com/upggr/greektv upg gr , audio streaming nginx , Video/Audio on demand explanation

This Article Has Been Shared 378 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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)

  • Cloud Computing and Designing Own Truly Scalable System

    Cloud Computing becomes fully enjoyable if it is arranged to make a scalable system for the application or CMS or any web software including WordPress.

  • Protection of Data by Data Loss Prevention and Encryption

    Protection of Data by data loss prevention and encryption is a key element in a cloud environment.This applies to data stored on a server and transport of data.

  • What is Important in Single Sign-On Solutions

    Single Sign-On (SSO) can unify the access control, even for the mobile apps, cloud computing Platforms and social networks. But what we must know about SSO?

  • PubSubHubbub and Rackspace Cloud Queue

    PubSubHubbub is a networking protocol. Rackspace is Open Source but infamous for difficult to understand API documentation by normal human.

  • How to Upload Backup to Dropbox from Cloud Server

    Here is How to Upload Backup to Dropbox from Cloud Server in Case You Want To Keep Your Backup of Files and Database on a Free Cloud Storage.

Additionally, 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Domain-Driven Design (DDD)? January 23, 2021
  • Top 10 Anti Hacking Software for Microsoft Windows January 22, 2021
  • What is Software Modernization? January 21, 2021
  • Cloud Computing : Cybersecurity Tips for Small Business Owners January 20, 2021
  • Arduino : Independently Blink Multiple LED January 18, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Streaming Video, Audio on Demand with Nginx (HP Cloud)," in The Customize Windows, August 15, 2015, January 24, 2021, https://thecustomizewindows.com/2015/08/streaming-video-audio-on-demand-with-nginx-hp-cloud/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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