Record from a cassette player -> convert to mp3

Hello There
I am trying to record a tape using my microphone jack and was looking to do all the input and conversion to mp3 in one swoop.

All the bits seem to work and I can use audacity to record but I was trying to use something like the tccat command below.

The ffmpeg stuff works fine and I can mess with all the different switches and pipe a wav file into tccat (tccat -i somefile.wav) but I was hoping to get tccat to read directly fromm the microphone.

Looking at audacity it seems to like a device called /dev/dsp0 to use as a microphone but I do not seem to have one in my /dev directory only /dev/dsp0.0 (and friends).

Am I missing something to setup the /dev/dsp0 stream and what command line util could I use.


tccat -i /dev/dsp0 | ffmpeg -i - 512k -acodec mp2 -ac 2 -ab 128k 5.mp3

thanks in advance.
 
Have you ever consider a more "orthodox" method like using RCA or 3.5mm (male-male) stereo cable trough an audio interface? You will reach a more satisfactory rip than the result of recording with ambient mics.

Sorry for not helping, I'm not completely familiar with /devs in FreeBSD yet.
 
Code:
 cat /dev/sndstat
should help find the device.

But your also going to want to make sure that mic, rec and igain are not at zero:

Code:
roddierod@atomizer$ mixer
Mixer vol      is currently set to  90:90
Mixer bass     is currently set to  50:50
Mixer treble   is currently set to  50:50
Mixer pcm      is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer line     is currently set to  75:75
Mixer mic      is currently set to   0:0
Mixer cd       is currently set to  75:75
Mixer rec      is currently set to  75:75
Mixer igain    is currently set to   0:0
Mixer ogain    is currently set to  80:80
Mixer line1    is currently set to  75:75
Mixer phin     is currently set to   0:0
Mixer phout    is currently set to   0:0
Mixer video    is currently set to  75:75
 
Howdy
My sound stuff works ok it is actually what I am trying to do command line that I am not sure of

Code:
cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA Sigmatel STAC9220 PCM #0 Analog> (play/rec) default


tccat -i /dev/dsp0 | ffmpeg -i - 512k -acodec mp2 -ac 2 -ab 128k 5.mp3

Will tccat even do this or do i need some other command line sound recording binary the I can then pipe to ffmeg to do the conversion?
 
Ah sorry I did not see the mixer stuff.
maybe
mixer (some arguemnts) | ffmpeg -i - 512k -acodec mp2 -ac 2 -ab 128k 5.mp3
 
Found this in some archive - looks promising - will give it a go. Maybe ffmpeg was all I needed. Even has the correct arguemnt fo mp3 output.

ffmpeg -f oss -i /dev/dsp0.0 -vn -acodec libmp3lame -ab 128k output.mp3

Will capture the output of your sound card and encode to 128k .mp3 in the above example.
Turn your record up a little.
You'll also need to start ffmpeg first and then start the media playing or ffmpeg will tell you that the device is busy.


Code:
[oss @ 0x8961c010]/dev/dsp0.0: Device busy
/dev/dsp0.0: Input/output error

Device Busy hurdle looks a bit frustrating -
 
The above command will capture the output of your sound card and encode it to output.mp3 That is if your sound device is /dev/dsp0.0

You'll need to launch ffmpeg, then start using your sound system. You can edit it later with ffmpeg or mencoder.
 
All the other /dev/dsp devices would result in a device busy message. This ended up doing the trick and working to record the stream comming in on cable straight to the mp3 file.


ffmpeg -f oss -i /dev/dsp0.2 -vn -acodec libmp3lame -ab 128k output.mp3

Thanks
 
Back
Top