arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.34k stars 3.5k forks source link

ffmpeg play version higher than 1.12.0 #1762

Open dbc-ca opened 2 months ago

dbc-ca commented 2 months ago

I am experiencing an issue with the nginx-rtmp-module on Nginx versions newer than 1.20.2. When using ffmpeg or ffprobe, the playback of the RTMP feed hangs and does not function correctly on versions from 1.21.0 to 1.27.0. However, the playback works as expected on Nginx 1.20.2.

Server Setup: OS: Ubuntu Server 24.04 Nginx Versions: 1.20.2 and 1.27.0 installed concurrently RTMP Module: Latest version from GitHub FFmpeg: Installed via dpkg

When using ffmpeg or ffprobe to interact with the RTMP feed on Nginx versions from 1.21.0 to 1.27.0, the playback command results in a hang. This behavior is not observed with Nginx 1.20.2, where ffmpeg and ffprobe interact with the RTMP feed without any issues.

Tested Multiple Nginx Versions: Verified that Nginx 1.20.2 works correctly with the RTMP module and ffmpeg. Tested each version from 1.21.0 to 1.27.0 and found that the issue persists, with ffmpeg or ffprobe hanging when attempting to play the RTMP feed.

Concurrent Version Setup: Due to the need for a stable RTMP streaming solution, I have configured my server to run both Nginx 1.20.2 (for RTMP) and Nginx 1.27.0 (for HTTP, HTTPS, and RTMPS). Nginx 1.20.2: Handles RTMP streams because of the need to overlay a logo on the feed using ffmpeg, which works only on this version. Nginx 1.27.0: Handles other HTTP, HTTPS, and RTMPS traffic.

To maintain functionality, my current workaround involves running two versions of Nginx concurrently: Nginx 1.20.2 in /usr/local/nginx-1.20.2 with the configuration file at rtmp.conf for handling RTMP streams. Nginx 1.27.0 in /usr/local/nginx-1.27.0 with the configuration file at /nginx.conf for handling HTTP, HTTPS, and RTMPS(stream) traffic.

This setup ensures that the RTMP feed with logo overlaying works correctly while still utilizing the latest features and security updates of Nginx 1.27.0 for other types of traffic. Request for Assistance

I would appreciate any insights or solutions to resolve the issue with ffmpeg/ffprobe hanging on Nginx versions newer than 1.20.2. If there are any known fixes or workarounds that could be applied to make the RTMP module work correctly with newer versions, it would greatly improve our setup and allow us to consolidate to a single version of Nginx.

Thank you for your support.

TyroTechSoft commented 1 month ago

I have the same problem. How did you install nginx 1.20.2 on Ubuntu 24.04? That would help me a lot.

Thank you!