[Newbies] OSProcess Exit Status 256
leves at elte.hu
Thu Sep 11 14:19:35 UTC 2014
The semicolon between commands is only meaningful in a shell. It tells
the shell to run the three programs sequentially. With OSProcess the
semicolon and the rest of the line is passed to the first program, which
gives you the error.
So the easiest way to fix it is to run the three programs separately. Just
execute the first, wait till it exits, then start the second, etc.
On Thu, 11 Sep 2014, JohnReed Maffeo wrote:
> I have an application that has been running for many months which uses OSProcess to run a program to record an audio stream. The content is available in two flavors, an mps stream that is recorded in real
> time and an flv which is recorded in less than a minute. I am working to
> refactor the working method to use the faster recording option.
> I have a methods to create a command line string which I execute using OS process. The command to record the mp3 is simple,
> the command to record the flv stream is more complex and this may be the source of my problem, but I am not sure and I don't know how to debug it.
> If I copy either command to a terminal screen and run them there, the programs execute as expected.
> When I run them in Squeak, the mp3 produces results, the flv dies.
> The biggest difference between the two command lines is the use of semi-colon command separators and double quotes in the flv example.
> The command line for the mp3 is : (exitStatus 0)
> /opt/local/bin/ffmpeg -i mmsh://wm.bbc.co.uk/wms/prod_rb2_wm_wma_low_intl/p025mlpk_b007gwqn_1410010018428.wma -y -map_metadata -1 -acodec libmp3lame -ab 128k /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp3
> The command line for the flv is: (exitStatus 256)
> /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/p025mlpk_b007gwqn_1410009892525.mp4&et=1410418602&fmta-token=9e6e9980cc1fc44517
> 3a649286ea33b76018f14be91bebdc361b035283304013" -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
> 83304013" -y "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4" -o /Volumes/MediaVault/BBC/490947196.flv ; ffmpeg -loglevel quiet -i /Volumes/MediaVault/BBC/490947196.flv -c
> copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm /Volumes/MediaVault/BBC/490947196.flv
> The command generated by OSProcess may be:
> /bin/sh -c 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/p025mlpk_b007gwqn_1410009892525.mp4&et=1410413706&fmta-token=ccb5e3e42d2288246c
> 6d083b34cdc49d43bb94c0a0e536bf9a14fbea2857d4d3" -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
> 2857d4d3" -y "mp4:prod_rb2_flv_aac_low_intl/iplayerstream/p025mlpk_b007gwqn_1410009892525.mp4" -o /Volumes/MediaVault/BBC/960136998.flv ; ffmpeg -loglevel quiet -i /Volumes/MediaVault/BBC/960136998.flv -c
> copy -copyts /Volumes/MediaVault/BBC/Baldi.4.4.6-NoSin.mp4 ; rm /Volumes/MediaVault/BBC/960136998.flv
> if this is correct, when I run it at the command line, I get an error:
> RTMPDump 2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL ERROR: You must specify a hostname (--host) or url (-r "rtmp://host[:port]/playpath") containing a hostname rm:
> /Volumes/MediaVault/BBC/960136998.flv: No such file or directory
> but when I inspect the instance of ExternalUnixOSProcess > osp2 := ExternalUnixOSProcess command: cmdLine. I don't see anything in
> the stdout or stderror.
> Thanks for any suggestions,
More information about the Beginners