Shell Script and MP3Splt

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Shell Script and MP3Splt Sat Jan 07, 2017 7:29 pm • by schop
First, I'm sorry I don't know more about scripting, but could anyone help me with this? I've been searching and trying things for 90 minutes!

I've downloaded the Mp3Split utility with Homebrew.

I would like Hazel to take MP3 files from Finder folder and automatically strip silence from them.

My understanding is this command is where to start using Mp3Splt, but I get an error in Hazel.

mp3splt -s f.mp3 or mp3splt -s -p th=-50,nt=10 f.mp3

I've used the shell script feature to convert to MP3 using this script.

Code: Select all
for f in "$@"
do
   /usr/local/bin/lame -V 4 "$f"
done


Being a novice, I tried this, but I wasn't surprised it didn't work:
Code: Select all
for f in "$@"
do
   mp3splt -s f.mp3 or mp3splt -s -p th=-50,nt=10 f.mp3
done


Would anyone be willing to tell me what code to use? And maybe, if you have time, one or two points on why it works?

Thanks in advance. Would love to understand this stuff.
schop
 
Posts: 1
Joined: Sat Jan 07, 2017 7:17 pm

Re: Shell Script and MP3Splt Mon Jan 09, 2017 12:20 pm • by Mr_Noodle
If you turn on debug mode as described here, you can see the script output in the logs: https://www.noodlesoft.com/kb/hazel-debug-mode/

Also note that the PATH variable may be different so it's a good idea to use full pathnames everywhere.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support