nginx-rtmp – Configuration and possible solutions

RobinJack0r

Checkout: youtube.com/RobinJack0r | twitter.com/RobinJack0r | twitch.tv/Jack0r

You may also like...

23 Responses

  1. Mauro Italy says:

    hello, I am mauro Italy and impressed me your post on comilazione of nginix for windows. Unfortunately I could do everything with exception of the last part of the console with the command MakeInstall Visul study … etc.
    Let me clarify:
    Ranked # 1 computer – windows 8.1 64bit – (192.168.0.5) + “Open Broadcaster Software” streaming live: rtmp: // localhost / live1 / StreamKEY
    Computer Ranked # 2 – windows 8.1 32bit – (192.168.0.6) + Internet explorer 11 for receiving streaming
    Computer No.3 – raspberry pi with VLC player to receive streaming
    I ask if you can send me the program nginix already filled with RTMP module to perform receiving streaming from “Open Broadcaster Software”.
    Sorry to ask but do not know how to fix it! I hope you’ll help me! Mauro

  2. Mauro Italy says:

    hello, I am mauro Italy and impressed me your post on nginix for windows. Unfortunately I could do everything with exception of the last part of the console with the command MakeInstall Visul study … etc.
    Let me clarify:
    Ranked # 1 computer – windows 8.1 64bit – (192.168.0.5) + “Open Broadcaster Software” streaming live: rtmp: // localhost / live1 / StreamKEY
    Computer Ranked # 2 – windows 8.1 32bit – (192.168.0.6) + Internet explorer 11 for receiving streaming
    Computer No.3 – raspberry pi – (192.168.0.7) – with VLC player to receive streaming
    I ask if you can send me the program nginix already filled with RTMP module to perform receiving streaming from “Open Broadcaster Software”.
    Sorry to ask but do not know how to fix it! I hope you’ll help me! Mauro

  3. Rezan says:

    Hello,
    can you give me the full nginx.conf file that you use it?

  4. Rezan says:

    i installed the server some you explain but i have a problem with nginx.conf
    i want the right sitting for re-stream an rtmp ot http

  5. Rezan says:

    Thanks for this guide
    i hane a question
    how can i re-stream an ts http stream or rtmp m3u8 stream?

  6. Manhim says:

    I tested this and it doesn’t seem to be working from me. When I run the avconv command manually (While streaming to live1) I get the following:

    Invalid data found when processing output

    manhim@Manhim-Server:/usr/local/nginx$ avconv -i rtmp://127.0.0.1/livein/Manhim -c:v libx264 -preset veryfast -b:v 2200k -bufsize 4400k -c:a copy -s 1280×720 -r 30 rtmp://127.0.0.1/liveout/Manhim
    avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
    built on Aug 10 2014 18:16:02 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
    RTMP_ReadPacket, failed to read RTMP packet header
    rtmp://127.0.0.1/livein/Manhim: Invalid data found when processing input

    • Manhim says:

      I think it’s because I’m not supposed to run avconv by itself. But in the debug logs I only get

      2014/12/31 17:29:13 [info] 403#0: *13 send() failed (104: Connection reset by peer), client: 127.0.0.1, server: 0.0.0.0:1935

      each times the avconv process is trying to start.

      • RobinJack0r says:

        You might want to try grabbing the latest ffmpeg binaries for your system and test with those. avconv often gave me problems and I heard even the ubuntu people are considering to go back to ffmpeg.

  7. Jan says:

    Is it possible to publish the RTMP streams on the internet?

    I set up my own Nginx server with Ubuntu Server, like shown in this and in your previous video, got a DynDns and forwarded the ports 1935 an 80 in my router to the streaming server. The problem is, that i can only stream inside my own network. the jwplayer on the internet doesn’t do anything at all but saying that he can’t connect to the stream after a long while. Any suggestions??

    the example path for the internet should be “rtmp://dyndns.adress:1935/appname/flv:streamkey” or is the mistake in there?

    Thanks

  8. Azaleo says:

    Hello

    I am using a Raspberry pi box.

    have installed nginx-rtmp.

    Nginx is ok, since I can view the welcome to nginx welcome page.

    In my OBS, i set Broadcast Settings to
    Stream Service : Custom

    FMS URL :
    rtmp://192.168.0.186/live, I also tried
    rtmp://192.168.0.186:1935/live

    path Key: trial

    The OBS stream look fine, i can see the status below.

    but when I viewed it using VLC, nothing happens it does not load the stream.

    Did I miss any setup?

    Regards
    Leo

    • RobinJack0r says:

      Hmm, no, if OBS streams fine, no dropped frames, and the bitrate counter shows that it sends data, you should be able to watch the stream using:
      rtmp://192.168.0.186:1935/live/trial

      nginx.conf should have an app called live and the rtmp port should be set to 1935 or not set (default)

      • Azaleo says:

        Hello RobinJack0r,

        I’v been trying to respond earlier, but i can’t post, it will download a php file when i click Post Comment.
        I hope this one works now.

        anyway.

        on my OBS the FMS url is rtmp://192.168.0.186/live/,

        when i press start streaming, the wifi on my Raspberry Pi is blinking, it might indicate OBS is sending data.

        I just stream a slideshow, and i didnt encounter any error message at all.

        In the Status bar located below the OBS, here’s what I saw.

        0.28:50(Live) Dropped Frame : 79(0.15%) FPS:30 1016ks/s

        I think with that status, it is transferring data to Rpi.

        on VLC(from another PC)

        I Open a Network Stream and entered rtmp://192.168.0.186/live/
        –nothing happens, it just displays a black screen

        if I enter rtmp://192.168.0.186/live/trial
        it gives me an error like
        VLC does not support the audio or video format “undf”. Unfortunately there is no way for you to fix this.

        what do you think is the problem?

        • RobinJack0r says:

          Hmm in general I would always recommend to define a streamkey/playpath
          so I normally put the FMS url like rtmp://192.168.0.186/live
          and playpath “trial” for example, without the quotes.
          The few dropped frames in OBS are normal and can happen sometimes, even in a local network, but in vlc it should then be able to play the stream using
          rtmp://192.168.0.186/live/trial (as you tried). Alternatively also add the port to the address: rtmp://192.168.0.186:1935/live/trial

  9. Panicos says:

    Dear,
    I have installed nginx latest version on ubuntu dedicated server with rtmp module.
    I have Teradek Vidiu and push live streaming.
    My application start but when, for some reason, (usually bandwidth) , stops, does not reconnect automatically . In my Vidiu i have error : Failed:Please Verify Username And Password.
    When i stop/start nginx stream comes live again.
    Do you have any idea ?

  10. Jjeremy says:

    I follow your video to the letter and for some reason the stream on both services (twitch and hitbox) lags or skips every few seconds.. now I am doing this on a 6 core amd at 4ghz with a 15mb upstream. I’m only using 3000 bitrate/buffer and am capping at 720p60fps.. Any ideas?

    • RobinJack0r says:

      Hmm, you will have to test if its nginx or connection related. I can only test 2000bitrate per stream with my 5mb upload but had quite some success with that so far. You could test with ffmpeg just copying the stream input and sending it. If that works fine your connection is out of the question. But you would then have to ask arut or the nginx support for some more help. They might be able to pinpoint the reason.