Converting a cassette audio tape (Lecture) to mp3
Hi all, I am running fedora 20 with ffmpeg version N-51556-ge278500 Copyright (c) 2000-2013 the FFmpeg developers I also installed in /opt ffmpeg version N-72985-g7c3f7e6 Copyright (c) 2000-2015 the FFmpeg developers I need a set of steps/commands to convert this tape. I have plenty of audio tools installed - but not certain what else I might need. If anyone has done this before, please share your script. Kind regards, JD
On Sun, Jul 12, 2015 at 11:26:58 -0600, jd1008 wrote:
I am running fedora 20 with
Which is EOL. I just updated to F22 myself today. :-)
I need a set of steps/commands to convert this tape.
Is it already digitized? If so: $ ffmpeg -i audiofile -c:a libmp3lame audiofile.mp3 and adjust your audio settings as you need them (channel count, quality, ...)
I have plenty of audio tools installed - but not certain what else I might need.
If you need to digitize your audio tape first, you need to tell us about your available hardware (though this list is not really for that). You will probably need to check out ffmpeg's "pulse" or "alsa" indevs for capturing. Moritz
On 07/12/2015 11:35 AM, Moritz Barsnick wrote:
On Sun, Jul 12, 2015 at 11:26:58 -0600, jd1008 wrote:
I am running fedora 20 with Which is EOL. I just updated to F22 myself today. :-)
I am loath to updating because I really do not feel the need to. So far, I have 3rd party apps that I built (with some necessary mods) on f20. I do not wish to go through all the rigmarole again on f22 or the impending f23.
I need a set of steps/commands to convert this tape. Is it already digitized?
I have plenty of audio tools installed - but not certain what else I might need. If you need to digitize your audio tape first, you need to tell us about your available hardware (though this list is not really for
If so: $ ffmpeg -i audiofile -c:a libmp3lame audiofile.mp3 and adjust your audio settings as you need them (channel count, quality, ...) No, it is not digitized yet. that). You will probably need to check out ffmpeg's "pulse" or "alsa" indevs for capturing. I have a good (I will not say high) sony tape player with stereo audio out (1/4 inch stereo port). My laptop is the Dell E6510 with Intel i5 2.67GHz quad, and 8GB ram and oodles of swap (embarrassingly 32GB :) ) On the laptop, I have the stereo audio in and audio out. I also have the necessary cable.
Am 12.07.2015 um 19:44 schrieb jd1008:
On 07/12/2015 11:35 AM, Moritz Barsnick wrote:
On Sun, Jul 12, 2015 at 11:26:58 -0600, jd1008 wrote:
I am running fedora 20 with Which is EOL. I just updated to F22 myself today. :-)
I am loath to updating because I really do not feel the need to. So far, I have 3rd party apps that I built (with some necessary mods) on f20. I do not wish to go through all the rigmarole again on f22 or the impending f23
then pull the network connection instead have a system without security updates just because you did not inform yourself *before* install - why the hell do you setup a leading-edge distribution with known 6 month update-cycle instead a CentOS7 with a self built ffmpeg and when needed x264 statically linked in a recent version? why that is my problem? because it's *everyones* problem out there, most attacks, spam and malware is coming from unmaintained systems of careless people wasting energy of responsible sysadmins every single day
On Sun, Jul 12, 2015 at 11:44:48 -0600, jd1008 wrote:
I am loath to updating because I really do not feel the need to. So far, I have 3rd party apps that I built (with some necessary mods) on f20. I do not wish to go through all the rigmarole again on f22 or the impending f23.
Security, my friend! It you don't like the Fedora life-cycle, use something LTS like CentOS.
On the laptop, I have the stereo audio in and audio out. I also have the necessary cable.
I used the pulseaudio volume control GUI to select line as input. Then I did $ pacmd list-sources to find the number of the device with the description "Built-in Audio Analog Stereo", which is '2' in my case. Then I put '2' as input here: $ ffmpeg -f pulse -i 2 -c:a libmp3lame recorded.mp3 This records forever until you press 'q'. It uses some default settings which may or may not be okay for you. You should probably google for "capturing audio linux" to figure out about alsa and pulseaudio if this doesn't work for you. ffmpeg supports both if compiled to do so. Moritz
On 07/12/2015 12:07 PM, Moritz Barsnick wrote:
On Sun, Jul 12, 2015 at 11:44:48 -0600, jd1008 wrote:
I am loath to updating because I really do not feel the need to. So far, I have 3rd party apps that I built (with some necessary mods) on f20. I do not wish to go through all the rigmarole again on f22 or the impending f23. Security, my friend! It you don't like the Fedora life-cycle, use something LTS like CentOS.
On the laptop, I have the stereo audio in and audio out. I also have the necessary cable. I used the pulseaudio volume control GUI to select line as input. Then I did $ pacmd list-sources to find the number of the device with the description "Built-in Audio Analog Stereo", which is '2' in my case. Then I put '2' as input here: $ ffmpeg -f pulse -i 2 -c:a libmp3lame recorded.mp3 This records forever until you press 'q'. It uses some default settings which may or may not be okay for you.
You should probably google for "capturing audio linux" to figure out about alsa and pulseaudio if this doesn't work for you. ffmpeg supports both if compiled to do so.
Moritz OK, so of the 2 ffmpeg's I have installed, I hope one of them will support either pulse or alsa. I will look at other ffmpeg command line options that might be needed to enhance the quality of the recording. As you well know, the audio quality (or more precisely, lack thereof) of tapes and the ambient noises during tape recording, and even the audio quirks of the microphone itself contribute greatly to the noise factor.
Kind regards, JD
On Sun, Jul 12, 2015 at 12:20:25 -0600, jd1008 wrote:
OK, so of the 2 ffmpeg's I have installed, I hope one of them will support either pulse or alsa.
If your older ffmpeg is the one from the rpmfusion repo, then: It certainly supports both. Check with: $ ffmpeg -devices | grep -E "alsa|pulse"
I will look at other ffmpeg command line options that might be needed to enhance the quality of the recording. As you well know, the audio quality (or more precisely, lack thereof) of tapes and the ambient noises during tape recording, and even the audio quirks of the microphone itself contribute greatly to the noise factor.
Ah, well, that makes things more difficult. Except for bandpass, ffmpeg probably doesn't have the right kind of filters. (Feel free to prove me wrong.) You may want to capture to a high-quality lossless format (PCM) with ffmpeg and then apply some advanced filters from other tools: http://wiki.audacityteam.org/wiki/Sanitizing_speech_recordings_made_with_por... Cheers, Moritz
On Sun, Jul 12, 2015 at 12:20:25 -0600, jd1008 wrote:
OK, so of the 2 ffmpeg's I have installed, I hope one of them will support either pulse or alsa. If your older ffmpeg is the one from the rpmfusion repo, then: It certainly supports both. Check with: $ ffmpeg -devices | grep -E "alsa|pulse"
I will look at other ffmpeg command line options that might be needed to enhance the quality of the recording. As you well know, the audio quality (or more precisely, lack thereof) of tapes and the ambient noises during tape recording, and even the audio quirks of the microphone itself contribute greatly to the noise factor. Ah, well, that makes things more difficult. Except for bandpass, ffmpeg probably doesn't have the right kind of filters. (Feel free to prove me wrong.) You may want to capture to a high-quality lossless format (PCM) with ffmpeg and then apply some advanced filters from other tools:
http://wiki.audacityteam.org/wiki/Sanitizing_speech_recordings_made_with_por...
Cheers, Moritz Thank you Morritz. Those are interesting and informative points made on
On 07/12/2015 12:36 PM, Moritz Barsnick wrote: the wiki page. Kind regards, JD
On 07/12/2015 12:36 PM, Moritz Barsnick wrote:
fmpeg -devices | grep -E "alsa|pulse" It outputs: DE alsa ALSA audio output
So, I guess the one I installed in /opt does not support pulse, the one installed in /usr/bin does not recognize the option -devices
On Sun, Jul 12, 2015 at 15:37:16 -0600, jd1008 wrote:
does not support pulse, the one installed in /usr/bin does not recognize the option -devices
Probably a typo in your command line. Moritz
On 07/12/2015 03:52 PM, Moritz Barsnick wrote:
On Sun, Jul 12, 2015 at 15:37:16 -0600, jd1008 wrote:
does not support pulse, the one installed in /usr/bin does not recognize the option -devices Probably a typo in your command line.
The same command is you had outlined. I copied and pasted :) One install (in /opt) only lists alsa, the other install does not recognize -devices
On Sun, 12 Jul 2015, jd1008 wrote:
No, it is not digitized yet.
I have plenty of audio tools installed - but not certain what else I might need.
Personally, I prefer sox for this sort of thing. Also, arecord would do just as well. SoX, I believe, has notes in the man page about doing this exact thing, using some of its effects. You might want to try things like noise removal, EQing, or other similar stuff, beyond the scope of this list. If you prefer more of a GUI, Audacity is your friend. FFMPeg could capture the audio, but this does not seem to be its wheelhouse.
I have a good (I will not say high) sony tape player with stereo audio out (1/4 inch stereo port). My laptop is the Dell E6510 with Intel i5 2.67GHz quad, and 8GB ram and oodles of swap (embarrassingly 32GB :) ) On the laptop, I have the stereo audio in and audio out.
I don't know that laptop in particular, but be careful with all laptops. Things like HD noise or fan noise, or even charger noise, can get into your recording. By "noise", I mean electromagnetic distortions which effect the recording. Better to use an external USB interface, such as the Behringer UCA202 <http://www.amazon.com/gp/product/B000KW2YEI/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B000KW2YEI&linkCode=as2&tag=tacticus&linkId=GJKRVWJLP3PUHSLU>. However, even that will have issues on some laptops. For example, on some, if your battery charger/external power supply is plugged in, all recordings have a very bad high pitched multi-frequency noise, with harmonics all over the place (I.E. very hard to remove through noise reduction, although possible to get rid of somewhat at the cost of audio quality). I suggest always, no matter what the sound devices involved, doing all laptop based recording on battery power, unless you have tested your setup under various conditions so that you know how it behaves, and what kind of artifacts make it into the end result. Given the questions you are asking, no offense, you likely won't have done that. Which is not to say don't use laptops--I use them exclusively--just that you need to be careful, and listen back with really good headphones.:) rec -t wav mytape.wav Might be the most simple command, if all things are setup right. Even: rec -t mp3 mytape.mp3 Will work if you have the right libs installed. Those are the recording shorthand commands for SoX. arecord -D plughw:1 -f cd mytape.wav Might also do it, presuming you can play around with the device number to find the correct one. (Reading the man page and running arecord -L might help). Both of those can be stopped with ctrl-c, although you can also specify time to record for them. Hth. Luke (live audio engineer for ~25 years)
On Sun, Jul 12, 2015 at 11:26:58 -0600, jd1008 wrote:
I am running fedora 20 with Which is EOL. I just updated to F22 myself today. :-)
I need a set of steps/commands to convert this tape. Is it already digitized?
If so: $ ffmpeg -i audiofile -c:a libmp3lame audiofile.mp3 and adjust your audio settings as you need them (channel count, quality, ...)
I have plenty of audio tools installed - but not certain what else I might need. If you need to digitize your audio tape first, you need to tell us about your available hardware (though this list is not really for that). You will probably need to check out ffmpeg's "pulse" or "alsa" indevs for capturing.
Moritz Hi all, I had to resort to doing one file at a time, albeit within a script, which does not flood ffmpeg with a huge list of files, Rather, the filenames are read one at a time from a list of short filenames - such as F_000 F_001 ...etc,
On 07/12/2015 11:35 AM, Moritz Barsnick wrote: like so: For F in F_[0-9]*; do vidfilename=`cat $F` ffmpeg ....etc.... done This way, ffmpeg is not getting confused by a tsunami of stdin
On Fri, Jul 14, 2017 at 12:45:04 -0600, JD wrote: You answered to the wrong thread.
I had to resort to doing one file at a time, albeit within a script, which does not flood ffmpeg with a huge list of files, [...] This way, ffmpeg is not getting confused by a tsunami of stdin
"-nostdin" did not work?????? M.
Ooooops!!! Sorry!!! On 07/14/2017 12:58 PM, Moritz Barsnick wrote:
On Fri, Jul 14, 2017 at 12:45:04 -0600, JD wrote:
You answered to the wrong thread.
I had to resort to doing one file at a time, albeit within a script, which does not flood ffmpeg with a huge list of files, [...] This way, ffmpeg is not getting confused by a tsunami of stdin "-nostdin" did not work??????
M. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (6)
-
JD -
jd1008 -
Jim Shupert -
Luke Davis -
Moritz Barsnick -
Reindl Harald