Hi users,

The SVN version of liquidsoap is NOT STABLE, but usable again, after a
few big changes. It should be interesting for you to try it out (but
keep a working version of liquidsoap as a backup) and it would help us
to polish it, and explore new directions.

THE BIG PICTURE

Until version 0.9.2, all sources and operators in an instance of
liquidsoap manipulated the same content (by default 2 channels of
audio, none of video and midi). The big difference now is that each
source has its own content type (and in some cases, the content type
of a source can even vary over time).

>From the user point of view this can be almost invisible -- please
help us make that true. I give hints below on the few things to do
when porting scripts. But it enables new interesting things -- please
explore that with us.

Obviously, this means that one part of your script can deal with
audio, and another part adds video. This is cleaner and more efficient
than before, where video had to be everywhere or nowhere. So, please
try wild ideas involving video (and even midi): it probably won't work
at first, but we'd love to hear your ideas and complaints.

These changes also enable more control on conversions, which should be
useful even to our traditional uses. It is possible to have a playlist
that decodes mono, stereo and even video files, and pass it through an
operator that turns all this into stereo audio. In other words, there
is now more flexibility for doing those conversions in a clean,
user-controlled way. We have few operators in that categories for now:
audio_to_stereo, drop_video, drop_audio. But this opens the door for
more interesting things such as (more or less clever) conversions
to/from 5-channel audio.

TECHNICAL DETAILS

The one change that you can't miss is that output.icecast.*() and
output.file.*() disappeared, changed into output.icecast() and
output.file(). Those functions take an "encoding format" as a
parameter. For example, you should now write
output.icecast(%vorbis,...) or output.file(%mp3(bitrate=64,
samplerate=22050, quality=2),...). More details about how to use them
and why we introduced them in the doc: encoding_formats
(doc/content/encoding_formats.txt which becomes
doc/html/encoding_formats.html after "make doc").

The second change you may notice is that types are more complex. Don't
get depressed, you'll still be able to ignore them most of the time.
For example, output.file(%vorbis,source) will be of type
source(audio=2,video=0,midi=0).

Types are still inferred: liquidsoap guesses what should be the type
of a source. This guessing is mostly guided by encoding formats. If
you plug a source to an output that wants to encode stereo, you source
will have to produce stereo audio. If that's not what you intended,
you should use conversions operators cited above. If the content type
of a source isn't determined from the script, a default is chosen from
the settings frame.X.channels where X=audio,video,midi.

Decoding is affected by the type. A stereo single() or playlist()
won't decode a mono file. Again, if you want to decode them, you
should explicitly insert a conversion. Roughly this means that
playlist() doesn't quite behave as before, since it doesn't do any
implicit conversion to stereo, but audio_to_stereo(playlist()) does
them. I haven't made up my mind about the API, e.g. renaming playlist
into playlist.any and defining playlist or playlist.stereo to be
audio_to_stereo(playlist.any(..)).

Now, there are lots of differences due to the fact that (1) we
prioritize a clean design over backward compatibility and (2) we
haven't restored all features yet, notably: no external encoders yet
(sorry, AAC users), input.http/harbor() handle only stereo audio. It
seems that the script language is a bit faster, but that doesn't
affect streaming speed, which might actually be a bit slower than
before: there are several places where we could optimize things, but
we didn't focus on that yet.

Hopefully that should be enough information for a start. Feel free to
ask for details or help on this thread.

Enjoy!
-- 
David

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to