LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-15-2011, 08:11 AM   #1
matt_thumper
Member
 
Registered: Feb 2010
Posts: 37

Rep: Reputation: 15
Question What's Wrong with sox?


Hi,

I have a bunch of .wav files that I play regularly. I play them on both my Windows 7 box and my Fedora box (I have copies on both computers). On the Fedora machine I have used Rhythm Box and Totem and the .wav files play just fine.

When I try to use sox (either 'play filename.wav' or 'sox filename.wav -d') it's really screwy. The .wav files play very fast and are very stilted (skipping).

I am really completely ignorant about the wav files. I just recorded them from my CDs many moons ago on an older Windows XP machine.
So, when I went to *try* some of the many, many, many (and complicated, complicated, complicated) sox command-line options I didn't have luck getting them to play nicely. All I was able to achieve was to slow the song down so it didn't sound like a chipmunk - but like a person; but it was still stilted - skipping - a bunch.

About a year ago on an earlier version of Fedora sox was working just fine for me - and these same wav files. I even popped it (sox) into a ksh script to randomly play songs. But the current version of sox won't work. 2 days ago I reinstalled it (yum) - but still no luck, it plays the same.

I want to use sox again and be able to use the ksh script to play them randomly.

So what can I do (?):
a) I am ignorant about the wav files themselves (other than file size)
b) the wav files work fine under a bunch of other applications and platforms (so they are OK)

Any help is appreciated!
Matt

Last edited by matt_thumper; 02-15-2011 at 08:23 AM.
 
Old 02-15-2011, 08:48 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
This is not really an answer to your question, but why don't you use a lossless codec such as FLAC? It will reduce the size of your files but retain perfect quality (WAV files have no compression).
 
Old 02-16-2011, 08:07 PM   #3
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
It would be a lot easier to diagnose your problem had you provided the sox version you're using and your distro. My first guess is that some audio server is running. Try "killall pulseaudio" and " killall artsd" and "killall esd". Try upgrading your package to the latest version. Try using alsa instead of oss for output.
 
Old 02-16-2011, 08:20 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
The symptoms sounds like the headers for the files are odd and sox is having difficulty assuming the right specs of the content. It could also be that the syntax you're using in not compatible with your sox version. Or something else odd is going on. dmix, pulse audio, esd, artsd, jackd, ... or other things fighting for resources. Or everything is trying to work at the same nice level. You might try launching the less important things with a nice -n 19 <command> to make things play nicer with each other. When I'm editing video and such I've adopted that route. It lets me use the computer for other things while something that's going to take a while is processing.

If it's headers, perhaps explicitly stating them will help.

$ play -s -2 -c 2 -r 44100 file.wav

(Syntax may vary depending on sox version. And content being played.)

Of course with linux you have several player options to choose from.
aplay
mplayer
ffplay
...
...
...

.
 
  


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
Need help with first time use of SoX jonaskellens Linux - Newbie 3 08-17-2010 02:28 AM
Using SoX eQuinas Linux - Software 2 04-20-2008 10:21 PM
Documentation for Sox ? arubin Linux - Software 8 01-12-2007 07:08 AM
SoX karunesh General 1 08-09-2005 01:07 PM
SOX - Save Our X benjaminrtz Linux - General 6 09-01-2002 10:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:54 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