LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 10-17-2009, 06:12 PM   #1
donnied
Member
 
Registered: Oct 2006
Distribution: Debian x64
Posts: 163
Thanked: 0
How to convert mp3 to raw data using the command line


[Log in to get rid of this advertisement]
I recently needed to convert mp3's to raw audio using the command line. There are many great links out there for how to do this; however, many of the command line options are deprecated and have been for a while. I liked this link.
The following currently works:
Code:
for i in $(ls *mp3); do ffmpeg -i $i "$i.wav"; done
for i in $(ls *wav); do sox -r 48k  -b 16 -L -c 1 $i $i.raw; done
Before burning you can check the sound with:
Code:
play -r 48k -s -b 32 -L -c 1 somefile.raw
linuxdebian donnied is offline  
Tag This Post , , , , ,
Reply With Quote
Old 10-17-2009, 06:29 PM   #2
donnied
Member
 
Registered: Oct 2006
Distribution: Debian x64
Posts: 163
Thanked: 0

Original Poster
Using the playback code above things work fine. However, when trying to play as a CD the sound is distorted and atrocious. What are the specifications to convert a wav to a suitable raw file for a CD? This thread looked promising but didn't work for me.

Last edited by donnied; 10-17-2009 at 07:23 PM..
linuxdebian donnied is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
client server raw socket without using command line argument edens_2001 Linux - Networking 1 03-13-2007 08:14 AM
How do I convert to an Integer with the Command Line? falcon56215 Linux - Software 10 02-17-2007 02:58 PM
cmd line prog to convert mp3 samplerate kmasaryk Linux - Desktop 4 11-25-2006 01:05 AM
recording raw binary data as an MP3 uman Linux - General 1 02-19-2005 10:07 PM
mp3 batch convert, remote from command line zerodot Linux - Networking 1 02-12-2003 06:08 AM


All times are GMT -5. The time now is 04:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration