savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.39k stars 128 forks source link

My LiquidSoap disaster #859

Closed mantistob closed 5 years ago

mantistob commented 5 years ago

Been running LiquidSoap for quite some time on my RaspberyPi on Debian stretch using AAC encoder, and it's been flawless.

Made the move to Debian Buster and the new LiquidSoap, and it's all gone really really badly wrong. I can't get ANY encoder to work.

Vorbis stutters really badly. MP3 is just a garbled mes (both mp3.vbr and shine)

I can't get any for of AAC working. It seems %aac has been removed, and I am being forced down the %fdkaac route, which presents several problems.

  1. dynamic loading is not an option, as libfdkaac-ocaml-dynlink is only available for AMD64 arch
  2. the recommended method to install ocaml appears to be get another disaster, with the aspcud solver broken in debian for years.
opam switch install 3.08.0
[ERROR] Solver failed: "/usr/bin/aspcud /tmp/opam-root-11441/solver-in-11441-2c871f /tmp/opam-root-11441/solver-out-11441-ad6566
        -count(removed),-sum(request,version-lag),-count(down),-sum(solution,version-lag),-count(changed)" exited with code 1 "ERROR: grounder returned with non-zero exit
        status"

using a different solver (--solver=mccs), whatever a solver actually is?? just gave me different errors, this time about CPU.

# arm.S:185: Error: selected processor does not support `stfd f6,[sp,#-8]!' in ARM mode
# arm.S:186: Error: selected processor does not support `stfd f5,[sp,#-8]!' in ARM mode
# arm.S:187: Error: selected processor does not support `stfd f4,[sp,#-8]!' in ARM mode

At this point, I decided ocaml is a totally pointless distraction, and clearly not the easiest install path, and now trying a source compile...

Anyone actually managed to get LiquidSoap, with AAC support on debian on ARM ? Is it even possible, or is it only supported on a PC?

mantistob commented 5 years ago

Source successfully configures, but also fails to build.

ocamlc.opt -thread -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I /usr/lib/ocaml/pcre -I /usr/lib/ocaml/bytes duppy.mli ocamlc.opt -thread -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I /usr/lib/ocaml/pcre -I /usr/lib/ocaml/bytes duppy.ml File "duppy.ml", line 527, characters 26-37: Error: Unbound module Pcre make[3]: [OCamlMakefile:952: duppy.cmo] Error 2 make[3]: Leaving directory '/home/pi/liquidsoap-1.3.7-full/ocaml-duppy-0.7.4/src' make[2]: [OCamlMakefile:717: byte-code-library] Error 2 make[2]: Leaving directory '/home/pi/liquidsoap-1.3.7-full/ocaml-duppy-0.7.4/src' make[1]: [Makefile:12: all] Error 2 make[1]: Leaving directory '/home/pi/liquidsoap-1.3.7-full/ocaml-duppy-0.7.4' make: [Makefile:11: all] Error 1

smimram commented 5 years ago

For this last one you need to install ocaml-pcre (which is not ours). I'll add a check in the configure.

purrloftruth commented 5 years ago

I think if you're trying to install liquidsoap 1.3.7 (or, indeed, any of its associated plugins) via opam, you want opam switch install 4.07.1 and not 3.08.0 (which IIUC is actually a typo of 4.08.0 from reading another issue, but wasn't fixed like they said it was...)

By running opam switch install 4.07.1, I was able to successfully install 1.3.7, but there's no docs for 1.3.7 on the site currently, only 1.3.6 and "dev docs" for what seem to be a future version that will only work on ocaml 4.08.0 and newer (which is where the opam switch install bit came from). Since 1.3.7 doesn't run on 4.08.0, 4.07.1 is the newest version it'll run on. (YMMV; I was not doing this on a Pi or on ARM, but I noticed these differences in our approaches; hope it can be helpful.)

smimram commented 5 years ago

Good catch. The OCaml version was fixed on the git, but was not updated on the website just did that.

toots commented 5 years ago

Thanks for these comments @purrloftruth. 1.3.7 was a strict bugfix with no changes in the doc so we forgot to update, will do now.

mantistob commented 5 years ago

Another 12 hours later, still no success. I eventually got the source to compile, but audio is running too fast and glitchy.

I then had another go at opam install, and got the opam environment to work using the updated instructions, and different solver, but the instructions fail to install for me.

pi@raspberrypi:~/liquidsoap-1.3.7-full $ opam depext taglib mad lame vorbis cry samplerate liquidsoap Detecting depexts using vars: arch=arm32, os=linux, os-distribution=raspbian, os-family=debian [ERROR] No solution for taglib & mad & lame & vorbis & cry & samplerate & liquidsoap: Sorry, no solution found: there seems to be a problem with your request. Command failed: opam list --readonly --external --resolve=taglib,mad,lame,vorbis,cry,samplerate,liquidsoap returned 20

Has anyone tested any of the documentation to see if it still works? Trying 3 different install methods, and all of them fail in different ways. Perhaps it's time to return to ezstream, that just worked.

mantistob commented 5 years ago

more specifically, all the modules install, not liquidsoap itself...

pi@raspberrypi:~/liquidsoap-1.3.7-full $ opam depext liquidsoap
# Detecting depexts using vars: arch=arm32, os=linux, os-distribution=raspbian, os-family=debian
[ERROR] No solution for liquidsoap: Sorry, no solution found: there seems to be a problem with your request.

Command failed: opam list --readonly --external --resolve=liquidsoap returned 20

smimram commented 5 years ago

Dear @mantistob, the installation procedure is indeed quite heavily used and works for most people, but we do not have the manpower nor the resources to try all the possible combinations of os / architecture. Also, please remember that this is an open-source project, not a service you are paying for.

That being said, in your case, I would go with the manual installation procedure since there might be a problem with opam in your distribution / architecture. The procedure listed at the end of the installation page should work.

You have to run:

git clone https://github.com/savonet/liquidsoap-full.git liquidsoap
cd liquidsoap
make init

After, that you have to create a list of modules that you want to compile. A good starting point is to do

cp PACKAGES.minimal PACKAGES

and edit the PACKAGES file to uncomment the libraries you are interested in. You should then run the configuration scripts by

./bootstrap
./configure

if you are missing some external libraries, install them and re-run

./configure

Finally build Liquidsoap:

make

and install it

make install
toots commented 5 years ago

Hi,

I can confirm that at the moment, we are using os-distribution = "debian" to track down external dependencies. Your distribution is listed as os-distribution=raspbian so there are no external dependencies for it.

One solution would be to switch to using os-family = "debian". I'll see with opam if that's an advisable change and will let you know.

Meanwhile, if you decide to stick with opam, you can run:

opam list --short --recursive --external --vars os-distribution=debian --required-by=taglib,mad,lame,vorbis,cry,samplerate

That should give you the list of packages to install.

As for the audio glitches, I believe we'd need to see some of your script to be able to help.

smimram commented 5 years ago

Also, it might be doable to test this even without a raspberry: https://www.osboxes.org/raspbian/

mantistob commented 5 years ago

This is only testing the distribution, not the architecture. It's running Raspbian on x64 (as VirtualBox isn't an emulator, it's a VM)

Many of the problems appear to be that dependencies are only supported on x64/i386

mantistob commented 5 years ago

Got things up and running finally. The speed/skipping problem was down to something wrong with my Icecast configuration ,

as for liquidsoap install, and I never got the opam method to work on raspbian/armhf, far to many issues with the solvers, but I did eventually get the full package to compile from source, but I had to install lots of packages via apt, and it was alot of trial and error, running the configure, and working out the missing package, which were often not called the same as the configure script.

unless you need AAC streaming (which I did), the prebuild Debian package should be fine for regular MP3, but if you need FDKAAC, you are going to have to go the source compile route it seems.

toots commented 5 years ago

Glad to hear. All the best with your projects!