2

I have a list audio file paths and extensions in a CSV file that looks like this:

Path        Extension  
~/src/0000  .wav
~/src/0001  .aif
~/src/0002  .wav

I need to run LAME on each file converting it to a standard format. The problem is LAME won't run on a source file without an extension. Is it possible to specify a file extension (as a parameter) without renaming the source file (renaming will be difficult in my case)? My current efforts yield:

> lame ~/src/0000 ~/dst/0000.mp3
Warning: unsupported audio format

2 Answers2

3

It is not true, lame can even read the input file from stdin if you give it - as a name.

Are you sure the input file is in the correct format? You can use the file util to check.

Have you read lame man page to see if some option is required for your input file?

enzotib
  • 92,255
  • 11
  • 164
  • 178
2

There's another way without renaming the source file: create a symbolic link.

ln -s ~/src/0000 ~/tmp/0000.wav
lame ~/tmp/0000.wav ~/dest/0000.mp3
htorque
  • 63,950
  • 40
  • 194
  • 219