Using liquidsoap 1.3.4 and FFMpeg encoder I have a weird problem. I think it's
related to 32-bit WAV-files:
Generating a WAV with 32-bit for testing:
```/opt/sox/sox --bits=32 -n test-sound.wav synth 9 sine 1000 synth 2 sine mix
1-2000 synth 2 sine mix 2000-1 channels 2 gain -3```
Apparently liquidsoap can't handle the 24-bit or 32-bit WAV, so I used the
ffmpeg encoder:
```set("decoder.external.ffmpeg.path","/opt/ffmpeg/ffmpeg-4.1-64bit-static/ffmpeg")
set("decoder.external.ffprobe.path","/opt/ffmpeg/ffmpeg-4.1-64bit-static/ffprobe")
enable_external_ffmpeg_decoder()
output.dummy(single("test-sound.wav"))
```
This gives me this output:
```
~] liquidsoap --debug output.liq
2018/11/13 23:04:34 >>> LOG START
2018/11/13 23:04:34 [main:3] Liquidsoap 1.3.4
2018/11/13 23:04:34 [main:3] Using: bytes=[distributed with OCaml 4.02 or
above] pcre=7.3.5 dtools=0.4.1 duppy=0.7.3 duppy.syntax=0.7.3 cry=0.6.2
mm=0.4.0 ogg=0.5.2 vorbis=0.7.1 mad=0.4.5 dynlink=[distributed with Ocaml]
lame=0.3.3 samplerate=0.1.4 taglib=0.3.3 camomile=1.0.1
2018/11/13 23:04:34 [dynamic.loader:3] Could not find dynamic module for fdkaac
encoder.
2018/11/13 23:04:34 [external.decoder:3] Enabling FFMPEG decoder
2018/11/13 23:04:34 [decoder:4] Trying method "META" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder:4] Trying method "WAV" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder:4] Decoder "WAV" failed on "test-sound.wav": IFF
File error: Bad header: unhandled codec!
2018/11/13 23:04:34 [decoder:4] Trying method "AIFF" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder.wav/aiff:4] Invalid file extension for
"test-sound.wav"!
2018/11/13 23:04:34 [decoder:4] Trying method "MIDI" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder:4] Trying method "IMAGE" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder:4] Trying method "OGG" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder.ogg:4] Invalid file extension for "test-sound.wav"!
2018/11/13 23:04:34 [decoder:4] Trying method "MAD" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder.mad:4] Invalid file extension for "test-sound.wav"!
2018/11/13 23:04:34 [decoder:4] Trying method "FFMPEG" for "test-sound.wav"...
2018/11/13 23:04:34 [decoder:3] Method "FFMPEG" accepted "test-sound.wav".
2018/11/13 23:04:34 [decoder.ogg:4] Invalid file extension for "test-sound.wav"!
2018/11/13 23:04:34 [decoder.taglib:4] Invalid file extension for
"test-sound.wav"!
2018/11/13 23:04:34 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2018/11/13 23:04:34 [frame:3] Frame size must be a multiple of 1764 ticks =
1764 audio samples = 1 video samples.
2018/11/13 23:04:34 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio
samples = 1764 ticks.
2018/11/13 23:04:34 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video
samples = 1764 ticks.
2018/11/13 23:04:34 [video.converter:4] Couldn't find preferred video
converter: gavl.
2018/11/13 23:04:34 [audio.converter:4] Using preferred samplerate converter:
libsamplerate.
2018/11/13 23:04:34 [threads:3] Created thread "generic queue #1".
2018/11/13 23:04:34 [threads:3] Created thread "generic queue #2".
2018/11/13 23:04:34 [threads:3] Created thread "non-blocking queue #1".
2018/11/13 23:04:34 [threads:3] Created thread "non-blocking queue #2".
2018/11/13 23:04:34 [clock:4] Currently 1 clocks allocated.
2018/11/13 23:04:34 [clock.wallclock_main:4] Starting 1 sources...
2018/11/13 23:04:34 [source:4] Source output.dummy_5931 gets up.
2018/11/13 23:04:34 [source:4] Source single_5930 gets up.
2018/11/13 23:04:34 [single_5930:3] "test-sound.wav" is static, resolving once
for all...
2018/11/13 23:04:34 [test-sound(dot)wav:4] Content kind is
{audio=2;video=0;midi=0}.
2018/11/13 23:04:34 [test-sound(dot)wav:4] Activations changed:
static=[dummy:dummy], dynamic=[].
2018/11/13 23:04:34 [decoder.external:3] Starting process
2018/11/13 23:04:34 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:34 [dummy:4] Activations changed: static=[dummy], dynamic=[].
2018/11/13 23:04:34 [dummy:4] Enabling caching mode: active source.
2018/11/13 23:04:34 [threads:3] Created thread "wallclock_main" (1 total).
2018/11/13 23:04:34 [clock:4] Main phase starts.
2018/11/13 23:04:34 [clock.wallclock_main:3] Streaming loop starts,
synchronized with wallclock.
2018/11/13 23:04:34 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:34 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:34 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:34 [decoder.external:3] Cleaning up process
2018/11/13 23:04:34 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:35 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:35 [decoder.external:3] Starting process
2018/11/13 23:04:35 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:35 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:35 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:35 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:35 [decoder.external:3] Cleaning up process
2018/11/13 23:04:35 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:36 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:36 [decoder.external:3] Starting process
2018/11/13 23:04:36 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:36 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:36 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:36 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:36 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:36 [decoder.external:3] Cleaning up process
2018/11/13 23:04:37 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:37 [decoder.external:3] Starting process
2018/11/13 23:04:37 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:37 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:37 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:37 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:37 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:37 [decoder.external:3] Cleaning up process
2018/11/13 23:04:38 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:38 [decoder.external:3] Starting process
2018/11/13 23:04:38 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:38 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:38 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:38 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:38 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:38 [decoder.external:3] Cleaning up process
2018/11/13 23:04:39 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:39 [decoder.external:3] Starting process
2018/11/13 23:04:39 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:39 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:39 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:39 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:39 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:39 [decoder.external:3] Cleaning up process
2018/11/13 23:04:40 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:40 [decoder.external:3] Starting process
2018/11/13 23:04:40 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:40 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:40 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:40 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:40 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:40 [decoder.external:3] Cleaning up process
2018/11/13 23:04:41 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:41 [decoder.external:3] Starting process
2018/11/13 23:04:41 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:41 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:41 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:41 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:41 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:41 [decoder.external:3] Cleaning up process
2018/11/13 23:04:42 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:42 [decoder.external:3] Starting process
2018/11/13 23:04:42 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:42 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:42 [decoder.external:3] Closing process's stdin
2018/11/13 23:04:42 [decoder:4] Decoding "test-sound.wav" ended:
Wav_aiff_decoder.End_of_stream.
2018/11/13 23:04:42 [decoder.external:3] Process exited with code 0
2018/11/13 23:04:42 [decoder.external:3] Cleaning up process
2018/11/13 23:04:43 [test-sound(dot)wav:3] Finished with "test-sound.wav".
2018/11/13 23:04:43 [decoder.external:3] Starting process
2018/11/13 23:04:43 [test-sound(dot)wav:3] Prepared "test-sound.wav" (RID 0).
2018/11/13 23:04:43 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...
2018/11/13 23:04:43 [decoder.external:3] Closing process's stdin
Segmentation fault
```
Tested on two Servers with CentOS 7.
Apparently it doesn't recognize the 32-bit and reports the file incorrectly as
16-bit?
`2018/11/13 23:04:43 [decoder.wav/aiff:4] WAV header read (48000 Hz, 16 bits,
4294967295 bytes), starting decoding...`
Also:
```
~] liquidsoap -r test-sound.wav
Request resolution failed.
```
When using a 16-bit testfile, it seems to work:
```
~] sox -n -r 48000 -b 16 -c 2 test-sound-16bit.wav trim 0.0 1.0
~] liquidsoap -r test-sound-16bit.wav
Request resolved.
rid="0"
status="ready"
initial_uri="test-sound-16bit.wav"
temporary="false"
filename="test-sound-16bit.wav"
decoder="WAV"
kind="{audio=0+;video=0+;midi=0+}"
Computing duration: 2.48 sec.
```
I'm not sure if this is a bug or a limitation...as a workaround I can try to
use 16-bit wav-files, but it's confusing nevertheless...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/656
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users