savonet / liquidsoap-full

[DEPRECATED] Former main repository with all in-house bindings
GNU General Public License v2.0
49 stars 22 forks source link

aacplus and opus not working under Ubuntu 12.10 #4

Closed SeanBannister closed 11 years ago

SeanBannister commented 11 years ago

I just compiled Liquidsoap 1.0.1 from source under Ubuntu 12.10 but I also got these same results using the version in the Ubuntu repo. When I run the following to transcode to an AAC+ stream I get an error (shown after code):

#!/usr/bin/liquidsoap -v
stream = mksafe(input.http("http://example.com"))
source = (stream:source(2,0,0))

output.icecast(
  %aacplus(bitrate=192, samplerate=44100, channels=2),
  mount="/192.aac",
  host="example.com", port=80, password="password",
  source)
Invalid value at line 6, char 3-53: No encoder found for that format.

Please note that regular AAC works fine.

When I do the same for opus I get the following error:

Line 6, char 4 before "%": Parse error!
toots commented 11 years ago

Hi,

How have you compiled liquidsoap?

SeanBannister commented 11 years ago

I followed these instructions in the INSTALL and I left everything in PACKAGES to the default.But keep in mind I had the exact same problem with the version in the Ubuntu repo.

toots commented 11 years ago

So, when compiling using the PACKAGES file, you need to make sure that you compile with ocaml-aacplus to have AAC+ encoding support. With Ubuntu, you need to install libaacplus-ocaml-dynlink from http://www.deb-multimedia.org/, or to manually compile and install ocaml-aacplus.

For opus support you need liquidsoap 1.1.0 or above.

SeanBannister commented 11 years ago

Thanks toots.

For anyone else looking for help on this I did the following to get AAC+ working:

wget http://www.deb-multimedia.org/pool/main/liba/libaacplus/libaacplus2_2.0.2-dmo1_amd64.deb
dpkg -i libaacplus2_2.0.2-dmo1_amd64.deb

wget http://www.deb-multimedia.org/pool/main/o/ocaml-aacplus/libaacplus-ocaml_0.2.1-dmo3_amd64.deb
dpkg -i libaacplus-ocaml_0.2.1-dmo3_amd64.deb

wget http://www.deb-multimedia.org/pool/main/o/ocaml-aacplus/libaacplus-ocaml-dynlink_0.2.1-dmo3_amd64.deb
dpkg -i libaacplus-ocaml-dynlink_0.2.1-dmo3_amd64.deb

I was however surprised that the AAC+ encoding has a limit of 72kbps, this seems like a bug or uneeded limitation. Where should I post this as an issue in https://github.com/savonet/ocaml-aacplus ???

toots commented 11 years ago

The AAC+ encoder is very limited. I'd advise you to try the new FDK-AAC encoder, whose support was just released with liquidsoap 1.1.1. This encoder can do both AAC and AAC+ with a lot of parameters and flexibility and is expected to replace both voaac and aacplus encoders.