nginx general information

nginx general information

By default it installs to /usr/local/nginx, so to start the server run the following command:

$ sudo /usr/local/nginx/sbin/nginx
And to test to make sure nginx is running, point your browser to http://<your server ip>/ and you should get the "Welcome to nginx!" page.

Step 3: Configuring nginx to use RTMP

Open your config file, located by default at /usr/local/nginx/conf/nginx.conf and add the following at the very end of the file:

Code | Analyze
rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
}
}
}
This is an extremely basic configuration with a "live" application that simply forwards the RTMP stream on to whoever requests it. You can play with it some more later. Here's the whole configuration guide, which shows you how to forward streams to other places (such as Twitch), save recordings of uploads, output stats, etc.

Restart nginx with:

$ sudo /usr/local/nginx/sbin/nginx -s stop
$ sudo /usr/local/nginx/sbin/nginx
Step 4: Testing!

Your server should now be ready to accept RTMP streams! Let's try it out.

Create a new profile in OBS, and change your Broadcast Settings thusly:

Streaming Service: Custom
Server: rtmp://<your server ip>/live
Play Path/Stream Key: test
You may be wondering where that play path "test" came from. Well, we just made it up, just now. You can basically make up any play path and stream to it, and put that path into an RTMP player, and it will play back. For simple purposes, authentication isn't necessary in my experience.

You should now be able to start streaming to your server. If you hit "Start Streaming" and don't get an error from OBS, that's a good sign.

So how do you watch it? Personally, I have been using vMix to play back RTMP streams and incorporate them into my own stream. If you just want to play back the stream that's being uploaded, you can do so with VLC 2.1.0 or later. Just Open a Network Stream and enter in rtmp://<your server ip>/live/test as the URL. If it all worked right, then you should now be seeing your stream in VLC!

You now have a working RTMP server! Congrats!

What now?

You can use the video source plugin to add an RTMP stream to OBS itself, or use something like JWPlayer to play back the RTMP stream on a web site you set up.

You can also use your RTMP server to forward to other streaming services and channels! Underneath the "record off;" line in your nginx.conf, add the following:

push rtmp://<other streaming service rtmp url>/<stream key>
And any stream streamed to that application will be forwarded on to the other service, as well as being served up from the server! You can add multiple "pushes" to forward the stream to multiple locations.
    • Related Articles

    • General eMail Support Policies

      Please be aware that Cartika does not support Mass eMailing in ANY capacity without all the various legislations being adhered to (including, but, not limited to the CAN-SPAM and Canada’s Anti-Spam Law) As a general policy, Cartika does not support ...
    • Editing Primary Contact Information

      To change or update primary contact information for an account: 1. Log into accounts.cartika.com 2. Navigate to account > Edit Details 3. Make any necessary changes and save 
    • Advanced CDN Options. HTTPS/SSL,NGINX Settings,Video Streaming and more

      Log into your https://accounts.cartika.com Manage your Cartika CDN service and choose the "hostname" you wish to work with Click on the advanced settings icon Functions include Granular Country Access allow/deny Hotlink policy with advanced ...
    • Email Setup With Office 365 - No Field To Add A Username Issue

      See  article: https://superuser.com/questions/1391960/how-to-enter-username-of-imap-account-in-outlook-2016 Currently in Office 365 when a user attempts to add a new email account, the username field for the email address is not present. The user is ...
    • Integrate Cartika CDN with Wordpress

      How can you integrate CDN with Wordpress? Installation Of CDN Plugin Login to the Wordpress Admin Panel. Navigate to Plugin page then click on Add New. Insert W3 Total Cache into the search field. Install W3 Total Cache and activate it. Migrate ...