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.
Here is what I have now:
<ezstream>
<url>http://localhost:8000/vorbis.ogg</url>
<sourcepassword>hackme</sourcepassword>
<!--
Since the reencoding feature is enabled below, <format /> sets the
output format of the stream.
-->
<format>VORBIS</format>
<filename>list.m3u</filename>
<!-- Enable playlist shuffling: -->
<shuffle>1</shuffle>
<!--
The file in <filename> is a regular playlist and not a program.
For demonstrational purposes, explicitly state this here:
-->
<playlist_program>0</playlist_program>
<!--
The following settings are used to describe your stream to the
server.
It's up to you to make sure that the
bitrate/quality/samplerate/channels
information matches up with your oggenc encoder settings below.
-->
<svrinfoname>My Stream</svrinfoname>
<svrinfourl>http://www.oddsock.org</svrinfourl>
<svrinfogenre>RockNRoll</svrinfogenre>
<svrinfodescription>This is a stream
description</svrinfodescription>
<svrinfobitrate>88</svrinfobitrate>
<svrinfoquality>1.5</svrinfoquality>
<svrinfochannels>2</svrinfochannels>
<svrinfosamplerate>44100</svrinfosamplerate>
<!-- Allow the server to advertise the stream on a public YP
directory: -->
<svrinfopublic>0</svrinfopublic>
<reencode>
<!-- Enable the reencoding feature: -->
<enable>1</enable>
<!--
Each <encdec /> element specifies a pair of programs to be
used for
decoding and encoding, respectively, and which file
extension and
output stream format they apply to.
All the configuration of the output stream is usually done
by using
the appropriate command line parameters of the encoders in the
<encode /> elements.
New encdec sections can be added for new input/output formats.
-->
<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>
</reencode>
</ezstream>
Thanks - Tod
"Tod" <tod@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.