[pvrusb2] Recording from radio

Mike Isely isely at isely.net
Sat Jan 20 23:23:20 CST 2007

On Sat, 20 Jan 2007, Rick Macdonald wrote:

> Anticipating getting the radio working, I've spent many hours now trying 
> to figure out how to record from it.
> cat /dev/radioX > file.mpg
> works, but gives an MPEG file with no video. I want a wav file or 
> something that I can convert to mp3. My motherboard sound (Intel ICH7), 
> according to ALSA (amixer), only captures from front and rear Mic, Line 
> In and CD. As far as I can tell, the radio signal is in the PCM device, 
> but I can't figure out how to record it. I've been trying to understand 
> ALSA plugins (for ~/.asoundrc) but nothing has clicked yet.
> Here's my amixer output in case there's something I missed.

The audio you want is embedded within the mpeg stream emitted by the 
driver.  Right now the mpeg stream is all that is possible.  But all is 
not lost.  You should be able to post-process the mpeg stream and 
extract out the audio as a normal mp3 stream.  I'm pretty sure this can 
be done with some mplayer and / or mencoder magic.  There may also be an 
ffmpeg tool for this too.  I'll bet that others here can fill in more 
detail about this.

Obviously it would be much better if the hardware just gave back a pcm 
stream when in radio mode.  That *might* be possible, but it needs more 
investigation.  It's one of the things on my somewhat lengthy to-do 
list.  Don't get your hopes up though.  This ability - if possible - may 
be a while.  In the mean time, post-processing the data should be 

                        |         Mike Isely          |     PGP fingerprint
     Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                        |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                        |                             |

More information about the pvrusb2 mailing list