Hi,
I'll attach my ezstream.xml file to illustrate how ezstream can
be "programmed" to do various on-the-fly re-encodings.
The basic idea is to treat each <encdec> section as a pair of
cmd-line tools: implying a *ix pipe connects the output of the
<decode> cmd to the input of the <encode> cmd. The stdout of the
<encode> cmd is fed back to ezstream for netcasting.
I've successfully used this to netcast a lot of Apple Lossless
recordings I've done myself into an mp3 stream. (At the time
back when, the MacOSX recording apps could only do lossless using
Apple's codec. The alac cmd is open src and comes from a dude
who has reverse-engineered Apple's file format in this case.
This is only fyi, but it does work.)
(btw in my case since I want mp3 streams, if the m3u playlist
encounters a .mp3 filename, note the related <decode> section in
my xml simply 'cat's it to stdout, there is no related <encode>
cmd in this section, so ezstream handles the stream from that
point on. Neat trick, eh? <g>)
I know the flac cmd (part of the FLAC project) can pipe its
decoded data to stdout, too, thus the same kind of xml can be
used in your case.
It would be easy to change the lame cmd in my sample xml to the
oggenc cmd, pick your parms, make sure the other xml things match
everywhere, and you're netcasting ogg streams instead.
Several <encdec> sections can be programmed like this to try
supporting a mix of recordings in various formats. During the
interim, you can almost immediately switch to ogg stream format
by setting up an <encdec> section thusly: You'll want to use an
accurate mp3 decoder for the <decode> cmd (mpg123 can do that),
and use oggenc for the <encode> cmd as I just mentioned. Also go
ahead to add another <encdec> section that sees the .flac
filenames to <decode> with flac cmd and <encode> with oggenc
again. Then as Chris said, simply take your time in re-ripping
your originals to flac format, update your m3u playlist as
needed, and keep on streamin'. :)
On Sun, 25 Jun 2006 18:03:48 -0500 Chris MacDonald
<chris@thoughtsoft.net> wrote:>
> Taking the 128 mp3 and re-encoding to flac won't fix any quality
issues > you may have as they will retain the same 'flaws'. In the end
you'll end > up with the same quality as you would have seen going from 128
mp3 to q3 > ogg. One nice thing about ezstream is that you can specify
decoders for > multiple formats so if going and ripping all your media again is
too > daunting a task you could just use the mp3s you have, then slowly
start > ripping to flac as you have time and ezstream will take care of
using > the right decoder.
>
> I'm flattered you think I have customers and all manner of users
;) but > I just use ezstream/icecast for myself, at least for now I just
have my > one stream. As an example configuration just take a look at the
vorbis > example that comes with ezstream. It's very close to what you
want, and > any changes you need to make are pretty straightforward. Take
note > though, the stream information in the configuration is
informational > only, to actually modify the encoding options of the stream
itself. > Look under the 'reencoding' section of the config and modify the
command > ezstream will use as the encoder. Any options for oggenc you can
find > out by checking out the man pages, but you probably just want to
play > with the with the quality, in which case you'd change '-q 0' to
> whichever you'd like.
>
> To my knowledge it isn't possible to get icecast or ezstream to
change > the bitrate of the stream dynamically to meet a client's
bandwidth > restrictions so what you'd want to do is have two streams, one
low > quality and one high quality. For this you'd be running two
instances of > ezstream, each with their own encoder settings to change the
quality to > suit your needs.
>
> Chris
>
> Dave wrote:
>> Hi Chris,
>> Thanks. What i've got are 128kbps mp3's. I encoded them
using
abcde >> as it did everything with one command and worked over an entire
CD. It >> used lame as it's backend and encoded at 128k. Question, what if
i >> went from mp3 to flac, which would enable me to have my original
mp3's >> as they are, plus a mirrored area of flac files, then use
ezstream to >> send those flac files as ogg. If that wouldn't blow to much up
quality >> wise i'd rather do it that way than reencode everything. For
your >> streams do you have both dialup and broadband users? If so, i'd
like >> to see your reencode settings so i will know what to punch in,
so far >> getting the quality right has been hit and miss. Are any of your
>> customers windows users using winamp?
>> Thanks.
>> Dave.
>>
>> ----- Original Message ----- From: "Chris MacDonald"
<chris@thoughtsoft.net>>> To: "Dave" <dmehler26@woh.rr.com>
>> Cc: <icecast@xiph.org>
>> Sent: Sunday, June 25, 2006 6:09 PM
>> Subject: Re: [Icecast] converting mp3's to aac+ or ogg
>>
>>
>>> Yeah, ezstream is a source client just like ices0, but the
manner in >>> which they go about processing files or playlists may differ. I
don't >>> know too much about ices0 but in the configuration for ezstream
you >>> can either specify a single file to stream or you can point it
to an >>> m3u playlist and it will play though that, I'm not sure this is
>>> compatible with how you currently queue media.
>>>
>>> In terms of quality, I'm pretty picky which is why I wanted my
source >>> media in a lossless format. I chose flac but there are others,
think >>> wav + compression; tracks I archive are usually 50-80% of their
raw >>> size, of course this varies from track to track. In your case
going >>> from mp3 to ogg, your ability to notice a difference will
depend on >>> the bitrate of the source mp3 and the resultant ogg stream.
Something >>> like a 256kbps vbr mp3 to a q3 (~110kbps vbr) ogg vorbis stream
will >>> still sound fine (I did this before deciding to do al my
archiving in >>> flac), but if you took a 128kbps mp3 and did the same you'd
notice >>> the change. Again, it varies from person to person and I'd
imagine >>> you'd just have to try it yourself to see what you'd like,
it's
less >>> a science and more a preference.
>>>
>>> The box that does my re-encoding on is an AMD 1800 with 512MB
RAM and >>> also does icecast, apache, mysql, sendmail, pretty much the
whole >>> shebang and I haven't had a problem. Though, mind you I'm
only
>>> re-encoding for one stream whereas you'd be doing multiple
streams. >>> The flac decoder seems content with ~2% of the processor and
the ogg >>> encoder seems to like ~40% and again, this is hardly a science
and >>> undoubtedly 'your mileage will vary'.
>>>
>>> Chris
>>>
>>> Dave wrote:
>>>> Hi Chris,
>>>> Yes that helps a lot, thanks. I'm currently using ices0,
which >>>> worked fine when all i wanted to stream was mp3's.
You've sold
me on >>>> ogg, and ezstream can it work as ices0 does? As i said i'd
really >>>> not like to do all this reencoding again, how much of a
quality loss >>>> will i be looking at if i go from mp3 to ogg? I'm not
familiar
with >>>> the flac format at all. Does it have any kind of compression,
i'd >>>> rather not have something like all these wavs around or
similar if i >>>> could help it. As for the box how much of a hit will it take?
What >>>> kind of machine do you use for your encoding?
>>>> Thanks.
>>>> Dave.
>>>>
>>>> ----- Original Message ----- From: "Chris MacDonald"
<chris@thoughtsoft.net>>>>> To: "Dave" <dmehler26@woh.rr.com>
>>>> Cc: <icecast@xiph.org>
>>>> Sent: Sunday, June 25, 2006 4:46 PM
>>>> Subject: Re: [Icecast] converting mp3's to aac+ or ogg
>>>>
>>>>
>>>>> Hey Dave,
>>>>>
>>>>> Personally I use ezstream as a source client as it's
designed
to >>>>> re-encode your stream (it's available at
www.icecast.org).
I've set >>>>> up my radio to re-encode my archived flacs to ogg vorbis
then
out >>>>> to icecast and it works quite well.
>>>>>
>>>>> As for quality, vorbis is apparently one of the nicer
formats
at >>>>> low bitrates. I'm not sure about aac though, I'd
imagine
there >>>>> isn't much in the way of support for it so you'd be
much
better off >>>>> with ogg. Either way though, re-encoding from a lossy
format
(mp3) >>>>> to another lossy format (ogg/aac) you'll notice some
sound
>>>>> degradation from your source mp3, this is entirely why I
archive in >>>>> flac.
>>>>>
>>>>> I'm not sure what you want to do for dialup/broadband
quality
>>>>> settings but I'd probably just run two mounts for each
station, one >>>>> low bitrate and one higher. One thing you have to keep in
mind >>>>> though is that all this re-encoding would happen on the fly
so you >>>>> need to make sure the machine you'd be doing it with
was up
to the >>>>> task.
>>>>>
>>>>> Not sure if any of the above helps, but I'd imagine it
presents >>>>> some options at least.
>>>>>
>>>>> Chris
>>>>>
>>>>> Dave wrote:
>>>>>> Hello,
>>>>>> I've got a FreeBSD 6 machine running icecast2
and
>>>>>> ices0streaming four different streams of mp3's. Now
i have a
need >>>>>> to stream the same content as either aac+ or ogg vorbis
whichever >>>>>> would be easiest to set up and give the best quality. I
want
these >>>>>> new streams to handle both broadband and dialup users
without >>>>>> sacrificing quality. My problem is i really really do
not
want to >>>>>> have to manually go through my media again and bring
them in
to >>>>>> aac+ or ogg, doing it once for mp3 was bad enough. I
used
abcde to >>>>>> handle this, and as i said i'd like to find an
automated way
of >>>>>> reworking these files. Any suggestions welcome.
>>>>>> Thanks.
>>>>>> Dave.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ezstream_mp3_m4a_works.xml
Type: text/xml
Size: 1426 bytes
Desc: not available
Url :
http://lists.xiph.org/pipermail/icecast/attachments/20060626/f649de8a/ezstream_mp3_m4a_works-0001.bin