Recording mp3

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Recording mp3

Ram Rachum
Hi everybody!

I'd like to have a SoX one-liner that would record 1 hour of audio to mp3. I'm on Window 7. Is this possible? 


Thanks,
Ram.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Jan Stary
On Oct 24 21:52:18, [hidden email] wrote:
> Hi everybody!
> I'd like to have a SoX one-liner that would record 1 hour of audio to mp3.

This and other examples are described in
the Introduction section of the manpage.

> I'm on Window 7. Is this possible?

Exactly.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Ram Rachum
I searched for it but could not find it. Can you please refer me to it? 


Thanks,
Ram.


On Fri, Oct 25, 2013 at 9:30 PM, Jan Stary <[hidden email]> wrote:
On Oct 24 21:52:18, [hidden email] wrote:
> Hi everybody!
> I'd like to have a SoX one-liner that would record 1 hour of audio to mp3.

This and other examples are described in
the Introduction section of the manpage.

> I'm on Window 7. Is this possible?

Exactly.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Jan Stary
On Oct 25 21:39:43, [hidden email] wrote:
> I searched for it but could not find it. Can you please refer me to it?

The manpage comes with your installation
(how exactly did you install sox?)

It is also available online:
http://lmgtfy.com/?q=SoX+manual



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Ram Rachum
I did see the manpage online but couldn't find the example for recording an mp3 in it. Would you care to show me the example for this in the manpage?


On Fri, Oct 25, 2013 at 10:42 PM, Jan Stary <[hidden email]> wrote:
On Oct 25 21:39:43, [hidden email] wrote:
> I searched for it but could not find it. Can you please refer me to it?

The manpage comes with your installation
(how exactly did you install sox?)

It is also available online:
http://lmgtfy.com/?q=SoX+manual



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

keghn
 Hello.
 If you have mplayer on your system:

mplayer -endpos "00:00:10" http://pub3.di.fm:80/di_clubsounds -vc null -cache 5000 -ao pcm:waveheader:file=out.wav && sox out.wav out.mp3

 I believe mplayer will install on windows.
 -endpos is " hours : minutes : seconds"  the above has ten second and stops.
 This works on linux little buggy.
for and hour you might have to change the cash to like 10000 or greater. But if
the cache run out i think it will complain but still work.
10meg = around 1 minute wav. Sox will change it to out.mp3.
.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Ram Rachum
I don't use mplayer. And I wonder, why an mplayer recommendation and not SoX? I'd think that the task I want (recording an mp3) is almost the "hello world" of audio and that SoX is capable of much more complex things. So where is the SoX one-liner (or two-liner) that'll let me do that? 



On Sat, Oct 26, 2013 at 2:46 AM, <[hidden email]> wrote:
 Hello.
 If you have mplayer on your system:

mplayer -endpos "00:00:10" http://pub3.di.fm:80/di_clubsounds -vc null -cache 5000 -ao pcm:waveheader:file=out.wav && sox out.wav out.mp3

 I believe mplayer will install on windows.
 -endpos is " hours : minutes : seconds"  the above has ten second and stops.
 This works on linux little buggy.
for and hour you might have to change the cash to like 10000 or greater. But if
the cache run out i think it will complain but still work.
10meg = around 1 minute wav. Sox will change it to out.mp3.
.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Doug Cook-2
If you have sox's mp3 support properly configured, the one-liner is:
 
sox -d filename.mp3
 
The "-d" means "use the default audio input device as the audio source". The filename.mp3 means "use the filename.mp3 file as the audio destination".
 
If you don't want to use the default audio input device, you can be more specific:
 
sox -t waveaudio 0 filename.mp3
 
This means "use waveaudio device number 0 as the audio input device". If your computer has more than one audio input source, it is hard to predict which one will get which number, so you may need some trial and error to get the right number.
 
You'll need to look in the manual for details for the mp3 audio format for information about how to get sox's mp3 support properly configured (e.g. you'll need to find a copy of the LAME DLL) and how to change the encoding parameters for the mp3 format.


On Fri, Oct 25, 2013 at 5:05 PM, Ram Rachum <[hidden email]> wrote:
I don't use mplayer. And I wonder, why an mplayer recommendation and not SoX? I'd think that the task I want (recording an mp3) is almost the "hello world" of audio and that SoX is capable of much more complex things. So where is the SoX one-liner (or two-liner) that'll let me do that? 



On Sat, Oct 26, 2013 at 2:46 AM, <[hidden email]> wrote:
 Hello.
 If you have mplayer on your system:

mplayer -endpos "00:00:10" http://pub3.di.fm:80/di_clubsounds -vc null -cache 5000 -ao pcm:waveheader:file=out.wav && sox out.wav out.mp3

 I believe mplayer will install on windows.
 -endpos is " hours : minutes : seconds"  the above has ten second and stops.
 This works on linux little buggy.
for and hour you might have to change the cash to like 10000 or greater. But if
the cache run out i think it will complain but still work.
10meg = around 1 minute wav. Sox will change it to out.mp3.
.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Jan Stary
In reply to this post by Ram Rachum
On Oct 25 23:01:56, [hidden email] wrote:
> I did see the manpage online but couldn't find the example for recording an
> mp3 in it. Would you care to show me the example for this in the manpage?

This is getting silly.
http://sox.sourceforge.net/sox.html
There is an "Introduction" section at the beginning,
containing a lot of examples. Read that section.
The thing you want is in there.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Jan Stary
In reply to this post by Ram Rachum
On Oct 25 19:46:13, [hidden email] wrote:
>  If you have mplayer on your system:
> mplayer -endpos "00:00:10" http://pub3.di.fm:80/di_clubsounds -vc null -cache 5000 -ao pcm:waveheader:file=out.wav && sox out.wav out.mp3

Why would you recommend mplayer to record audio
on the SoX mailing list?

On Oct 26 03:05:48, [hidden email] wrote:
> I don't use mplayer. And I wonder, why an mplayer recommendation and not
> SoX? I'd think that the task I want (recording an mp3) is almost the "hello
> world" of audio and that SoX is capable of much more complex things.

Of course.

> So where is the SoX one-liner (or two-liner) that'll let me do that?

In the Introduction section of the SoX manpage.
(Where else would it be.)


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

Ram Rachum
In reply to this post by Jan Stary
Thank you everyone for your help.


On Sat, Oct 26, 2013 at 9:24 AM, Jan Stary <[hidden email]> wrote:
On Oct 25 23:01:56, [hidden email] wrote:
> I did see the manpage online but couldn't find the example for recording an
> mp3 in it. Would you care to show me the example for this in the manpage?

This is getting silly.
http://sox.sourceforge.net/sox.html
There is an "Introduction" section at the beginning,
containing a lot of examples. Read that section.
The thing you want is in there.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Recording mp3

keghn
In reply to this post by Doug Cook-2



-----Original Message-----
From: Doug Cook <[hidden email]>
To: sox-users <[hidden email]>
Sent: Fri, Oct 25, 2013 5:18 pm
Subject: Re: [SoX-users] Recording mp3

If you have sox's mp3 support properly configured, the one-liner is:
 
sox -d filename.mp3
 
The "-d" means "use the default audio input device as the audio source". The filename.mp3 means "use the filename.mp3 file as the audio destination".
 
If you don't want to use the default audio input device, you can be more specific:
 
sox -t waveaudio 0 filename.mp3
 
or:
play -q -t mp3 http://pub3.di.fm:80/di_clubsounds & rec -M -t mp3 http://pub3.di.fm:80/di_clubsounds -c 2 out.mp3

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users