[Icecast] m3u list - encode/decode?
Geoff Shang
geoff at QuiteLikely.com
Wed Jun 20 16:36:38 UTC 2007
"Tod" <tod at stthomasepc.org> wrote:
> I'm now trying to use an m3u formatted list to pass to ezstream rather
> than stdin. Since all of my audio files are in .wav format, and I have
> oggenc, I see no reason to decode them before ogg encoding them. Is there
> a configuration I can use to make this happen? I tried omitting the
> decode parameter and ezstream complained.
I am not an Ezstream expert, but...
Ezstream is geared to work with raw PCM data internally. Converting
(decoding) to PCM is a relatively cost-free operation, and sox can do it
quite nicely with something like:
sox <filename> -r 44100 -c 2 -t sw -
(for outputting to standard output).
but if you really insist on not converting from wav to PCM, you would of
course need to change the oggenc parameters appropriately, but it could
work. To decode you'd simply need something like:
cat <filename>
> <encdec>
> <!--
> Support for Vorbis decoding via oggdec, and encoding via
> oggenc:
> -->
> <format>WAV</format>
> <match>.wav</match>
> <encode>oggenc -r -q 1.5 --resample=44100 -t "@M@" -</encode>
>
> </encdec>
This isn't going to do it. What you've told it to do here is how to
*encode* wav files, but you're actually using oggenc to do it so even that
won't work.
At the very least, you need to tell it how to *decode* wav files and how to
encode vorbis files. Perhaps something like the following:
<encdec>
<format>WAV</format>
<match>.wav</match>
<decode>sox "@T@" -t sw -</decode>
<encode>sox -t sw -r 44100 -c 2 - -t wav -</encode>
</encdec>
<encdec>
<format>Vorbis</format>
<match>.ogg</match>
<decode>oggdec -R -o - "@T@"</decode>
<encode>oggenc -r -q 1.5 --resample=44100 -t "@M@" -</encode>
</encdec>
If you want to skip the wav decode step (not recommended), replace the wav
decode line with my "cat" example above (only works on *nix systems I'd
think), and take the -R out of the oggenc line.
Note that the above is untested. Also, you may be able to get away with not
having a wav encoder and an ogg decoder. Presumably the reason why Ezstream
was complaining is that you'd told it to play wav files but you didn't tell
it how to decode them, only how to encode them.
Hope this helps, or is at least roughly right.
Geoff.
More information about the Icecast
mailing list