Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ffmpeg -f alas -i hw:0,0 -acodec libmp3lame stream.mp3
In both cases it appears that something's being recorded (well... the output file is growing in size while the commands are running), but in neither case does the resulting file seem to have and audio recorded in it.
I've also tried:
Code:
arecord -f cd stream.wav
which gets me the same result.
UPDATE: A WAV file created using the first ffmpeg command and allowed to run for about 15s looks like this when viewed:
Code:
$ od -c stream.wav
0000000 R I F F 250 035 ' \0 W A V E f m t
0000020 022 \0 \0 \0 001 \0 002 \0 200 273 \0 \0 \0 356 002 \0
0000040 004 \0 020 \0 \0 \0 L I S T 032 \0 \0 \0 I N
0000060 F O I S F T 016 \0 \0 \0 L a v f 5 5
0000100 . 3 3 . 1 0 0 \0 d a t a ` 035 ' \0
0000120 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
11616660
Any hints on where to begin debugging this?
I've seen a post where someone mentioned that you could have problems if your sound card prevented you from capturing from the PCM device. Am I getting burned by this with the SB Live!?
Any hints, tip, gotchas are welcomed.
TIA...
--
Rick
Last edited by rnturn; 06-10-2014 at 12:54 PM.
Reason: Added dump of WAV file format.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
Quote:
Originally Posted by metaschima
Have you tried using streamripper ?
Tried it but one it seems to be limited in the streaming formats it supports. And wouldn't you know it that the first source I tried to capture with it failed with an unsupported format error. (That site I was trying to capture was the site that got me interested in being able to capture streaming audio in the first place.)
Anyway... I figure that once it's gotten to the PCM device -- or some other sound device on the way to the speakers -- it's been through the decoding process and I wouldn't have to worry about Shoutcast/Icecast/SomeOtherCast formats. Unfortunately, what I'm getting is a whole lot of silence so either I'm connecting to the wrong device, some ffmpeg switch I'm using is wrong, or I've forgotten an important switch.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
Quote:
Originally Posted by DJ Shaji
The problem is with your particular sound card. It may or may not support full duplex. See the compatibility list for details.
Parts of the ALSA site don't seem to have had much in the way of updates since 2006 (at least not the pages related to the card/driver I'm using). The driver listed on the site is only a couple of minor maintenance releases newer than the one I'm using that came bundled with OpenSUSE 12.2 -- 1.0.25 vs. 1.0.27.
The card (PCI512) is an old one that I've had running in several different computers over its lifetime. It would not surprise me if it weren't lacking in some newer features. On the other hand I've been using a pretty bare-bones ".asoundrc" file so it's always possible a more sophisticated configuration file would enable access to some slicker features. I'll be looking at what I might be missing in .asoundrc that could be preventing recording from working.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
Quote:
Originally Posted by metaschima
I would try using mplayer -dump* options.
Heh, heh...
I still haven't been able to get Mplayer to even play a stream. When I enter a URL, I see messages that appear to indicate that it's connecting and that some information is being downloaded (and buffered) and then... nothing. I'm guessing that the "stations" I want to listen to are not using a format that's Shoutcast/Icecast-compatible. Nothing on the station web pages indicate any of the specs for how they're streaming though I can listen via Firefox. Maybe there's an option (or two) for mplayer that can select a different format but I haven't plowed through all 145 pages[1] of mplayer(1) yet. BTW, I haven't run across a clear explanation (i.e. example command line) of any "dump" switch yet. Probably best to figure out "play" first... then "dump" later.
--
Rick
[1] - That's how many pages you get when you run the mplayer(1) man page file through groff. Whew!
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
Interim report:
I was able to make a recording of the radio program I was interested in grabbing but I had to use a completely non-Linux solution: recording the OTA signal on my Cowon and then downloading and converting the WMA-format file to WAV and MP3 versions.
I'm still forging ahead to be able to do recording from the streaming data, though.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Original Poster
Rep:
Quote:
Originally Posted by metaschima
Try using audacity to record it, I've used it in the past and it seems to work.
One of the first applications I tried was Audacity. No luck. I'm looking at my sound card configuration at a very low-level to see what might be wrong. Not rant too much about it but the introduction of Pulse Audio has made things much harder to work with. You're never sure just piece of software is not working when things go south. Though playback has always seemed to work OK, it's been a couple of OpenSUSE/SUSE releases since I've been able to record anything but back then I wasn't much interested in recording. Now that I am sound setup has turned into a pain in the butt. (Thanks a pile RedHat.)
Later... (It's too nice a day to get frustrated over sound when my bike is calling me. )
Hi again! See, I actually have a SoundBlaster Live! 5.1 vx card that I brought specifically for recording, and I can tell you the driver (CA0106) has some issues with full duplex. You may or may not be able to record, but the solution lies in that direction. Pulseaudio has nothing to do with it. It's a driver issue. See here and here for info. You can record with any software once you resolve the driver issue. I have to set some options in alsamixer for recording through MIC/LINE IN, and I suppose you have to do something similar. Do check the above pages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.