[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Record or Download RTMPT Stream



On Thu, Dec 04, 2008 at 08:44:32 -0700, wauhugo@yahoo.com wrote:
> Florian Kulzer wrote:
>
>> [...]
>> This ~/.asoundrc works for me to copy the PCM output to a file
>> independent even if the capture device is set to my microphone:
>>
>> http://www.swview.org/node/213

[...]

> With this .asoundrc file can I hear no more sound from AlsaPlayer and  
> other players
> BUT the rtmpt stream is still playing from the flash-thingy in the web  
> browser through the speakers.

I think you misunderstand how this is meant to work: You are supposed to
still hear the sound normally through the speakers and at the same time
the raw audio data should be dumped to the file that you specified in
~/.asoundrc.

Here are the details of what I tried:

1) I took the configuration from the website mentioned above and saved
   it as ~/asoundrc. The only change I made was to shorten the output
   filename to /tmp/test.raw.

2) I opened iceweasel and visited the website that you pointed out
   earlier. They seemed to have a problem with the audio streams
   (temporarily unavailable), so I played one of their videos instead
   (also with the flash plugin). I heard the sound of the video and at
   the same time /tmp/test.raw kept growing as the audio data was saved.

3) I stopped the video after about 40 seconds, closed iceweasel and
   deleted (renamed) ~/.asoundrc. This is important because otherwise
   /tmp/test.raw will be overwritten as soon as you play anything else
   via alsa.

4) I could then play back the captured audio like this:

   aplay -t raw -c 2 -f S16_LE -r 48000 /tmp/test.raw

   The RAW file format does not contain any information about the
   sampling rate, the number of channels and the data format, therefore
   I had to specify these parameters as command line options. Such a RAW
   file needs about 11.5 MB per minute of captured audio since there is
   no data compression.

5) If I wanted to keep the recording then I could downsample and
   convert it to a standard-quality OGG file like this:

   oggenc -r -C 2 -B 16 --raw-endianness=0 -R 48000 --resample 44100 --output=recording.ogg /tmp/test.raw

[...]

> Could it be true that only the following devices have CAPTURE capabilities?
> 'IntMic',0
> 'Int Mic',0
> 'ExtMic',0
> 'Ext Mic',0
> 'Digital',0

That is certainly possible; it could be a limitation of your hardware or
the driver. The author of the swview.org page states that he does not
have a 'Mix' device either.

> Is there a chance to play and record the stream through the 'Digital',0  
> device?

My sound chip (Intel 82801H HD Audio [8086:284b]) does not allow me to
set capture on 'Digital', but I don't know if this is the same for other
hardware.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |


Reply to: