LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-24-2012, 03:42 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Rep: Reputation: 255Reputation: 255Reputation: 255
how to use SOX and libsox-fmt-mp3 ?


Hello,

after installing the package libsox-fmt-mp3 , I would like to know how to make sox play a given mp3 and also how to pipe an internet mp3 stream to sox (mp3)?



Quote:
play -t alsa=hw:1,0 stream.mp3
not working either
Quote:
debian:~$ set AUDIODEV=hw:1,0
debian:~$ play "http://myurlstream.mp3"
same problem, it does not be capable to play on my second sound card (aplay, mplayer, ... can very well, but not sox)
Quote:
play -t alsa plughw:1,0 "http://myurlstream.mp3"

too bad that sox is buggy

and forget to use sox to make an mp3 and then aplay
Quote:
sox livestream.mp3 -r 8000 -t mp3 -
sox WARN mp3-util: MAD lost sync
sox FAIL formats: can't open output file `-': SoX was compiled without MP3 encoding support


Thank you if you know ...

Greetings

Last edited by Xeratul; 03-24-2012 at 04:24 AM.
 
Old 04-04-2012, 03:08 AM   #2
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,364

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Looks like your copy of sox has been crippled, perhaps by your packagers? sox is quite capable of encoding to mp3:

Code:
sox --show-progress 01.Shine\ On\ You\ Crazy\ Diamond\ \(Part\ One\).ogg -C -2 Crazy.mp3

Input File     : '01.Shine On You Crazy Diamond (Part One).ogg'
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:13:30.80 = 35756280 samples = 60810 CDDA sectors
File Size      : 19.0M
Bit Rate       : 188k
Sample Encoding: Vorbis
Comments       : 
ARTIST=Pink Floyd
ALBUM=Wish You Were Here
TITLE=Shine On You Crazy Diamond (Part One)
DATE=1975
GENRE=Psychedelic Rock
TRACKNUMBER=01
CDDB=440a5905

In:100%  00:13:30.80 [00:00:00.00] Out:35.8M [     =|      ] Hd:0.1 Clip:0    
Done.
Are you missing the package libsox-fmt-all and lame?
 
Old 04-04-2012, 01:30 PM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,649

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by andrew.46 View Post
Looks like your copy of sox has been crippled, perhaps by your packagers? sox is quite capable of encoding to mp3:

Code:
sox --show-progress 01.Shine\ On\ You\ Crazy\ Diamond\ \(Part\ One\).ogg -C -2 Crazy.mp3

Input File     : '01.Shine On You Crazy Diamond (Part One).ogg'
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:13:30.80 = 35756280 samples = 60810 CDDA sectors
File Size      : 19.0M
Bit Rate       : 188k
Sample Encoding: Vorbis
Comments       : 
ARTIST=Pink Floyd
ALBUM=Wish You Were Here
TITLE=Shine On You Crazy Diamond (Part One)
DATE=1975
GENRE=Psychedelic Rock
TRACKNUMBER=01
CDDB=440a5905

In:100%  00:13:30.80 [00:00:00.00] Out:35.8M [     =|      ] Hd:0.1 Clip:0    
Done.
Are you missing the package libsox-fmt-all and lame?
lame is absent from the libsox-fmt-mp3, and -fmt-all too .. .debian squeeze
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
does sox convert .mp3 to .aiff audio file? ejames82 Linux - Software 3 09-15-2011 08:06 PM
libsox-fmt-ogg in Squeeze? jdkaye Debian 1 04-14-2009 04:54 AM
mp3 conversion using sox automate with cron robteks Linux - Software 3 07-18-2008 03:46 AM
sox and mp3 encoding jjonas Linux - Software 1 06-09-2006 11:43 AM
clean up and convert wav 2 mp3 with sox dibblethewrecke Linux - Software 1 12-04-2004 08:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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