tamtamstudio Posted August 26, 2011 Posted August 26, 2011 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
clemhoff Posted August 27, 2011 Posted August 27, 2011 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
tamtamstudio Posted August 28, 2011 Author Posted August 28, 2011 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
clemhoff Posted September 2, 2011 Posted September 2, 2011 ... 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
tamtamstudio Posted September 2, 2011 Author Posted September 2, 2011 great! thank you, i'll try asap
tamtamstudio Posted September 2, 2011 Author Posted September 2, 2011 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" ...
clemhoff Posted September 2, 2011 Posted September 2, 2011 I had no problem using the following syntax ... cd "/Users/xxx/full path to folder eyeD3-0.6.17/" ./configure make sudo make install
clemhoff Posted September 3, 2011 Posted September 3, 2011 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 .
tamtamstudio Posted September 3, 2011 Author Posted September 3, 2011 oops.. i thought it was in this machine..i try immediately
tamtamstudio Posted September 3, 2011 Author Posted September 3, 2011 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:
tamtamstudio Posted September 4, 2011 Author Posted September 4, 2011 could be because scriptmaster can send only utf-8 characters?
Recommended Posts
This topic is 5098 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 accountSign in
Already have an account? Sign in here.
Sign In Now