[pvrusb2] Recording from radio
Rick Macdonald
rickm at timshel.ca
Sun Jan 21 00:20:43 CST 2007
Mike Isely wrote:
> 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
> possible.
>
>
Mike - Thanks, the splitting sounds familiar. I've seen that somewhere
too. I can get by with that.
Should pvrusb2 act as much as possible like ivtv? pvrusb2 creates the
radio0/video0 devices below, the rest are from ivtv due to my internal
PVR-150:
rickm at timshel:~$ ls -l /dev/rad* /dev/vid* /dev/vbi*
crw-rw---- 1 root video 81, 64 2007-01-20 15:01 /dev/radio0
crw-rw---- 1 root video 81, 65 2007-01-20 15:01 /dev/radio1
crw-rw---- 1 root video 81, 224 2007-01-20 15:01 /dev/vbi0
crw-rw---- 1 root video 81, 0 2007-01-20 15:01 /dev/video0
crw-rw---- 1 root video 81, 1 2007-01-20 15:01 /dev/video1
crw-rw---- 1 root video 81, 24 2007-01-20 15:01 /dev/video24
crw-rw---- 1 root video 81, 32 2007-01-20 15:01 /dev/video32
I found this on the web, for a PVR-500 which is one card with 2 PVR-150s
on it:
lrwxrwxrwx 1 root root 6 Dec 29 06:27 /dev/video -> video0
crw-rw----+ 1 root video 81, 0 Dec 29 06:27 /dev/video0
crw-rw----+ 1 root video 81, 1 Dec 29 06:27 /dev/video1
crw-rw----+ 1 root video 81, 24 Dec 29 06:27 /dev/video24
crw-rw----+ 1 root video 81, 25 Dec 29 06:27 /dev/video25
crw-rw----+ 1 root video 81, 32 Dec 29 06:27 /dev/video32
crw-rw----+ 1 root video 81, 33 Dec 29 06:27 /dev/video33
Tuner unit #1:
/dev/video0 - The encoding capture device (Read-only)
/dev/video24 - The raw audio capture device (Read-only)
/dev/video32 - The raw video capture device (Read-only)
/dev/radio - The radio tuner device
/dev/vbi0 - The "vertical blank interval" (Teletext) capture device
Tuner unit #2:
/dev/video1 - The encoding capture device (Read-only)
/dev/video25 - The raw audio capture device (Read-only)
/dev/video33 - The raw video capture device (Read-only)
/dev/vbi1 - The "vertical blank interval" (Teletext) capture device
I'm wondering if pvrusb2 should be creating and feeding the extra "raw"
devices video24/video32 (and vbi?). If they exist already, you add 1 to
each.
...RickM...
More information about the pvrusb2
mailing list