Hi Everyone,

I'm trying to set up liquidsoap with a input.harbor and a safe (local playlist) 
input. One is for live sources, the other one is basically a fallback.

To ensure both sources sound quite similar, I’d like to run them through 
stereotool and then provide MP3 and AAC+ streams for either shoutcast v2 or 
icecast2. To encode to AAC format, I’d like to use the Fraunhofer FDK AAC code, 
that is (according to my research) produces the best audio quality on the 
bitrate I’m interested in (currently 64 or 96 kbps, not yet decided).

I have a problem however where I need to take the input, pass it through an 
external encoder for processing and then convert it back to AAC. I did try the 
following:

#-----

# Receives stream from a NiceCast broadcaster, probably MP3
live = input.harbor("test-harbor", port=8080, password="testing", 
buffer=30.,max=60.)

# Default, fail-safe fallback with a single track
default = mksafe(single("/etc/liquidsoap/fallback.mp3"))

# Stream with fallback
radio = fallback(track_sensitive=false, [ live, default ])

# Try the external FDKAAC encoder to be able to take the stereotool output.
# This won't work however because fdk-aac cannot produce raw AAC, just M4A
# and that is not compatible with streaming, therefore fdk-aac won't stream
# to stdout.
external_encoder = %external(samplerate=44100, channels=2, header=false, 
restart_on_crash=true, process="/usr/local/bin/stereotool - - -s 
/etc/stereotool/myradio.sts -q | /usr/bin/fdkaac --profile 29 --bitrate 128 - 
-", video=false)

# ShoutCast output example
output.shoutcast(external_encoder, format="audio/aacp", host="localhost", 
port=8000, password="testing", radio)


#-----

However this did not work because of the comments mentioned above (M4A format 
cannot be streamed). I’ve seen that liqudisoap 1.2.1 comes with a pipe operator 
and if I understand correctly, this may be the solution for my problem? You 
see, the only reason I included the fdk-aac command line tool is because I have 
no idea how to use the built-in %fdkaac option with an external encoder.

How does one do this? I’d love an example please,

Thank you for your hard work and have a great new year,

— Attila

ATTILA GYÖRFFY
I develop software.

attilagyorffy.com <http://attilagyorffy.com/> | @attilagyorffy 
<http://www.twitter.com/attilagyorffy> |  | in/attilagyorffy 
<http://linkedin.com/in/attilagyorffy> | github.com/attilagyorffy 
<http://www.github.com/attilagyorffy>

Every time you print an email, a tree is marked for death.
Trees provide O2. You need that to breathe, remember? 🌳

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to