<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Dave, thanks</div>
<div> </div>
<div>It looks like the question mark in the string I am providing is the source of the problem. I tried "CommandShell new open; script: cmdLine." 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. </div>
<div>--- start ---</div>
<div>/opt/local/bin/rtmpdump -r "rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4&et=1410496940&fmta-token=0113a6812ab57b232f8bce347fadaa97fb51eb2b52bdf943d138aa3620ec1dd2" -a "a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4&et=1410496940&fmta-token=0113a6812ab57b232f8bce347fadaa97fb51eb2b52bdf943d138aa3620ec1dd2" -y "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4" -o /Volumes/MediaVault/BBC/693150877.flv<br/>
[1] 51130<br/>
sqsh: av=1: command not found<br/>
[2] <br/>
sqsh: te=connect: command not found<br/>
[2] <br/>
sqsh: mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025y8q4_b0082dzb_1410416158999.mp4: command not found<br/>
[2] <br/>
sqsh: et=1410496940: command not found<br/>
[2] <br/>
sqsh: fmta-token=0113a6812ab57b232f8bce347fadaa97fb51eb2b52bdf943d138aa3620ec1dd2": 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> Thursday, September 11, 2014 at 9:51 AM<br/>
<b>From:</b> "David T. Lewis" <lewis@mail.msen.com><br/>
<b>To:</b> "A friendly place to get answers to even the most basic questions about Squeak." <beginners@lists.squeakfoundation.org><br/>
<b>Subject:</b> 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 "command<br/>
scripting" 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/>
> Yes, that's right.<br/>
><br/>
> An even easier way to do this is to use ProxyPipeline class>>command: to<br/>
> run the command line. This will do all of the Unix shell parsing directly<br/>
> in Smalltalk rather than passing it to the external shell. It also<br/>
> arranges a pipeline of connected programs all in one step, very much as<br/>
> the Unix shell would do for you.<br/>
><br/>
> ProxyPipeline is part of the CommandShell package, which is a companion to<br/>
> OSProcess. I expect that you already have it loaded, but if not please do<br/>
> give it a try.<br/>
><br/>
> Dave<br/>
><br/>
>> The semicolon between commands is only meaningful in a shell. It tells<br/>
>> the shell to run the three programs sequentially. With OSProcess the<br/>
>> semicolon and the rest of the line is passed to the first program, which<br/>
>> gives you the error.<br/>
>> So the easiest way to fix it is to run the three programs separately.<br/>
>> Just<br/>
>> execute the first, wait till it exits, then start the second, etc.<br/>
>><br/>
>><br/>
>> Levente<br/>
>><br/>
>> On Thu, 11 Sep 2014, JohnReed Maffeo wrote:<br/>
>><br/>
>>> I have an application that has been running for many months which uses<br/>
>>> OSProcess to run a program to record an audio stream. The content is<br/>
>>> available in two flavors, an mps stream that is recorded in real<br/>
>>> time and an flv which is recorded in less than a minute. I am working<br/>
>>> to <br/>
>>> refactor the working method to use the faster recording option.<br/>
>>> <br/>
>>> I have a methods to create a command line string which I execute using<br/>
>>> OS process. The command to record the mp3 is simple,<br/>
>>> the command to record the flv stream is more complex and this may be<br/>
>>> the<br/>
>>> source of my problem, but I am not sure and I don't know how to debug<br/>
>>> it.<br/>
>>> <br/>
>>> If I copy either command to a terminal screen and run them there, the<br/>
>>> programs execute as expected.<br/>
>>> When I run them in Squeak, the mp3 produces results, the flv dies.<br/>
>>> The biggest difference between the two command lines is the use of<br/>
>>> semi-colon command separators and double quotes in the flv example.<br/>
>>> <br/>
>>> The command line for the mp3 is : (exitStatus 0)<br/>
>>> <br/>
>>> /opt/local/bin/ffmpeg -i<br/>
>>> mmsh://wm.bbc.co.uk/wms/prod_rb2_wm_wma_low_intl/p025mlpk_b007gwqn_1410010018428.wma<br/>
>>> -y -map_metadata -1 -acodec libmp3lame -ab 128k<br/>
>>> /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp3<br/>
>>> <br/>
>>> The command line for the flv is: (exitStatus 256)<br/>
>>> <br/>
>>> /opt/local/bin/rtmpdump<br/>
>>> -r"rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410418602&fmta-token=9e6e9980cc1fc44517<br/>
>>> 3a649286ea33b76018f14be91bebdc361b035283304013"<br/>
>>> -a"a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410418602&fmta-token=9e6e9980cc1fc445173a649286ea33b76018f14be91bebdc361b0352<br/>
>>> 83304013" -y<br/>
>>> "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4"<br/>
>>> -o /Volumes/MediaVault/BBC/490947196.flv ; ffmpeg -loglevel quiet -i<br/>
>>> /Volumes/MediaVault/BBC/490947196.flv -c<br/>
>>> copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm<br/>
>>> /Volumes/MediaVault/BBC/490947196.flv<br/>
>>> <br/>
>>> The command generated by OSProcess may be:<br/>
>>><br/>
>>> /bin/sh -c rtmpdump<br/>
>>> -r"rtmp://bbcodspdns.fcod.llnwd.net:1935/a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410413706&fmta-token=ccb5e3e42d2288246c<br/>
>>> 6d083b34cdc49d43bb94c0a0e536bf9a14fbea2857d4d3"<br/>
>>> -a"a5999/e1?as=adobe-hmac-sha256&av=1&te=connect&mp=prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4&et=1410413706&fmta-token=ccb5e3e42d2288246c6d083b34cdc49d43bb94c0a0e536bf9a14fbea<br/>
>>> 2857d4d3" -y<br/>
>>> "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4"<br/>
>>> -o /Volumes/MediaVault/BBC/960136998.flv ; ffmpeg -loglevel quiet -i<br/>
>>> /Volumes/MediaVault/BBC/960136998.flv -c<br/>
>>> copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm<br/>
>>> /Volumes/MediaVault/BBC/960136998.flv<br/>
>>><br/>
>>> if this is correct, when I run it at the command line, I get an error:<br/>
>>><br/>
>>> RTMPDump 2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer<br/>
>>> Team; license: GPL ERROR: You must specify a hostname (--host) or url<br/>
>>> (-r "rtmp://host[:port]/playpath") containing a hostname rm:<br/>
>>> /Volumes/MediaVault/BBC/960136998.flv: No such file or directory<br/>
>>><br/>
>>> <br/>
>>><br/>
>>> but when I inspect the instance of ExternalUnixOSProcess > osp2 :=<br/>
>>> ExternalUnixOSProcess command: cmdLine. I don't see anything in<br/>
>>> the stdout or stderror.<br/>
>>> <br/>
>>> Thanks for any suggestions,<br/>
>>> jrm<br/>
>>> <br/>
>>> <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><br/>
>><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><br/>
><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>