<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Dave, thanks</div>

<div>&nbsp;</div>

<div>It looks like the question mark in the string I am providing is the source of the problem. I tried &quot;CommandShell new open; script: cmdLine.&quot; and saw this in the SqueakShell window. sqsh is choking on a question mark which does not happen when I run the command in a terminal window. I will work on this some more over the weekend and see if I can sort it out.&nbsp;</div>

<div>--- start ---</div>

<div>/opt/local/bin/rtmpdump -r &quot;rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&amp;av=1&amp;te=connect&amp;mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4&amp;et=1410496940&amp;fmta-token=0113a6812ab57b232f8bce347fadaa97fb51eb2b52bdf943d138aa3620ec1dd2&quot; -a &quot;a5999/e1?as=adobe-hmac-sha256&amp;av=1&amp;te=connect&amp;mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4&amp;et=1410496940&amp;fmta-token=0113a6812ab57b232f8bce347fadaa97fb51eb2b52bdf943d138aa3620ec1dd2&quot; -y &quot;mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4&quot; -o /Volumes/MediaVault/BBC/693150877.flv<br/>
[1] 51130<br/>
sqsh: av=1: command not found<br/>
[2]&nbsp;<br/>
sqsh: te=connect: command not found<br/>
[2]&nbsp;<br/>
sqsh: mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4: command not found<br/>
[2]&nbsp;<br/>
sqsh: et=1410496940: command not found<br/>
[2]&nbsp;<br/>
sqsh: fmta-token=0113a6812ab57b232f8bce347fadaa97fb51eb2b52bdf943d138aa3620ec1dd2&quot;: command not found</div>

<div>--- snip the rest ---
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, September 11, 2014 at 9:51 AM<br/>
<b>From:</b>&nbsp;&quot;David T. Lewis&quot; &lt;lewis@mail.msen.com&gt;<br/>
<b>To:</b>&nbsp;&quot;A friendly place to get answers to even the most basic questions about Squeak.&quot; &lt;beginners@lists.squeakfoundation.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: [Newbies] OSProcess Exit Status 256</div>

<div name="quoted-content">JohnReed,<br/>
<br/>
In addition to ProxyPipeline, another thing that might be useful for the<br/>
kind of work you are doing would be the methods in category &quot;command<br/>
scripting&quot; of CommandShell. CommandShell uses ProxyPipeline to do the<br/>
work, but it looks to me like some of the things you are doing might be<br/>
easier to do with a CommandShell.<br/>
<br/>
Dave<br/>
<br/>
&gt; Yes, that&#39;s right.<br/>
&gt;<br/>
&gt; An even easier way to do this is to use ProxyPipeline class&gt;&gt;command: to<br/>
&gt; run the command line. This will do all of the Unix shell parsing directly<br/>
&gt; in Smalltalk rather than passing it to the external shell. It also<br/>
&gt; arranges a pipeline of connected programs all in one step, very much as<br/>
&gt; the Unix shell would do for you.<br/>
&gt;<br/>
&gt; ProxyPipeline is part of the CommandShell package, which is a companion to<br/>
&gt; OSProcess. I expect that you already have it loaded, but if not please do<br/>
&gt; give it a try.<br/>
&gt;<br/>
&gt; Dave<br/>
&gt;<br/>
&gt;&gt; The semicolon between commands is only meaningful in a shell. It tells<br/>
&gt;&gt; the shell to run the three programs sequentially. With OSProcess the<br/>
&gt;&gt; semicolon and the rest of the line is passed to the first program, which<br/>
&gt;&gt; gives you the error.<br/>
&gt;&gt; So the easiest way to fix it is to run the three programs separately.<br/>
&gt;&gt; Just<br/>
&gt;&gt; execute the first, wait till it exits, then start the second, etc.<br/>
&gt;&gt;<br/>
&gt;&gt;<br/>
&gt;&gt; Levente<br/>
&gt;&gt;<br/>
&gt;&gt; On Thu, 11 Sep 2014, JohnReed Maffeo wrote:<br/>
&gt;&gt;<br/>
&gt;&gt;&gt; I have an application that has been running for many months which uses<br/>
&gt;&gt;&gt; OSProcess to run a program to record an audio stream. The content is<br/>
&gt;&gt;&gt; available in two flavors, an mps stream that is recorded in real<br/>
&gt;&gt;&gt; time and an flv which is recorded in less than a minute. I am working<br/>
&gt;&gt;&gt; to&nbsp;<br/>
&gt;&gt;&gt; refactor the working method to use the faster recording option.<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; I have a methods to create a command line string which I execute using<br/>
&gt;&gt;&gt; OS process. The command to record the mp3 is simple,<br/>
&gt;&gt;&gt; the command to record&nbsp;the flv stream is more complex and this may be<br/>
&gt;&gt;&gt; the<br/>
&gt;&gt;&gt; source of my problem, but I am not sure and I don&#39;t know how to debug<br/>
&gt;&gt;&gt; it.<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; If I copy either command to a terminal screen and run them there, the<br/>
&gt;&gt;&gt; programs execute as expected.<br/>
&gt;&gt;&gt; When I run them in Squeak, the mp3 produces results, the flv dies.<br/>
&gt;&gt;&gt; The biggest difference between the two command lines is the use of<br/>
&gt;&gt;&gt; semi-colon command separators &nbsp;and double quotes in the flv example.<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; The command line for the mp3 is : (exitStatus 0)<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; /opt/local/bin/ffmpeg -i<br/>
&gt;&gt;&gt; mmsh://wm.bbc.co.uk/wms/prod_rb2_wm_wma_low_intl/p025mlpk_b007gwqn_1410010018428.wma<br/>
&gt;&gt;&gt; -y -map_metadata -1 -acodec libmp3lame -ab 128k<br/>
&gt;&gt;&gt; /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp3<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; The command line for the flv is: (exitStatus 256)<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; /opt/local/bin/rtmpdump<br/>
&gt;&gt;&gt; -r&quot;rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&amp;av=1&amp;te=connect&amp;mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&amp;et=1410418602&amp;fmta-token=9e6e9980cc1fc44517<br/>
&gt;&gt;&gt; 3a649286ea33b76018f14be91bebdc361b035283304013&quot;<br/>
&gt;&gt;&gt; -a&quot;a5999/e1?as=adobe-hmac-sha256&amp;av=1&amp;te=connect&amp;mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&amp;et=1410418602&amp;fmta-token=9e6e9980cc1fc445173a649286ea33b76018f14be91bebdc361b0352<br/>
&gt;&gt;&gt; 83304013&quot; -y<br/>
&gt;&gt;&gt; &quot;mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&quot;<br/>
&gt;&gt;&gt; -o /Volumes/MediaVault/BBC/490947196.flv ; ffmpeg -loglevel quiet &nbsp;-i<br/>
&gt;&gt;&gt; /Volumes/MediaVault/BBC/490947196.flv -c<br/>
&gt;&gt;&gt; copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm<br/>
&gt;&gt;&gt; /Volumes/MediaVault/BBC/490947196.flv<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; The command generated by OSProcess may be:<br/>
&gt;&gt;&gt;<br/>
&gt;&gt;&gt; /bin/sh -c rtmpdump<br/>
&gt;&gt;&gt; -r&quot;rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&amp;av=1&amp;te=connect&amp;mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&amp;et=1410413706&amp;fmta-token=ccb5e3e42d2288246c<br/>
&gt;&gt;&gt; 6d083b34cdc49d43bb94c0a0e536bf9a14fbea2857d4d3&quot;<br/>
&gt;&gt;&gt; -a&quot;a5999/e1?as=adobe-hmac-sha256&amp;av=1&amp;te=connect&amp;mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&amp;et=1410413706&amp;fmta-token=ccb5e3e42d2288246c6d083b34cdc49d43bb94c0a0e536bf9a14fbea<br/>
&gt;&gt;&gt; 2857d4d3&quot; -y<br/>
&gt;&gt;&gt; &quot;mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&quot;<br/>
&gt;&gt;&gt; -o /Volumes/MediaVault/BBC/960136998.flv ; ffmpeg -loglevel quiet&nbsp; -i<br/>
&gt;&gt;&gt; /Volumes/MediaVault/BBC/960136998.flv -c<br/>
&gt;&gt;&gt; copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm<br/>
&gt;&gt;&gt; /Volumes/MediaVault/BBC/960136998.flv<br/>
&gt;&gt;&gt;<br/>
&gt;&gt;&gt; if this is correct, when I run it at the command line, I get an error:<br/>
&gt;&gt;&gt;<br/>
&gt;&gt;&gt; RTMPDump 2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer<br/>
&gt;&gt;&gt; Team; license: GPL ERROR: You must specify a hostname (--host) or url<br/>
&gt;&gt;&gt; (-r &quot;rtmp://host[:port]/playpath&quot;) containing a hostname rm:<br/>
&gt;&gt;&gt; /Volumes/MediaVault/BBC/960136998.flv: No such file or directory<br/>
&gt;&gt;&gt;<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt;<br/>
&gt;&gt;&gt; but when I inspect the instance of&nbsp;ExternalUnixOSProcess &gt;&nbsp;osp2 :=<br/>
&gt;&gt;&gt; ExternalUnixOSProcess command: cmdLine. I don&#39;t see anything in<br/>
&gt;&gt;&gt; the stdout or stderror.<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; Thanks for any suggestions,<br/>
&gt;&gt;&gt; jrm<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt; &nbsp;<br/>
&gt;&gt;&gt;<br/>
&gt;&gt;&gt;_______________________________________________<br/>
&gt;&gt; Beginners mailing list<br/>
&gt;&gt; Beginners@lists.squeakfoundation.org<br/>
&gt;&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>
&gt;&gt;<br/>
&gt;<br/>
&gt;<br/>
&gt; _______________________________________________<br/>
&gt; Beginners mailing list<br/>
&gt; Beginners@lists.squeakfoundation.org<br/>
&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>
&gt;<br/>
<br/>
<br/>
_______________________________________________<br/>
Beginners mailing list<br/>
Beginners@lists.squeakfoundation.org<br/>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a></div>
</div>
</div>
</div></div></body></html>