@toots After upgrading to libopus 1.3.1 (together with liquidsoap 1.3.7) the 
problem still persists. I've also created a small re-encoding script on my 
local dev installation docker container to see if there is anything in our 
application that could be effecting the process. The distortion issue is still 
happening with that script.

```
apt-cache policy libopus-dev
libopus-dev:
  Installed: 1.3-1
  Candidate: 1.3-1
  Version table:
 *** 1.3-1 990
         10 http://archive.ubuntu.com/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status
     1.1.2-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
```

Here is the script that I used for my local tests:
```
input = "/var/azuracast/stations/azuratest_radio/media/.mp3"

output = "/var/azuracast/stations/azuratest_radio/media/output.ogg"

source = once(single(input))

clock.assign_new(sync=false, [source])

output.file(
    %opus(
        samplerate=48000,
        bitrate=96,
        vbr="none",
        application="audio",
        channels=2,
        signal="music",
        complexity=10,
        max_bandwidth="full_band"
    ),
    output,
    fallible=true,
    on_stop=shutdown,
    source
)
```

I have tried using just `%opus` without any configuration and with the config 
above. Both producing the same distorted output. The source I used is a 44100 
encoded 128kbps mp3 file. I've also tried if there is any difference when using 
a 48000 source but that results in no change in the output quality.

To make sure that this problem is not coming from the file itself I tried a 
random generic mp3 re-encoder I found on the web and the opus file from that 
sounds much better with the same configs.

I'll add a .zip file with my test source and output files for you.

Here is the log produced by executing the script:
```
2019/05/03 09:32:06 >>> LOG START
2019/05/03 09:32:06 [main:3] Liquidsoap 1.3.7
2019/05/03 09:32:06 [main:3] Using: bytes=[distributed with OCaml 4.02 or 
above] pcre=7.4.1 dtools=0.4.1 duppy=0.8.0 cry=0.6.1 mm=0.4.0 ogg=0.5.2 
vorbis=0.7.1 opus=0.1.2 mad=0.4.5 flac=0.1.4 flac.ogg=0.1.4 
dynlink=[distributed with Ocaml] lame=0.3.3 fdkaac=0.2.1 taglib=0.3.3 ssl=0.5.7 
camomile=1.0.1 faad=0.4.0
2019/05/03 09:32:06 [decoder:3] Method "MAD" accepted 
"/var/azuracast/stations/azuratest_radio/media/03_-_time_to_be_awesome.mp3".
2019/05/03 09:32:06 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
2019/05/03 09:32:06 [frame:3] Frame size must be a multiple of 1764 ticks = 
1764 audio samples = 1 video samples.
2019/05/03 09:32:06 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio 
samples = 1764 ticks.
2019/05/03 09:32:06 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video 
samples = 1764 ticks.
2019/05/03 09:32:06 [threads:3] Created thread "generic queue #1".
2019/05/03 09:32:06 [threads:3] Created thread "generic queue #2".
2019/05/03 09:32:06 [threads:3] Created thread "non-blocking queue #1".
2019/05/03 09:32:06 [threads:3] Created thread "non-blocking queue #2".
2019/05/03 09:32:06 [single_6389:3] 
"/var/azuracast/stations/azuratest_radio/media/03_-_time_to_be_awesome.mp3" is 
static, resolving once for all...
2019/05/03 09:32:06 [threads:3] Created thread "wallclock_sequence_6391" (1 
total).
2019/05/03 09:32:06 [clock.wallclock_sequence_6391:3] Streaming loop starts, 
synchronized by active sources.
2019/05/03 09:32:06 [single_6389:3] Prepared 
"/var/azuracast/stations/azuratest_radio/media/03_-_time_to_be_awesome.mp3" 
(RID 0).
2019/05/03 09:32:09 [single_6389:3] Finished with 
"/var/azuracast/stations/azuratest_radio/media/03_-_time_to_be_awesome.mp3".
2019/05/03 09:32:09 
[/var/azuracast/stations/azuratest_radio/media/output(dot)ogg:3] Source failed 
(no more tracks) stopping output...
2019/05/03 09:32:09 [main:3] Shutdown started!
2019/05/03 09:32:09 [main:3] Waiting for threads to terminate...
2019/05/03 09:32:09 [threads:3] Shuting down thread wallclock_sequence_6391
2019/05/03 09:32:09 [clock.wallclock_sequence_6391:3] Streaming loop stopped.
2019/05/03 09:32:09 [threads:3] Thread "wallclock_sequence_6391" terminated (0 
remaining).
2019/05/03 09:32:09 [main:3] Threads terminated.
2019/05/03 09:32:09 [threads:3] Shutting down scheduler...
2019/05/03 09:32:09 [threads:3] Scheduler shut down.
2019/05/03 09:32:09 [threads:3] Shutting down queues...
2019/05/03 09:32:09 [threads:3] Thread "generic queue #1" terminated.
2019/05/03 09:32:09 [threads:3] Thread "generic queue #2" terminated.
2019/05/03 09:32:09 [threads:3] Thread "non-blocking queue #2" terminated.
2019/05/03 09:32:09 [threads:3] Thread "non-blocking queue #1" terminated.
2019/05/03 09:32:09 [threads:3] Queues shut down
2019/05/03 09:32:09 [main:3] Cleaning downloaded files...
2019/05/03 09:32:09 [main:3] Freeing memory...
2019/05/03 09:32:09 >>> LOG END
```

-- 
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/759#issuecomment-489040661
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to