LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2012, 03:53 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Having problems with sox syntax.


I have a set of 24-bit WAV files and have been trying to use sox to transform them to 16-bit CDDA (CD digital audio, the format originated by Sony and Philips back in the 1980s). The syntax I used is
Code:
$ sox -b 24 violin_2a.wav violin_2a.cdda    
sox: Can't open input file '24': No such file or directory
Sox believes the option is the file. But according to the man page, it shoudn't. The entire O.S. has just been reinstalled.

Please do not tell me to use another program coz I want to use sox and, what's more important, learn how to properly use it.

sox 12.18.1
slackware 12.0
kernel 2.6.21.5
 
Old 10-25-2012, 07:43 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Just run:

Code:
sox violin_2a.wav violin_2a.cdda
The wav has a header, and so you don't need to specify any options.
 
Old 10-25-2012, 07:47 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
You're right, but then it says "I can't understand the wav size". But aplay plays it OK.
 
Old 10-25-2012, 08:40 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Check the output of file:
Code:
bash-4.2$ file test.wav 
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 bit, stereo 44100 Hz
You can convert it more explicitly like:
Code:
sox -c 2 -e signed-integer -b 24 --endian little -r 44100 test.wav -c 2 -e signed-integer -b 16 --endian little -r 44100 test.cdda
 
Old 10-25-2012, 09:07 AM   #5
highpass
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
From the changelog:

sox-13.0.0 2007-02-11
o Add support for 24-bit PCM raw, wav WAVE_FORMAT_EXTENSIBLE) [FR# 801015], au, aiff, & flac files. (robs)

So you need to upgrade.
 
Old 10-25-2012, 09:56 AM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by highpass View Post
From the changelog:

sox-13.0.0 2007-02-11
o Add support for 24-bit PCM raw, wav WAVE_FORMAT_EXTENSIBLE) [FR# 801015], au, aiff, & flac files. (robs)

So you need to upgrade.
There are two different problems here. One, sox doesn't understand the syntax, two, it seem not to recognize the format. I think I must solve the first one first. -b 24, -b 16, et cetera are being taken as file names.I have used sox 12.18.1 in the past and never saw something like this. And the O.S. has just been installed.
 
  


Reply



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
sox package, Slackware 13.1, fails on sox 1.wav -e stat burbabro Slackware 1 05-04-2011 02:26 AM
Make fails when trying to install SoX. Libpng problems. bharat411 Linux - Software 2 10-30-2010 12:40 PM
syntax with SoX & lame audio recording rotezecke Linux - Newbie 0 02-25-2008 07:52 PM
SOX problems! arunsam Linux - Newbie 2 10-18-2006 12:42 AM
Xawtv / Sox Sound problems (K7N2 w nvsound) conn-fused Linux - Software 0 10-07-2004 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration