[rtmpdump] [PATCH] RtmpSrv, support other ports

Steven Penny svnpenn at gmail.com
Wed Jun 27 11:16:44 CEST 2012


Current RtmpSrv works with port 1935. It was brought up and shot down horribly
back in December
http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-December/001739.html
I came across a site using 19350 and this patch worked well. If you have
environment variable set RTMPPORT, it will use it; otherwise default to 1935.
Something like "export RTMPPORT=19350" should work in Bash.
---
 rtmpsrv.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/rtmpsrv.c b/rtmpsrv.c
index 9aa62f3..a44731b 100644
--- a/rtmpsrv.c
+++ b/rtmpsrv.c
@@ -1077,6 +1077,8 @@ main(int argc, char **argv)
 
   char *rtmpStreamingDevice = DEFAULT_HTTP_STREAMING_DEVICE;	// streaming device, default 0.0.0.0
   int nRtmpStreamingPort = 1935;	// port
+  if (getenv("RTMPPORT"))
+    nRtmpStreamingPort = atoi(getenv("RTMPPORT"));
 
   RTMP_LogPrintf("RTMP Server %s\n", RTMPDUMP_VERSION);
   RTMP_LogPrintf("(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL\n\n");
-- 
1.7.9



More information about the rtmpdump mailing list