IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
WAV to MP3, Command Line with Compression
stonkers
post Feb 28 2006, 20:14
Post #1





Group: Members
Posts: 9
Joined: 28-February 06
Member No.: 28155



Hi All! Eric here, newb to the forum. Lookin' for some advice.

On Sunday's at church, we record the sermons and I put them on the website. I compress them as much as I can when converting them to MP3 (adding id3 tags so we can automate the display based on a simple file drop in a folder - in progress) using our recording software (Sonar Cakewalk). The problem is, I'm a bottle neck. If I'm not there, it doesn't get done. So... I'd like to automate the conversion and copy of the files. With Sonar, I can get an hour sermon down to about 10 meg (mono - 22k - 16 bit...). Is there a free tool out there that can:

1) Convert from the command line into a mega-compressed mp3
2) Add ID3 (v1) tags (less necessary because I can do this with a little C# program if necessary)

Thanks much in advance for any help!
Eric
Go to the top of the page
+Quote Post
boojum
post Feb 28 2006, 20:28
Post #2





Group: Members (Donating)
Posts: 819
Joined: 8-November 02
From: Astoria, OR
Member No.: 3727



foobar2000 cool.gif


--------------------
Nov schmoz kapop.
Go to the top of the page
+Quote Post
Synthetic Soul
post Feb 28 2006, 23:00
Post #3





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



There must be a small app that does this very easily and user-friendly-y, but I can't think of one at the moment.

If you are familiar with the command line you could take the following and adapt it to better suit your needs. Copy the script below and save it as lame-enc.bat. All you need to do then is drag a WAVE file onto the batch file icon. The script will ask you to enter values for the Artist, Album, Title, and Year tags, and then encode to MP3, setting ID3 tags with those values. Amend "C:\Program Files\Lame\LAME.EXE" to the path to LAME.EXE, and the LAME command line as you see fit.

CODE
@ECHO OFF
CLS

SET lameExe="C:\Program Files\Lame\LAME.EXE"

SET /P artist=Artist?   :
SET /P album=Album?    :
SET /P title=Title?    :
SET /P year=Year?     :

%lameExe% --preset voice --ta "%artist%" --tt "%title%" --tg "101" --tl "%album%" --ty "%year%" %1 "%~dpn1.mp3"

I just thought of another option: LameDropXPd v2.


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
stonkers
post Mar 1 2006, 15:30
Post #4





Group: Members
Posts: 9
Joined: 28-February 06
Member No.: 28155



That looks like a great start Synthetic Soul, thanks!!! I'll just write a little GUI front end for it that gathers the arguments from the user (with examples) and calls the batch file passing the arguments. I'll adjust the batch file to use %1, %2, %3, and %4 for Artist, Album, Title, and Year. I'll probably then add a call to SCP (Secure Copy - Like FTP but it encrypts passwords so that it's secure) to push the file to our web server so that it's published. If anyone is interested in the source code when I get done, I'd be happy to send it out or post it somewhere.

Thanks for all the help!
Eric

Moderation: Unnecessary quote removed.

This post has been edited by Synthetic Soul: Mar 1 2006, 16:12
Go to the top of the page
+Quote Post
stonkers
post Mar 1 2006, 15:58
Post #5





Group: Members
Posts: 9
Joined: 28-February 06
Member No.: 28155



One thing I didn't get SS (my bat file scripting has much to be desired):

%1 "%~dpn1.mp3"

%1 is the wav file that you would drop (for me I'll be passing it as an argument - %1 or %5), but the "%~dpn1.mp3" must be naming the output file but I don't get the "~dpn1" part. Is that going to take the extension off of the %1 for you? I tried googling it, but google doesn't like special characters...

Thanks Again,
Eric
Go to the top of the page
+Quote Post
Synthetic Soul
post Mar 1 2006, 16:10
Post #6





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



http://www.ss64.com/ntsyntax/parameters.html

Basically it is splitting the parameter into its component parts.

d: drive
p: path
n: filename
x: extension

So, %~dpn1 is, as you say, the whole path without the extension.

Do you really need my batch file if you are writing a GUI? Your GUI could just take the tag values and pass them to LAME itself.

Have you tried running the batch file as it stands? It will ask the user for the values quite nicely. You could make the whole think more user-friendly by adding some ECHO command with instructions, e.g.:

CODE
@ECHO OFF
CLS
ECHO Please enter values for the file tags.
ECHO.
ECHO Entor the pastor's name for the Artist field.
SET /P artist=Artist?   :
ECHO Enter the church name for the Album field.
...


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
stonkers
post Mar 1 2006, 19:46
Post #7





Group: Members
Posts: 9
Joined: 28-February 06
Member No.: 28155



QUOTE
Do you really need my batch file if you are writing a GUI?  Your GUI could just take the tag values and pass them to LAME itself.


Nope, I'm sure I'll just call Lame directly with your parameters.

QUOTE
Have you tried running the batch file as it stands?  It will ask the user for the values quite nicely.  You could make the whole think more user-friendly by adding some ECHO command with instructions


I haven't run the batch file because I'm at work and don't want to spend too much time for church stuff while here. I'll get to it after hours.

I'll be writing a simple GUI because I'll be putting a dropdown in there for source file (I don't want folks to have to memorize the crazy path where Sonar is putting the wav file) and the save to location (on web server) will be an option also based on the sermon (Revelation, Jude, 1John, Guest Speaker...). It will also rename and copy the source file to an archive because Sonar names it with a crazy name.

Thanks for all the help!!!
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd September 2014 - 14:37