2001-03-17 -+- Mike -+- mikep@web.de -+- hi,

i don't think 192kbps is a strange value. mp3 audio with 128kbps is horrible.
If you think 128kbps is near CD-quality, you should consider a trip to your local
ear doc :)

just my 0.02$ 2001-03-18 -+- Don -+- dsaltarelliatnetscapedotnet -+- a better idea may be to change the suse script that does the
cleanup procedure so that it 'renice'es itself to 19. this means
it will only use cpu when nothing else wants it. so in the script,
put (the $$ indicates the current process. all children with also be
niced to 19):

renice 19 $$

my $0.02 2001-03-18 -+- Jens M Andreasen -+- ja@linux.nu -+- Don!

Renicing the cron script will still leave you with the latency
inroduced from cron accessing disks (upto 300ms). This happens
in kernel space.

my SEK 0,50
2001-03-18 -+- Philip de Groot -+- philipg@authors.linuxfocus.org -+- Hello,

I want to comment on the 192 kbps issue. First of all, my ears are quite O.K.. Second, most mp3-files ARE in 128 kbps! Apparently, most users think that this is convenient and everyone has to sort this out by themselve. I don't have a problem with a poorer quality. I use a portable mp3-player in my car to listen to the recorded radio broadcasts, so a lower quality does not really matter. Furthermore, radio quality is also less than CD quality, so 128 kbps should be convenient. But again, everyone has to sort this out by themselves.

About the SuSE script and nicing. I really do not know if this works without any problem. The way I indicated it will definitely prevent flaws in the music recording stream. I think it is the best way to go for standalone machines (which I happen to use at home). For more dedicated machines, nice might help. Very fast disk access and processor speed might help even more. Try it out and let me now!

I will check out this talkback page on a regularly basis, so people can communicate with me through this pages (and let other people also read their matters).

Regards,

Philip de Groot 2001-03-19 -+- Pierre Abbat -+- phma@oltronics.net -+- Don't shut down cron, just comment the cron.daily entry out of the crontab.
In Mandrake this is /etc/crontab and it has hourly, daily, weekly, and monthly
entries. The big time-eaters are slocate (supersedes updatedb, lists all files
on the computer) and makewhatis (compiles an index of all man pages). You can
just chmod -x these in the cron.daily and cron.weekly directories and it won't
run them. 2001-03-21 -+- Domenico Rotiroti -+- -+- Has anyone considered using gogo instead of lame ?
Uses the same encoding algo., but it's notably faster on
intel/amd processors. 2001-03-21 -+- Philip de Groot -+- philipg@authors.linuxfocus.org -+- Hello,

As a matter of fact, I initially tried to use gogo, but it won't work. It is not possible to pass the correct options through to gogo, whereas it works in lame (gogo is derived from lame, but you cannot replace it that easily...). If you want to, you can try for yourself to use gogo. If you are succesfull, please let me now...

Regards,

Philip de Groot 2001-04-04 -+- reihal -+- reihal@technologist.com -+-
All you will ever need to know about setting MP3 encoding can be found at this site: http://www.r3mix.net/
Use his default settings.
100% quality guaranteed! 2001-04-11 -+- Rick Holbert -+- -+- Here's an example script that could be used to record a 90 minute long local computer talk show:

#!/bin/sh
/usr/local/bin/mpegrec \
-l 5400 \
-x '--preset fm \
--tt "Computers in Your Life" \
--tl "Open Line with Tom Wieble" \
--ta "Tom Wieble" --ty `date +%Y` \
--tg "Speech" \
--tc "Copyright (c) 1997 - `date +%Y` WOSU" -c' \
-o open_line_`date +%d%b%y`_`date +%H%M`.mp3

Edit as needed, save it as mp3_record, chmod it to 755, and use cron or at to start it at the appropriate time.

Enjoy!

Rick 2001-04-12 -+- Y -+- Yen7@gmx.de -+- Hello,
just want to ask if anybody got experience with ripping mp3-streams(or real) from the web to the harddisk? I am grateful for any hint or link, perhaps Phillip himself has any ideas? cu Y 2001-04-13 -+- Rick Holbert -+- -+- Here are some programs for saving mp3 and/or real streams to your harddisk:

wget - doesn't yet support rtsp://, try replacing with http://
vsound - runs in front of player i.e., vsound realplay url
streamripper - mp3? haven't tried this one yet

Rick 2001-04-15 -+- Philip de Groot -+- philipg@authors.linuxfocus.org -+- Hello,

I want to comment that a search on mp3-recording on the internet resulted in programs that just store e.g. an mp3-stream locally on the hard disk (it was very hard to find a program such as 'mpegrec' in the first place).. Plenty of programs are available to do this job. It is even possible to click on an mp3-stream and to save it on disk. Another possibility is the use of 'mpg123'. You can use this program to listen to mp3-streams, but it is also possible to store the encoded music as a wave-file:

mpg123 -s http://stream1.prime-sites.nl:10010 > test.wav

The stream here originates from my favorite station, Loostad radio. Fill in any link you like! To play the encoded wave back, the following command will do:

play -r 22050 -t raw -s w -f s -c 1 test.wav (see man pages!)

However, storing the decoded wave-file is very disk-consuming, but it is possible anyway.

And Rick, I have received your email (and seen your listing here). I will include some in the next article about real-time mp3-recording. However, I do not know whether I can manage to publish it in the May issue of LinuxFocus (I am a bit busy, you know).

Regards,

Philip de Groot 2001-04-30 -+- zero§7 -+- -+- it's amazing to me, how many people stake their reputation on 128kbit mp3s.

not that it was worth much to begin with 2001-08-06 -+- pearn -+- pearn@web.de -+- Hy folks!
Iīm looking for a method to do mp3 - realtime-encoding without a increasing wave-file getting ībigger every minute. Is it possible to use a wave-file only as a buffer not getting bigger than letīs say 50MB where every second of wave file is deleted after itīs encoded ?

Thanks a lot..

Pearn 2001-08-06 -+- Philip de Groot -+- philipg@authors.linuxfocus.org -+- Hello,

How you can achieve this is explained in detail in the article. You should use 'mpegrec', which in fatc uses a small memory buffer for the real-time encoding...

Regards,

Philip 2001-11-30 -+- ross randolph -+- rand104@aol.com -+- I am a beginner, and do not understand most of the data presented. How can a beginner start, is there an idiot book or article for me?
I am just learning how to master coping a CD on my CD writer. 2001-12-13 -+- Philip de Groot -+- philipg@linuxfocus.org -+- The MP3 HowTo might be of great help: http://www.linuxdoc.org/HOWTO/MP3-HOWTO-7.html
By the way: I apologize for the late response. I have not visited this page for a while and the automated email-notification system seems to be non-functioning. Regards, Philip 2002-01-05 -+- Samuel Hammond -+- nsxfan2001@yahoo.com -+- I'm looking for a way to stop and start recording when a serial port line (DSR? DTR?) is toggled, maybe also to name the file with the date & time the recording started. Can someone point out a script that will accomplish this? 2002-01-15 -+- Philip de Groot -+- philipg@authors.linuxfocus.org -+- Hello Samuel,

I have no idea how you can accomplish this... Sorry, Philip 2002-02-12 -+- Matt -+- -+- I'm having problems using a script which uses mpegrec from cron. The script which I have written includes the following lines :

/home/u99/n9323400/local/bin/mpegrec \
-b 16 -l 60 -o /home/u99/n9323400/project/test.mp3 \
-x "--resample 16 -a -mm -h"

This was giving me an error that lame could not be found so I made changes so that the location of lame was given explicitly :

/home/u99/n9323400/local/bin/mpegrec \
-e "/home/u99/n9323400/local/bin/lame" \
-b 16 -l 60 -o /home/u99/n9323400/project/test.mp3 \
-x "--resample 16 -a -mm -h"

Now i'm getting the following errors:

Streaming 44100Hz WAV data to:
/home/u99/n9323400/local/bin/lame --resample 16 -a -mm -h

LAME version 3.91 (http://www.mp3dev.org/)

usage: /home/u99/n9323400/local/bin/lame [options] <infile> [outfile]

<infile> and/or <outfile> can be "-", which means stdin/stdout.

Try:
"/home/u99/n9323400/local/bin/lame --help" for general usage information
or:
"/home/u99/n9323400/local/bin/lame --preset help" for information on suggested predefined settings
"/home/u99/n9323400/local/bin/lame --alt-preset help" for information on the seperate and very highly
tuned for quality predefined settings
or:
"/home/u99/n9323400/local/bin/lame --longhelp"
or "/home/u99/n9323400/local/bin/lame -?" for a complete options list

Has anyone ideas what i'm doing wrong? The script is definately running as the radio is starting and i'm getting the error messages, but there is no output.

Cheers,

Matt.


2002-03-14 -+- Philip de Groot -+- philipg@authors.linuxfocus.org -+- Hmmm,

I think that some things in this new version of lame has been changed. Have you tried to compile an older version of 'lame'? This will probably solve your problem!

Regards,

Philip 2002-04-09 -+- clara maria -+- sabba22@hotmail.com -+- kiero bajar musica para mi ordenata 2002-08-27 -+- I Shelton -+- divxname@aol.com -+- I've been trying to record some asf/asx streams with mpegrec (via aviplay).
I am getting "no Inputbuffers!" error all the time.The mpegrec program compiled fine (had to adjust machine type from "march=pentiumpro.." to "march=i586.." in the source file, though).
Also, when I try to record from CD with mpegrec the recorded file runs with double speed on playback! BTW, Lame is v3.92, compiled clean.
I thought my hardware was too obsolete (P233MMX,128Mb RAM 16-bit ALS 120s/c), but on win2000 which I run in parallel to SuSE 8.0 on the same machine I can record streaming media via Total Recorder without any difficulty, and the quality is G-O-O-D! So, obviously it is more of the OS/software problem, because, at the end of the day, all s/w is just a code, nothing more.Is there anything I can do to correct these problems? -+- 172.162.166.213 = Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 WebWasher 3.0 final 2002-08-28 -+- Philip de Groot (original author) -+- philipg@authors.linuxfocus.org -+- Hello,

I have encountered the same problems in SuSE 8.0. It has everything to do with the NEW ALSA 0.9 drivers. For some reason, the ALSA OSS emulation with this new version does not work properly. Even after compiling and installing the latest ALSA drivers (0.9.0rc3), I was unable to solve the problem (on the contrary, I couldn't even play sound anymore)! I have found the OSS compatibility library on their website, but have not taken a closer look to it yet. Anyway, using ALSA 0.9 in SuSE 8.0 as the standard sound driver was VERY premature. Perhaps you should consider compiling the OSS support in instead of using ALSA for the moment (also see my compile-kernel article in the July/August 2002 edition of this magazine).

If anyone has some advice, please inform us!

Regards, Philip -+- 145.117.44.147 = Mozilla/5.0 (compatible; Konqueror/3; Linux) 2002-08-29 -+- I Shelton -+- divxname@aol.com -+- Thank you for your comments. In fact, I 've compiled kernel sound modules, and use sb.o module instead of ALSA. It works with all sound proggies, EXCEPT mpegrec. Now, whenever I try to record streaming asf/asx via AVIPLAY, I get /dev/dsp busy message. I the article you mentioned recording radio transmission. Could you please specify, was it streaming via Internet, or just via radio receiver - plug into "line-in" to s/card - record via mpegrec?
-+- 172.150.178.102 = Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 WebWasher 3.0 final 2002-08-31 -+- Philip de Groot (original author) -+- philipg@authors.linuxfocus.org -+- Hello Shelton,

I was NOT making recordings via the internet. I used a radio receiver and the line-in plugin of my soundcard. If you want to make a recording of a internet transmission, why using mpegrec? I mean: internet streams are in .asf-format which can be stored and replayed, is it not? There is some software available to do so in windows, but storing the stream on harddisk instead of listening should have the same result, I guess!

Succes, Philip -+- 62.59.107.162 = Mozilla/5.0 (compatible; Konqueror/3; Linux) 2002-08-31 -+- I Shelton -+- divxname@aol.com -+- I think I 've found the reason for my problems. Linux sound drivers are "not very good" at initialising full duplex capabilities of legacy ISA sound cards (though, to my knowledge, a lot of people still use them, simply because they are as good as it gets under Windows for the average user!). My s/card would be installed by OSS, kernel or ALSA as a half-duplex device. This device type cannot record and playback simultaniously. That is the reason mpegrec cannot access "second" /dev/dsp: second DMA channel is simply "lost" by Linux driver. -+- 195.93.33.9 = unknown_agent 2002-08-31 -+- I Shelton -+- divxname@aol.com -+- Thank you again for the explanation. That really helps because I thought I've been missing something at my end. Yes, in Windows it is piece of cake, just two clicks away with Total recorder. I've been trying to solve this puzzle on Linux. Storing asf/asx files: yes, you can do with Asfrecord, for example (if you have a cygwin compiler - abt 100MB download, btw), however, direct recording to MP3 format makes sense: it is "editable" straight away you can run any sound manipulator, CD recorder, etc. The difference between radio recording via Internet and through a "radio receiver in line-in" is, as I understand, the same as between digital (=Internet) and analogue (=wave) reception. Internet stream is already bits-and-bites!
-+- 195.93.33.9 = unknown_agent 2002-10-11 -+- -+- -+- Hello,

I'm having problems compiling mpegrec, I've got the following error message:

Building wavrec for a system with 1 processor(s)
Not utilizing libhoard for SMP memory management.
g++ srec.cc -o wavrec -O9 -lpthread -fomit-frame-pointer \
-march=pentiumpro -ffast-math -funroll-loops -fprofile-arcs \
-fbranch-probabilities
srec.cc:0: warning: file srec.da not found, execution counts assumed to be zero.

my configuration: P200, SoundBlaster 128PCI, SuSE 7.3

any help greatly appreciated
thanks

eric



-+- 217.136.3.29 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2002-10-12 -+- Philip de Groot (original author) -+- philipg@authors.linuxfocus.org -+- Hello Eric,
This is no problem at all. The file srec.da is the temporarily file where 'mpegrec' stores the wave-data. You're compiling this program for the first time, so the file does not exist and is created with a size of zero. As it should be! You shouldn't have any problems using 'mpegrec' within SuSE 7.3 (you will in SuSe 8.0 or higher due to the new ALSA-drivers they use in there, but this does not apply to SuSE 7.3 or lower).If you have problems, however, try to omit '-O9'; an optimization parameter that may cause a problem. Regards,Philip -+- 62.59.106.75 = Mozilla/5.0 (compatible; Konqueror/3; Linux) 2002-10-14 -+- eric -+- -+- it was probably this '-O9' parameter, without it mpegrec compiled just fine and it works well now
thank you very much

eric -+- 80.200.205.24 = Mozilla/4.0 (compatible; MSIE 5.5; Windows 95) 2002-12-03 -+- eric -+- -+- hi,
Does mpegrec have an option for selecting the soundcard? I would like to record from my second soundcard. Or must I link /ded/dsp to /dev/dsp1?
Thanks

Regards,

eric -+- 80.200.120.105 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 2003-05-08 -+- Philip -+- philq@DigiDogStudios.com -+- This is really not about this article. But I need a knowledgable person's help. I am a programmer, written in languages from assembler to basic and c plus many others. I have a client who needs me to create a program that can be called and basically given two audio files (probably mp3 format) the first file I need to truncate at 45secs. the send file will be a 'voiceover' file that is 45secs long From these two files I need to produce one file which contains the contents of both and is only 45 secs long. Can you proint to any software that does this or libraries of code that will allow me to do this.
Thank you in advance.

Philip Quirino -+- 64.53.129.251 = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) 2003-05-12 -+- Philip de Groot (original author) -+- <Due to SPAM disabled> -+- Hello Philip (Hee, same name!),

Perhaps these two links might be of help:

http://www.portaudio.com/ (portable cross-platform Audio API)
http://www.zip.com.au/~erikd/libsndfile/ (saves many audio formats!)

I think that the top link (portaudio) gives you the tool to program such a utility. I guess that the only thing that needs to be done is opening both files, mix them throught the soundcard mixer and save the resulting file. The libsnd library provides support for loading and saving popular audio formats (also platform independent). The 2 links above should be a nice starting point.

Regards,

Philip de Groot (author real-time mp3-recording article)
-+- 145.117.44.147 = Mozilla/5.0 (compatible; Konqueror/3; Linux) 2003-09-03 -+- Walt Joyce -+- -+- I just did something stupid and need some help backing out of it. I used the
suggested command line but changed the "-c 2" to "-c 1". Thus, my command
line was: "sox -t ossdsp -w -s -r 44100 -c 1 /dev/dsp -t raw -|lame -x -m s
- ./testfile.mp3". The result is half the expect file size, claims to be half
the expect time length, and plays much too fast (possibly twice the speed
of the original). Is there a way to convert what I have to what I want?

TIA.

Walt Joyce
-+- 216.179.3.104 = Mozilla/4.78 [en] (X11; U; Linux 2.4.7-10 i686) 2003-09-05 -+- Philip de Groot (original author) -+- <due to SPAM disabled> -+- Hello Walt,

What might help is to playback the file with mpg123 --mono <filename>

If this works, you can decode the file back to wave (see manpages of mpg123) en encode it to mp3 again using lame, but WITHOUT supplying the option '-m s' (which forces stereo)

If this does not work, you're in trouble. I do not know whether your obtained mp3-file can be repaired then.

Regards,

Philip -+- 145.117.44.147 = Mozilla/5.0 (compatible; Konqueror/3.1; Linux)