Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTMP push from Majestic to nginx RTMP module: size 0x0, fps 0, connection interrupts after some time #195

Open
iGraveD opened this issue Sep 9, 2024 · 1 comment
Labels
low priority Not considered without funding rtmp

Comments

@iGraveD
Copy link

iGraveD commented Sep 9, 2024

Required information

  • Camera board id: ISVP, T31X
  • OpenIPC version: 2.4.08.19-lite
  • installation method: Majestic version which came with OpenIPC

Issue description

I installed nginx with RTMP module on my server.
I set up my OpenIPC camera to push RTMP stream to the server.
In the statistics table, I see, that nginx recieves the stream, shows correct codec and bits/s.
But in size and fps columns, it shows 0x0 and 0 respectively.
Connection interrupts after some time.

Expectations

Nginx shows correct values in size and fps columns.
Connection does not interrupt.

Steps to reproduce

I followed these instructions to set up nginx. Below, I will provide necessary steps only.

On my Raspberry Pi server with Debian GNU/Linux 12 (bookworm), I installed nginx version 1.22.1 with RTMP module:

sudo apt install nginx libnginx-mod-rtmp

In the end of /etc/nginx/nginx.conf file, I added:

rtmp {
        server {
                listen 1935;
                chunk_size 4096;

                application live {
                        live on;
                        record off;
                }
        }
}

I created file /etc/nginx/sites-available/rtmp with the following contents and linked it to /etc/nginx/sites-enabled/rtmp:

server {
    listen 8080;
    server_name  localhost;

    # rtmp stat
    location /stat {
        rtmp_stat all;
        rtmp_stat_stylesheet stat.xsl;
    }

    location /stat.xsl {
        root /var/www/html/rtmp;
    }

    # rtmp control
    location /control {
        rtmp_control all;
    }
}

I created the directory structure for the new site and reloaded nginx:

sudo mkdir /var/www/html/rtmp
sudo wget https://raw.githubusercontent.com/arut/nginx-rtmp-module/master/stat.xsl -P /var/www/html/rtmp
sudo service nginx restart

On my camera, I installed OpenIPC and connected to its web interface.
In Majestic > Settings > Outgoing, I turned on Enable outgoing streams, entered rtmp://<my server IP>/live/test in Address for outgoing stream, saved the configuration and restarted Majestic.

On my server, I opened http://localhost:8080/stat with my browser.
In the statistics table, I see, that nginx recieves the stream, shows correct codec and bits/s.
But in size and fps columns, it shows 0x0 and 0 respectively.
Connection interrupts after some time.

@skilurius
Copy link
Collaborator

Might be related #189

@flyrouter flyrouter added low priority Not considered without funding rtmp labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority Not considered without funding rtmp
Projects
None yet
Development

No branches or pull requests

3 participants