On 05-11-07 02:16, Carlos Hernandez wrote:
> I'm sorry. I will try to say it again...
>
> sure you know Mp4live, the live encoder and broadcaster from the MPEG4IP
> project. Mp4live only can read audio from OSS or ALSA devices... I got
> one "file.wav" pcm 16 bits, 44100 hz stereo, I want to send the audio
> from this file to mp4live.
>
> The question is....: is there any way to send the audio from this
> "file.wav" to an ALSA o OSS device and thus read the data with mp4live
> from this device?
Yes, you can use the "file" plugin for this purpose. You will need to feed
the plugin from a raw file, so first make sure you have one:
aplay -D file:foo.raw foo.wav
foo.raw is basically foo.wav minus its 44 byte header; any size difference
beyond those 44 bytes is caused by alignment. You can listen to this file with:
aplay -f cd foo.raw
Ofcourse, replace "-f cd" with the correct format parameters if your foo.wav
was not 44100/16/2.
Then, you'll need a PCM that reads from this file. Create a ~/.asoundrc (or
add to an existing one) with:
pcm.infile {
@args [ FILE ]
@args.FILE {
type string
}
type file
slave {
pcm null
}
file /dev/null
infile $FILE
}
You can now record from the "infile:foo.raw" device, specifying the same
format parameters again:
arecord -D infile:foo.raw -f cd bar.wav
Note that arecord will not end itself after the input file is depleted or
anything; it will happily wait around for more data to appear. Simply
interrupt it (Ctrl-C)...
I don't know mp4live. You need to know how to specify the "infile:foo.raw"
device, format parameters and how to tell it the input has dried up...
HTH.
Rene
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user