Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4897 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi guys, i'm trying your scriptmaster.

I want to run a shell script on osx that i used to convert some audio files using lame. every time i try i receive an error and no file converted.

the same command works perfectly in terminal.

using eg. afconvert work perfectly (not in mp3 of course, 'cause not supported).

any suggest?

best

Corrado

Posted

Hi,

As with Applescript, it is always good practice to specify the full path to the command line utility, which in your case should be "/usr/local/bin/lame".


Set variable [$cmd; value:

Let ( [

  sp = Char ( 32 ) ; // space

  sq = Char ( 39 ) ; // single quote (protects path from spaces & other shell reserved characters)

 

  cmdPath = "/usr/local/bin/lame" ;

  cmdOpt =  "-SV2" ;

  inPath = "/Users/XXX/Audio/My WAV Files/audio.wav" ;

  outPath = "/Users/XXX/Audio/My MP3 Files/audio.mp3"

] ;

 

cmdPath & sp & cmdOpt & sp & sq & inPath & sq & sp & sq & outPath & sq

/* result: /usr/local/bin/lame -SV2 '/Users/XXX/Audio/My WAV Files/audio.wav' '/Users/XXX/Audio/My MP3 Files/audio.mp3' */

 

)]

 

Set variable [$SM_runShell; RunShellScript( $cmd ; "true" ; 30 )]

// ... eval errors, etc ...

... keep in mind that `lame' is a custom installation ...

... to locate command line utilities use the followig tools: which and/or whereis

Posted

HI,

now seems perfect except for ID3 tagging (--tt --ta, etc) every accented char is wrong.

doesn't seems easy to do, is it possible to change charset or other suggests?

also in terminal is the same. can be modified?

best

Corrado

Posted

... except for ID3 tagging (--tt --ta, etc) every accented char is wrong....

...also in terminal is the same. can be modified?

I also encountered the same problem ...

After making a hexdump on one of my converted file, I noticed that in the ID3v2 header the byte reserved for the character encoding of each frame is deliberately set to 00 (00 stands for ISO-8859-1).

However, according to the specifications ID3v2 this byte should be 03 (UTF8, UTF-01 for 02 for 16 and UTF-16BE)...

... So whe can only blame `lame'

As a workaround, you can either use AppleScript and the iTunes library or

download and install the Python module "eyed3" (requires Python 2.5) who's dedicated to ID3 tag manipulations and very very close to the ID3 specifications.

Download and expand the eyeD3-0.6.17.tar.gz archive

in a terminal type:

cd eyeD3-0.6.17

./configure

make

sudo make install

******************************

man eyeD3 // usage

eyeD3 -l // to get the full list of video&music genres.

******************************

/* Terminal command */


f_wav="/Users/XXX/Audio/My WAV Files/audio.wav"; f_mp3="/Users/XXX/Audio/My MP3 Files/audio.mp3"; /usr/local/bin/lame -SV2 "$f_wav" "$f_mp3" && /usr/local/bin/eyeD3 -2 -a "album" -A "Artist" -t "title" -G 51  -Y 1932 "$f_mp3"

hope that helps

Posted

uhmm i tried to install, but after ./config

make is a command not found

from terminal during config i receive a warning "Makefile.in seems to ignore the --datarootdir setting"

...

Posted

I had no problem using the following syntax ...

cd "/Users/xxx/full path to folder eyeD3-0.6.17/"

./configure

make

sudo make install

Posted

Sorry I misread your message ...

To take advantage of the "Make" utility you have to run XCodeTools.mpkg (install XCode) from your SL install CD .

Posted

Hi Clemhoff,

Finally it work, except for accented characters, in scriptmaster i receive an error if there's an accented character (eg: à or else) and eyeD3 it would not write to file.

here, a variable as example (in red the accented in title), it work perfectly in terminal but won't work in FM:

/usr/local/bin/lame -cpb 320 '/Volumes/xxx/Qualcosa dovra mastering/Final Master/qualcosa_dovra_pur_succedere_f3.wav' '/Volumes/xxx/Desktop/ITF111100025_Qualcosa dovrà pur succedere.mp3' && /usr/local/bin/eyed3 -2 --set-encoding "utf16-BE" -t "Qualcosa dovrà pur succedere" --artist "Matrioska" -Y "2011" -p "Giurrado snc" "/Volumes/Studio A HD/Users/studioa/Desktop/ITF111100025_Qualcosa dovrà pur succedere.mp3"

as you can see i tried to include set encoding like latin1 or utf-16 no difference in scriptmaster.

:hmm:

This topic is 4897 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.