<div>Looks like this is only an issue when manually copying/pasting the command rtmpsrv produces, or when the operating system is Windows (where fork/exec is not being used).</div><div><br></div><div>Anyways, adding quotes is <i>not</i> a sufficient method of escaping characters. (And most of the other parameters suffer from this issue as well.)</div>
<div><br></div><div>Example: Calling</div><div><br></div><font class="Apple-style-span" face="'courier new', monospace">rtmpdump -r "rtmp://localhost/a\"pp/\"bl"\!"ah&echo hi.flv" -o /dev/null</font><div>
<br></div><div>will cause rtmpsrv to output</div><div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">rtmpdump -r "rtmp://localhost:1935/a"pp" -a "a"pp" -f "LNX 10,0,32,18" -y ""bl!ah&echo hi" -o ""bl!ah&echo hi.flv"</font></div>
<div><br></div><div>which is obviously wrong. (And I threw in the exclamation point because bash will react negatively to it, even if it's within quotes!)</div><div><br></div><div>-NhJm</div><br><div class="gmail_quote">
On Sun, May 20, 2012 at 1:39 PM, Steven Penny <span dir="ltr"><<a href="mailto:svnpenn@gmail.com" target="_blank">svnpenn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If the -o value from rtmpsrv contains an ampersand (&), it will be interpreted<br>
as a command separator instead of part of the filename. This can be fixed by<br>
using quotes with the value.<br>
<br>
WRONG<br>
-o sparams=id%2Citag%2Crtmpe%2Csource%2Cexpire&expire=1337537678.flv<br>
<br>
RIGHT<br>
-o "sparams=id%2Citag%2Crtmpe%2Csource%2Cexpire&expire=1337537678.flv"<br>
<br>
I have seen this on YouTube.<br>
---<br>
rtmpsrv.c | 2 +-<br>
1 files changed, 1 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/rtmpsrv.c b/rtmpsrv.c<br>
index 9aa62f3..2ab80db 100644<br>
--- a/rtmpsrv.c<br>
+++ b/rtmpsrv.c<br>
@@ -725,7 +725,7 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int<br>
argv[argc++].av_len = 2;<br>
argv[argc].av_val = file;<br>
argv[argc].av_len = av.av_len;<br>
- ptr += sprintf(ptr, " -o %s", file);<br>
+ ptr += sprintf(ptr, " -o \"%s\"", file);<br>
now = RTMP_GetTime();<br>
if (now - server->filetime < DUPTIME && AVMATCH(&argv[argc], &server->filename))<br>
{<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9<br>
<br>
_______________________________________________<br>
rtmpdump mailing list<br>
<a href="mailto:rtmpdump@mplayerhq.hu">rtmpdump@mplayerhq.hu</a><br>
<a href="https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump" target="_blank">https://lists.mplayerhq.hu/mailman/listinfo/rtmpdump</a><br>
</font></span></blockquote></div><br></div>