Closed AttilaVM closed 8 years ago
I found out %ogg(%flac)...
The script below works fine:
output.icecast(
%ogg(%flac),
host = "192.168.0.50",
port = 8000,
password = "test",
mount = "test-stream",
input.alsa()
)
Have you tried streaming flac inside the ogg container, as the documentation says: http://liquidsoap.fm/doc-svn/encoding_formats.html Was a while ago I used it, but I remember the flac encoder that's built-in sounded bad in some players. I solved it by using an external flac encoder: https://github.com/daniel-j/parasprite-radio/blob/master/liq/outputs.liq#L114 A downside with that is the lack of metadata, and stream restarts every 6th hour or so.
Thanks, Using external encoder is a good idea The ogg encapsulation works. However it can not encode 32 bit flac. However it would be very nice. The Cirrus Logic card has 24 bit ADCs.
it gives:
Source test-stream failed while streaming: Flac.Internal!
Maybe an external streamer will solve it, thank you
Thank you. I used your advice and it works with the external streamer perfectly even on 24 bit. Why the stream restarts periodically?
Hey guys. The stream restarts periodically prolly because the external encoding binary isn't supposed to run forever. As for the metadata, with icecast and ogg streaming you may want to try to use icy.update_metadata
I know that for ogg/vorbis
, icecast is capable of inserting metadata into the stream when using this operator.
I will have a look at why our internal encoder may not perform as well as the flac
encoding binary.
Here's what the flac
manual says about quality:
-0..-8, --compression-level-0..--compression-level-8
Fastest compression..highest compression (default is -5). These are synonyms for other options:
-0, --compression-level-0
Synonymous with -l 0 -b 1152 -r 3
-1, --compression-level-1
Synonymous with -l 0 -b 1152 -M -r 3
-2, --compression-level-2
Synonymous with -l 0 -b 1152 -m -r 3
-3, --compression-level-3
Synonymous with -l 6 -b 4096 -r 4
-4, --compression-level-4
Synonymous with -l 8 -b 4096 -M -r 4
-5, --compression-level-5
Synonymous with -l 8 -b 4096 -m -r 5
-6, --compression-level-6
Synonymous with -l 8 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2)
-7, --compression-level-7
Synonymous with -l 8 -b 4096 -m -e -r 6 -A tukey(0.5) -A partial_tukey(2)
-8, --compression-level-8
Synonymous with -l 12 -b 4096 -m -e -r 6 -A tukey(0.5) -A partial_tukey(2) -A punchout_tukey(3)
--fast Fastest compression. Currently synonymous with -0.
--best Highest compression. Currently synonymous with -8.
So, I believe that if you set compression=8
in the %flac
encoding params, that should be the same as --best
using the external flac
encoder.
Hi, could somebody help me how can i install external flac encoder at liquidsoap? I run it at raspbian with internal encoder but sound is not good.
For such questions, the mailing-list would be more suitable: savonet-users@lists.sf.net
After succesfuly streaming aac and mp3 I tried to stream flac in a testing environment:
source client Liquidsoap-1.1.1-7 OS: Raspbian Jessie Hardware: Raspberry Pi 3 + Cirrus Logic Audio card notes: kernel rebuilt with official cross toolchain. source: https://github.com/HiassofT/rpi-linux The offical Cirrus Logic image and kernel are not working with rpi 3. Liquidsoap had to be rebuilt because of a packaging bug, causes "input.alsa undefined"
server icecast2-2.4.0-1.1+deb8u OS: Raspbian Jessie Hardware: Raspberry Pi 3
Listener mplayer-1.2.1 OS: Gentoo amd64 Hardware: a simple hp workstation note: it plays flac streams perfectly from othe sources like: http://ai-radio.org/44.flac
While aac and mp3 streams work (Not tested with many conditions), flac streams are not playable with mplayer.
Lquidsoap script:
Liquidsoap log:
Icecast2 configuration:
icecast2 error log:
note: The working aac and mp3 streams get same errors for their types without any problem.
mplayer output:
I also checked the stream between Liquidsoap and Icecast2 with scapy
note: source client: 192.168.0.53, b8:27:eb:90:55:eb server: 192.168.0.51, b8:27:eb:f8:fd:f9