Script shell using LAME

Hi,
I'm new with this stuff but trying use script shell into automator for converting an aiff audio file into an mp3 file.
Open automator choose service, then from utility choose run script shell and write this siple lines:
for f in "$@"
do
/usr/local/bin/lame -b 256 -m j -h "$@" "${f/.*}".mp3
done
afplay '/Users/prod00/Library/Sounds/Converted.aif'
The script works but not properly, in effect decode aiff to mp3 if the file is short (about 40sec.less) and then stop. But if I try to decode for example 3min. the script continue and never stop. Then I must stop the automator service from menubarand the file is decoded partially.
Can sameone tell me where am I wrong?
Thanks

For everyone who is interest I've find myself a solution this is the code:
for f in "$@"
do
/usr/local/bin/lame -b 128 -m j -h -S "$f" "${f/.*}".mp3;
done
This encode an audio file to mp3 128K bitrate, stereo, high quality
Take care

Similar Messages

  • Running Java program from script shell using SSH

    Hello!
    I have this problem: I need to run a java command like: java Prog arg1 arg2 arg3 on i machines, using a shell script.
    First of all, I'm trying to make it work for a single machine. But the problem is when I write the line << ssh user@localhost "java -classpath /a/b/ Prog arg1 arg2 arg3" >> and run the script, it is not able to execute the entire line. Is there a special options for the arguments of my Prog class? I want to mention that between my arguments there is another text file which is read by the Prog and when i run the script says it cannot find that file; Please any ideas for not remain stuck here?
    Thank You in advance!

    Hello! Thank you for being so helpful..
    The part with << is not existent in my script, I've put it just here for quotation.Sorry
    So, from the terminal under Linux I run the command like this: I go to my folder where I have all my .java Classes and I execute the command java Prog arg1 arg2 arg3 . Where arg1...arg3 are arguments which are read from the terminal and then used in my Prog. One of the arguments is a text file, from which Prog.java reads line by line it's content. How can I run the same thing , under a script using SSH? This is basically my question, taking into consideration what I've written in my first post.

  • Which .bash does "do shell script" commands use?

    The "do shell script" command uses the Bourne shell "sh". But I am curious to know which .bash it uses to define the shell environment variables.
    I ran into a problem installing a third-party unix program which required new environment variables to be defined in order to execute. Defining these variables and executing this program from the terminal worked fine.
    But executing it within a "do shell script" command in an Applescript - the program died silently because the environment variables it required were not defined in the shell Applescript uses. It appears to invoke a new shell which does not inherit the environment variables defined in your home user shell.
    (I found this out by 'do shell script "set"' which listed the environment variables Applescript knows about - the ones I defined for the third-party program were not listed).
    A "brute force" way of fixing this is to pass the environment variables directly:
    do shell script "export THIRDPARTY_ENVVAR=blah; /usr/sbin/thirdpartyprogam"
    This works but not exactly elegant, particularly when you need to pass a number of variables.
    So - any better ways to do this? Can I edit the .bash Applescript uses, and where is it?
    Thanks.

    Another option that might work for you... if you are saving/distributing your AppleScript as an "Application bundler" is to group all your shell env. variables and other commands into a separate shell script file. Then include the shell script inside your app bundle. Locate the shell script at runtime and run that with "do shell script".
    For example, create "myShellScript.sh"
    #!/bin/sh
    export THIRDPARTY_ENVVAR=blah
    # ... more variable declarations..
    /usr/sbin/thirdpartyprogam
    # ... more shell commands...
    Store the shell script file inside your AppleScript bundle's Contents -> Resources folder (remember to make the shell script executable). Then your AppleScript can find your shell script at runtime and execute it like this:
    set ssPath to quoted form of POSIX path of (path to resource "myShellScript.sh")
    set stdout to do shell script ssPath
    Steve

  • Writing OS Script to use at file CC.

    Hi ,
    I have a Requirement in which i have to write a script and use the script as OS command in sender file adapter.
    Requirement --
    When ever the communication channel read a file from directories at FTP server delete that file and paste that file in different folder at FTP server.
    I have no knowledge with OS script . My server is running on Microsoft server 2008.
    Please let me know how to write a script and where to place the file in XI server.
    Regards,
    Navneet

    Hello,
    Please find info about using OS command in File Adapter in links below:
    /people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    What concerns path for Script i usually use /usr/sap/bin/ but i think that you can choose any available path on your PI server.
    BR,
    Dzmitry

  • Powershell script for Use this termset for site navigation in tem store management tool in central admin

    can anyone pls point out whats the power shell script for "use this  termset for site navigation" in the termstore management tool in my central  admin';s manage serv appln-->managed metadata serv appln ->term styore mgmnt tool
    i would like to check this "checked" through powershell script
    help is appreciated!

    Hi,
    To check if the term set has been set to be used for site navigation, we need to check the
    NavigationTermSet.IsNavigationTermSet property for the term set.
    Here is the code example for using PowerShell to get the setting:
    $site=Get-SPSite "your site collection URL";
    $session = Get-SPTaxonomySession -Site "your site collection URL ";
    $termStore = $session.TermStores["Managed Metadata Service"];
    $Group = $termStore.Groups[“Group Name”];
    $TermSet = $Group.TermSets[“Term Set Name”];
    $navTermSet = [Microsoft.SharePoint.Publishing.Navigation.NavigationTermSet]::GetAsResolvedByWeb($termset, $site.RootWeb, "GlobalNavigationTaxonomyProvider");
    write-host $navTermSet.IsNavigationTermSet
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Run a script shell from plsql

    Hi everybody
    I must run a script shell after some plsql code
    It's possible to execute the script just after in plsql (without java,...)??
    thank you for your help

    Try using DBMS_SCHEDULER. Your shell script can be a scheduled job that runs right away.
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB(
         job_name     => 'MY SHELL SCRIPT',
         job_type     => 'EXECUTABLE',
         job_action     => '/bin/sh',
         number_of_arguments => 2 );
    DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
    job_name => 'MY SHELL SCRIPT',
    argument_position => 1,
    argument_value => '-c' );
    DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
    job_name => 'MY SHELL SCRIPT',
    argument_position => 2,
    argument_value => '/home/myname/shell.sh' );
    DBMS_SCHEDULER.ENABLE('MY SHELL SCRIPT');
    END;
    Hope this helps.
    Anbu Kuppusamy

  • File copy from shell using nautilus file operations?

    Is it possible to have the nautilus file operations copy command from a shell?  In other words, rather than using the cp command, I'd like to have a file copy triggered from a bash script that uses the familiar "File Operations" dialog box in nautilus.  Can this be done?

    Hello Bibin,
    Give this a try., if i understood correctly. I coudn't test it my side.
    $servers = get-content C:\hosts.txt
    foreach ($server in $servers)
    if(test-path \\Centralserver\share\$server)
    if(test-path \\$server\c$\xxx.file)
    Copy -path \\$server\c$\xxx.file -Destination \\CentralServer\share\$server\ -Recurse -ErrorVariable CopyErrorS
    #stores all your copy errors
    $copyError = $copyError + $copyerrorS
    else
    Write-Output "source file on server $server is missing"
    else
    New-Item -Name $server -ItemType Directory -path \\centralserver\share\ -Force -Errorvariabe FCreationErrorS
    #Stores all your Folder creation errors
    $FCreationError = $FCreationError + $FCreationErrorS
    if((test-path \\$server\c$\xxx.file) -and (test-path \\Centralserver\share\$server))
    Copy -path \\$server\c$\xxx.file -Destination \\CentralServer\share\$server\ -Recurse -force
    else
    Write-Output "Error creating source folder on $server."
    Regards,
    V.
    Venu

  • Printing Line Items in Script without using driver program

    How to print the line items of a internal table in sap script without using driver program? I am not supposed to edit anything in the driver program. Pls help me to solve this problem...

    Hi,
    You can try by creating a new driver program and a new FORM ENDFORM inside that for this purpose.
    Regards,
    Gaurav

  • Can I use LAME MP3 encoder in Audition CS5.5 instead of the inbuilt one ?

    If I edit a sound file in Audition and want to encode it to MP3, instead of using the inbuilt encoder is there a plugin or a way to make audition use LAME for ancoding the mp3 ?

    If you want to use Lame, then probably the easiest way of using it is to download something like ExactAudioCD (free) and incorporate it into that.
    Or use Audacity (also free) and the LAME codec available for that.
    ...but I share Charles VW's curiosity...I've never felt the need to venture away from the Fraunhofer version included with Audition.

  • Execute script logic using data manager

    Hi all,
    Could anyone explain me how to run a script logic using the data manager?
    The only way I get it working is adding the script logic into the defaul.lgl file and running the default formulas package via data manager.
    How can I run an specific script logic without using the default.lgf file?
    Thanks and regards,
    Ana

    HI Ana,
    You will have to create a SSIS package that will run the logic for you. A good example of this is the ICELIM package that comes standard with AppShell. The easiest is way for me is to copy the package and renaming it to what you want to call it in the following folder: C:\BPC\Data\Webfolders\<AppSet>\<Application>\DataManager\PackageFiles\System Files
    You will then have to organize the package list and add the package and modify the advanced properties of the package and point it to the correct logic file. I always use the lgf file rather than the lgx file, but it is up to you.
    Lemme know if you need more info.
    Regards,
    Andries

  • How can i execute codedui scripts by using dll

    how Can I Execute Coded UI scripts by using the DLL from anywhere after creating the build 

    Hi yellesh,
    If you mean that you want to run your test with bat file, as far as I know, we could call the MSTEST command line.
    set mstestPath="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
    %mstestpath%\mstest /testcontainer:AutomatedUITest.dll  /resultsfile:TestOutput.trx
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/29af65b3-598b-4205-80e6-35b942113f3b/how-to-run-coded-ui-scripts-trhu-bat-file?forum=vsautotest
    https://social.msdn.microsoft.com/Forums/en-US/42a5d8f2-fe58-4133-b09d-28fa0553ab1a/run-coded-ui-test-in-certain-moment-in-future?forum=vsautotest
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Pls provide the screen shoots of transpoting script by using SCC1

    Pls provide the screen shoots of transpoting script by using SCC1

    Hi,
    When you create a SAPScript in one client, it will ask for transport reuqest. You create that transport request.
    Now you go to the client where you want to move the SAPScript. Go to transaction SCC1.
    Enter your
    - source client
    - transport request here and just hit 'start immediately' button
    Regards,
    RS

  • SAP XI: How To Write Shell Script And use it in File Adapter On XI Server

    Hi,
    I want to split file at sender side in XI using Shell Script and then after i want to do
    Mapping.
    Can anyone tell me what exactly it means "write a script in UNIX shell on XI SERVER"?
    Regards,
    Akshay.

    Hi,
    You can execute a Unix script running in the XI server from the File communication channel. Ie. if you want to do something which was not part of XI adapter configuation , then you can make use of external unix script and you can execute those from the XI.
    For this, write a unix script and place in the XI OS level provided that path is accessible from PI Channel.
    E.g
    So u can use this in either Sender Channel to modify the data before it reaches into the Integration Server or in Receiver channel it is generally used to transfer the files into different location via Secure FTP
    SAP help: http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Blog:/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    XI  can be in any OS.
    Hope this helps,
    Rgds,
    Moorthy

  • Need to call Shell script that uses SQL loader in APex4.1/11g

    Hi there!
    I have a requirement, wherein I have to call a shell script that connects to an external server, ftp's a file in and then uses sqlloader to load data into our table. Now we have the ftp script that does this for another program, but is a scheduled job. I wanted to call the ftp shell script from within APEX. Any suggestions on how this can be done, what PL/SQL logic can we use? I see online some people using dbms scheduler for this?
    Thank you
    Sun

    Hi,
    Create some sh script on your oracle host machine where you can join into external server and run the process.
    something like:
    run_external_sh.sh
    #!/bin/sh
    ssh ext_user@ext_host ./sqlloader/import/import.shThen create a external JOB to call it via ORACLE(PL/SQL)
    -- Call Shell Script.
    BEGIN
      DBMS_SCHEDULER.create_program (
        program_name        => 'external_call_sh',
        program_type        => 'EXECUTABLE',
        program_action      => '/local_host/call_external/sh/run_external_sh.sh',
        number_of_arguments => 0,
        enabled             => TRUE,
        comments            => 'Call external SH script');
    END;
    /Now you can create a scheduled/or not scheduled JOB
    -- Job defined by an existing program and schedule.
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name      => 'jb_external_call_sh',
        program_name  => 'external_call_sh',
        schedule_name => 'external_call_scheduler', -- created scheduler
        enabled       => TRUE,
        comments      => 'Job defined by an existing external_call_sh program and schedule.');
    END;
    /Now you can call the JOB in APEX in PL/SQL process.
    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'jb_external_call_sh');
    END;Regards
    J :D

  • Please help with executing the c-shell script by using the exe class

    I try to use the exec class to execute a c-shell script in my java gui program like this. But I don't get anything when clicking on the start button.
    here is my code:
    Runtime r = Runtime.getRuntime();
    r.exec("./DDMReportEvents");
    ./DDMReportEvents is the name of the c-shell script.

    I think Runtime.exec runs DOS batch files, but not Unix shell scripts.
    Try:
    r.exec("csh -c ./DDMReportEvents");
    to get the shell to run the shell script.

Maybe you are looking for

  • Photon flash browser

    Flash can not locate the webcam on my iPad when using 'photon' Is there a solution?

  • Share a Standard Chart of Account for a Sucessfull R12 Financial Implementa

    Hello Friends I am a oralce financial consultant. My complany has implemented 4 EBS 11i implementation in different telecomumincation industries. I was a team of those implementation. But recently my company has woned a new account of Oracle R12 fina

  • How to delete internal order

    Hi, I don't know how to delete internal order. I have set a deletion flag but I don't see a transaction where I could erase Internal orders. Could you help me with that. Is it user's tree or SPRO transaction? Best wishes, Karol

  • How to set the sampling interval using DAQ device?

    Now I have a capacity sensor and a 24 bit DAQ device (http://www.mccdaq.com/usb-data-acquisition/USB-2404-10.aspx). The DAQ device has the maximum sampling rate of 50kS/s . My question is how to set the interval of data collection. For example, if I

  • Publish Settings Error "Air FLAir1_5 is not defined"

    Hi all, I have been trying to test a simple Air app out using my Windows version of Flash CS4 10.0.2 and Air 1.5.3 Each time I tried to check the Air publish settings I received the following error: The following JavaScript error(s) occurred: At line