savonet / ocaml-faad

OCaml bindings for the libfaad AAC decoder library.
GNU General Public License v2.0
2 stars 0 forks source link

ocaml-faad #1

Closed smimram closed 11 years ago

smimram commented 11 years ago

Martin K reported this:

liquidsoap 'output.ao(fallible=true, input.http("http://3043.live.streamtheworld.com/SAM04AAC89_SC"))'

results in:

2013/01/31 13:17:22 [decoder:3] Method "AAC" accepted "audio/aacp".
2013/01/31 13:17:22 [http_3773:3] Decoding...
2013/01/31 13:17:22 [http_3773:2] Feeding stopped: Faad error: Bitstream value not allowed by specification
2013/01/31 13:17:24 [decoder:3] Method "AAC" accepted "audio/aacp".
2013/01/31 13:17:24 [http_3773:3] Decoding...
2013/01/31 13:17:25 [http_3773:2] Feeding stopped: Faad error: Bitstream value not allowed by specification
2013/01/31 13:17:25 [threads:3] Created thread "ao" (3 total).
2013/01/31 13:17:25 [ao:3] Opening Advanced Linux Sound Architecture (ALSA) output (2 channels)...
2013/01/31 13:17:27 [decoder:3] Method "AAC" accepted "audio/aacp".
2013/01/31 13:17:27 [http_3773:3] Decoding...
2013/01/31 13:17:27 [http_3773:2] Feeding stopped: Faad error: Bitstream value not allowed by specification

This file which was ripped from the stream exhibits the behavior, which you can test with aac2wav in examples of ocaml-faad:

./aac2wav radio.aac radio.wav 
Input file: 2 channels at 44100 Hz.
Decoding AAC...
Faad error 13: Maximum number of bitstream elements exceeded
Fatal error: exception Faad.Error(13)

Notice that the file decodes alright with faad, so I suspect we're doing something wrong here...

smimram commented 11 years ago

In case it matters:

$ apt-cache policy libfaad2 
libfaad2:
  Installed: 2.7-8
toots commented 11 years ago

Sooo, quite interestingly, file still does not exhibit issue in liquidsoap BUT does make aac2wav fail here..

smimram commented 11 years ago

Actually liquidsoap refuses to play it here...

toots commented 11 years ago

Just fixed example decoder for me. How does it work for you?

smimram commented 11 years ago

Argh, you fixed the wrong bug in fcbb33f6d96b432eb0429bcda1d14ff45b514f07 :D So, basically the situation here is the same as for you: the ocaml-faad example is going on fine and Liquidsoap plays the file like a charm (I could swear that it could not play it before but I must have messed up my tests, and anyway I never really had the issue with Liquidsoap...)

PS: it would be cool if you could reference bugs in changelog messages

smimram commented 11 years ago

The problem seems to be fixed don't hesitate to reopen if it's not the case...