# How to check if silan is working

**URL:** <https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256>\
**Category:** Get Help\
**Created:** [March 6, 2019, 9:58am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256 "2019-03-06T09:58:39Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 6, 2019, 9:58am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/1 "2019-03-06T09:58:39Z")

</div>

Hi,

how can i check if silan is working or not  
running from console, i get this

silan /any/file  
\*\*\* stack smashing detected \*\*\*: \<unknown\> terminated  
Aborted (core dumped)

silan --version  
0.3.3

---

<div class="post-metadata">

**Author:** ![maydo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/maydo/32/122_2.png) [@maydo](https://discourse.libretime.org/u/maydo)\
**Post date:** [March 6, 2019, 3:17pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/2 "2019-03-06T15:17:05Z")

</div>

hi, ive found this

[https://forum.sourcefabric.org/discussion/16037/quick-tip-to-check-silan-progress/p1](https://forum.sourcefabric.org/discussion/16037/quick-tip-to-check-silan-progress/p1)

i get this result in my database  
silan\_check | count  
-------------±------  
f | 530  
(1 row)

so that means silan is not working ? 530 is the amount of tracks in my current library

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [March 7, 2019, 2:32pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/3 "2019-03-07T14:32:13Z")

</div>

I’m not sure. I honestly haven’t taken the time to dig deep into silan and really figure out how well it is working etc.

---

<div class="post-metadata">

**Author:** ![hairmare](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/hairmare/32/38_2.png) [@hairmare](https://discourse.libretime.org/u/hairmare)\
**Post date:** [July 16, 2019, 4:52am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/4 "2019-07-16T04:52:34Z")

</div>

The “f” in the SQL output indicated that no tracks where scanned by silan, so it isn’t working.

If silan segfaults when you call it (as indicated by “Aborted (core dumped)”) then it certainly is broken and needs fixing if you want to use it. It looks like this has already been reported to the silan project: [https://github.com/x42/silan/issues/10](https://github.com/x42/silan/issues/10).

Did you follow the instructions on [https://github.com/LibreTime/libretime/wiki/Silan-Installation](https://github.com/LibreTime/libretime/wiki/Silan-Installation) to install a current version? I think they might be broken at this stage but haven’t tried them in a while.

When reporting issues with distro packages like silan it is always important to always include the operating system and version you are installing on. Generally Debian Buster, Ubuntu 20.04 and newer will have silan 0.4.0 which will most likely fix the segfaulting issue.

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [December 28, 2019, 6:41pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/5 "2019-12-28T18:41:16Z")

</div>

Hello, I’ve got the same issue with silan 0.3.3 under ubuntu 18.04  
Did you find any solution for this issue please?

I’ve investigated if an upgrade to silan 0.4.0 is possible but it seems that some dependencies will cause issues:  
libavcodec57:amd64  
libavformat57:amd64  
libavutil55:amd64

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [December 30, 2019, 1:02pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/6 "2019-12-30T13:02:11Z")

</div>

Did you mean that silan 0.3.3 is crashing and thus not implementing the silence detection or is it giving incorrect ie shorter values. One alternative to installing the debian package would be to install it from the source but that would probably be more complicated.

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [December 30, 2019, 7:37pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/7 "2019-12-30T19:37:21Z")

</div>

Hello Robbt,

I mean silan is crashing whatever the mp3 analysed so the is no silent detection at all:

# silan -bv test.mp3

ad\_open\_ffmpeg(): ffmpeg - test.mp3  
ad\_open\_ffmpeg(): ffmpeg - sr:44100 c:2 d:203285 f:8964911  
ad\_dump\_nfo(): sample\_rate: 44100  
ad\_dump\_nfo(): channels: 2  
ad\_dump\_nfo(): length: 203285 ms  
ad\_dump\_nfo(): frames: 8964911  
ad\_dump\_nfo(): bit\_rate: 132652  
ad\_dump\_nfo(): bit\_depth: 0  
ad\_dump\_nfo(): channels: 2  
ad\_dump\_nfo(): meta-data: -  
\*\*\* stack smashing detected _: terminated_\*  
Aborted

I’ll give a try to the debian package, thanks !

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [December 30, 2019, 9:28pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/8 "2019-12-30T21:28:24Z")

</div>

@robbt,

I’ve just been here : [https://debian.pkgs.org/9/multimedia-main-amd64/silan\_0.3.3-dmo1+deb9u1\_amd64.deb.html](https://debian.pkgs.org/9/multimedia-main-amd64/silan_0.3.3-dmo1+deb9u1_amd64.deb.html)

Download the deb package and installed it:

```
wget http://www.deb-multimedia.org/pool/main/s/silan-dmo/silan_0.3.3-dmo1+deb9u1_amd64.deb
dpkg -i silan_0.3.3-dmo1+deb9u1_amd64.deb 

```

the install shown me warnings:

> Selecting previously unselected package silan.  
> (Reading database … 105629 files and directories currently installed.)  
> Preparing to unpack silan\_0.3.3-dmo1+deb9u1\_amd64.deb …  
> Unpacking silan (1:0.3.3-dmo1+deb9u1) …  
> dpkg: dependency problems prevent configuration of silan:  
> silan depends on libavcodec57 (\>= 10:3.3.7); however:  
> Version of libavcodec57:amd64 on system is 7:3.4.6-0ubuntu0.18.04.1.  
> silan depends on libavformat57 (\>= 10:3.3.7); however:  
> Version of libavformat57:amd64 on system is 7:3.4.6-0ubuntu0.18.04.1.  
> silan depends on libavutil55 (\>= 10:3.3.7); however:  
> Version of libavutil55:amd64 on system is 7:3.4.6-0ubuntu0.18.04.1.
> 
> dpkg: error processing package silan (–install):  
> dependency problems - leaving unconfigured  
> Processing triggers for man-db (2.8.3-2ubuntu0.1) …  
> Errors were encountered while processing:  
> silan

then when I run silan, same seg fault…

It seems to be related to libav\* not compatible with 0.3.3-1 as it happen in the past with debian for @hairmare :

> <https://github.com/x42/silan/issues/6>
>
> As i mentioned in https://github.com/x42/silan/issues/3#issuecomment-279985845 D…ebian testing is currently exhibiting segfaults.
> 
> This can be reproduced using the following steps on a new nightly netinst iso install:
> 
> \`\`\`bash
> apt-get update
> apt-get install silan
> 
> curl -o /tmp/incorrect.mp3 https://dev.sourcefabric.org/secure/attachment/23028/incorrect.mp3
> 
> silan -b -f JSON /tmp/incorrect.mp3
> \`\`\`
> \`\`\`
> Segmentation fault (core dumped)
> \`\`\`
> 
> I'm using the file from #3 since it came in handy. All the files i checked so far are segfaulting.
> 
> I have put the output of \`trace silan -b -f JSON /tmp/incorrect.mp3\` in \[strace.txt\](https://gist.github.com/hairmare/6b0551a2cda4a2126d4c3923687bfc8a#file-strace-txt) and you can find the backtrace from \`gdb /usr/bin/silan core -ex bt\` in \[gdb.bt.txt\](https://gist.github.com/hairmare/6b0551a2cda4a2126d4c3923687bfc8a#file-gdb-bt-txt).
> 
> Let me know if you need any more information.

@maydo opened an issue with the same exact problem here:

> <https://github.com/x42/silan/issues/10>
>
> Hi,
> 
> silan 0.3.3 is not working on ubuntu 18.04.
> 
> \<pre\>\<code\>
> silan --forma…t=JSON 01-swank-cordovan\_-\_comprar\_tiempo\_\\(vincent\_kwok.mp3
> \*\*\* stack smashing detected \*\*\*: \<unknown\> terminated
> Aborted (core dumped)
> root@sugradio1127:/srv/airtime/stor/imported/1/Swank/Secret Weapons CDS# silan --version
> silan version 0.3.3
> \</pre\>\</code\>

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [December 30, 2019, 9:42pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/9 "2019-12-30T21:42:30Z")

</div>

Hello @hairmare

I followed the instructions on [Silan Installation · libretime/libretime Wiki · GitHub](https://github.com/LibreTime/libretime/wiki/Silan-Installation)

For the 0.3.2~trusty~sfo-1, the website [apt.sourcefabric.org](http://apt.sourcefabric.org) is down since november 2018

For the OBS instructions, it crashed, probably installing it on a Ubuntu 18.04 is not compatible?

`wget -qO- http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04/Release.key | apt-key add -`

> OK

`echo 'deb http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04 ./' > /etc/apt/sources.list.d/hairmare_silan.list`

`apt-get update`

> Get:1 [Index of /ubuntu/](http://ubuntu.mirrors.ovh.net/ubuntu) bionic InRelease [242 kB]  
> Get:2 [Index of /ubuntu/](http://ubuntu.mirrors.ovh.net/ubuntu) bionic-updates InRelease [88.7 kB]  
> Get:3 [Index of /ubuntu/](http://ubuntu.mirrors.ovh.net/ubuntu) bionic-backports InRelease [74.6 kB]  
> Get:4 [Index of /ubuntu](http://security.ubuntu.com/ubuntu) bionic-security InRelease [88.7 kB]  
> Ign:5 [http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu\_16.04](http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04) ./ InRelease  
> Get:6 [http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu\_16.04](http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04) ./ Release [1,011 B]  
> Get:7 [http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu\_16.04](http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04) ./ Release.gpg [481 B]  
> Ign:7 [http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu\_16.04](http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04) ./ Release.gpg  
> Reading package lists… Done  
> W: GPG error: [http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu\_16.04](http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04) ./ Release: The following signatures were invalid: EXPKEYSIG E0B6917E66E21B07 home:hairmare OBS Project home:hairmare@build.opensuse.org  
> E: The repository ‘[http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu\_16.04](http://download.opensuse.org/repositories/home:/hairmare:/silan/xUbuntu_16.04) ./ Release’ is not signed.  
> N: Updating from such a repository can’t be done securely, and is therefore disabled by default.  
> N: See apt-secure(8) manpage for repository creation and user configuration details.

Thanks for your really appreciated help guys 🙂

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [December 30, 2019, 10:05pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/10 "2019-12-30T22:05:26Z")

</div>

So the issue you are running into is the Silan package provided by Ubuntu Bionic isn’t working ? I’ve always assumed that it worked because it didn’t provide incorrect data causing tracks that are too short but I never actually tested whether it worked because I didn’t see the functionality of Silan being very useful in the first place. (ie not a lot of music tracks have a bunch of silence at the end of them that I’ve noticed).

So are you trying to fix this because you need Silan to help fix tracks that have excessive silence ? I’m just curious. I guess the next step is for other people to determine whether that the silan debian package bundled with 18.04 produces the same results you are experiencing.

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [December 30, 2019, 10:40pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/11 "2019-12-30T22:40:39Z")

</div>

I think that the problem come from an incompatibility between silan 0.3.3-1 and ffmpeg + the libav dependencies under Ubuntu 18.04 😬

The use case we have:  
1 webradio feeds by different people and we have about 900 tracks some are good without +2 secs silence other not with +5 secs more of silence. We cannot rework all tracks that’s why the silence detection is very helpful for us 😃

At least @maydo have this issue…  
Unfortunately I’m not a C developer so it will not help to find the root cause…

As a workaround, what about using ffmpeg-4.2.1-amd64-static (the version 3.4.6-0ubuntu0.18.04.1 have a start -0 bug) in order to detect the silences and then update the database using a script?

`./ffmpeg -i ../test.mp3 -af silencedetect=noise=-50dB:d=1 -f null -`

> [silencedetect @ 0x75d1b00] **silence\_start: 202.25487** bitrate=N/A speed=72.3x  
> frame= 1 fps=0.4 q=-0.0 Lsize=N/A time=00:03:23.27 bitrate=N/A speed=71.9x  
> video:1kB audio:35017kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown  
> [silencedetect @ 0x75d1b00] **silence\_end: 203.273** | silence\_duration: 1.0193

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [January 1, 2020, 11:09am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/12 "2020-01-01T11:09:52Z")

</div>

The ffmpeg proposal is a possible fix but it would require a lot of testing and coding to implement it into the framework as a replacement. You are welcome to contribute this. I’m not sure there is a good workaround, you could try installing it from scratch -  
I was able to get forward from  
`git clone https://github.com/x42/silan.git`  
`sudo apt install dh-autoreconf autogen libavcodec-dev libavformat-dev libsound1-dev`  
`sudo apt install`  
`cd silan`  
`./autogen.sh`  
`make`  
`sudo make install`  
which will create a 0.4 silan in /usr/local/bin  
you can then `sudo apt remove silan`  
then run  
`silan --version` and you should have 0.4 installed.

Probably the easiest workaround for people with bad versions from their package manager.

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [January 1, 2020, 3:29pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/13 "2020-01-01T15:29:22Z")

</div>

Thanks you so much @robbt !!! it works prefect now 🙏

How can I force libretime to process the whole db again please?

For those who have the issue under ubuntu 18.04 here is the exact commands:

```
apt install git
git clone --branch v0.4.0 https://github.com/x42/silan.git
cd silan/
apt install dh-autoreconf autogen libavcodec-dev libavformat-dev libsndfile1-dev
apt install
./autogen.sh 
make
make install
apt remove silan

```

Test:  
cd  
silan --version  
silan -b test.mp3

> 0.417392 Sound On  
> 202.361224 Sound Off

---

<div class="post-metadata">

**Author:** ![robbt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/robbt/32/15_2.png) [@robbt](https://discourse.libretime.org/u/robbt)\
**Post date:** [January 2, 2020, 12:11am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/14 "2020-01-02T00:11:33Z")

</div>

For a script to fix this I’d suggest checking out - [https://github.com/LibreTime/libretime/pull/324](https://github.com/LibreTime/libretime/pull/324) - I haven’t tested it but it might work.

---

<div class="post-metadata">

**Author:** ![marmotte32](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/marmotte32/32/243_2.png) [@marmotte32](https://discourse.libretime.org/u/marmotte32)\
**Post date:** [January 2, 2020, 11:01pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/15 "2020-01-02T23:01:13Z")

</div>

I’ve tried this .py script and it works !

> <https://github.com/jmtrivial/libretime/blob/9b9991e4c158cbd4c915090061b364a7b1cd3f88/utils/airtime-re-silan>

Thanks for all your great help 🙂

I put the commands here for those who need:

```
apt install python-psycopg2
pip install psycopg2

python airtime-re-silan.py

```

> File imported/2/prince/prince/prince.mp3 {‘cueout’: 226.77966, ‘length’: 228.023923, ‘cuein’: 0.273401}  
> → 1 update

---

<div class="post-metadata">

**Author:** ![ppriede](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/ppriede/32/382_2.png) [@ppriede](https://discourse.libretime.org/u/ppriede)\
**Post date:** [August 30, 2020, 1:13am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/16 "2020-08-30T01:13:22Z")

</div>

Hi,  
I like to report a problem with silan, related to this topic

I have Ubuntu 16.04.7 LTS  
at first, I was using silan 0.3 (with original installation)

Then, I found this topic and update to silan 0.4 with the instruction of @robbt and marmotte32

> [@How to check if silan is working](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/13):
>
> Thanks you so much @robbt !!! it works prefect now pray How can I force libretime to process the whole db again please? For those who have the issue under ubuntu 18.04 here is the exact commands: apt install git git clone --branch v0.4.0 https://github.com/x42/silan.git cd silan/ apt install dh-autoreconf autogen libavcodec-dev libavformat-dev libsndfile1-dev apt install ./autogen.sh make make install apt remove silan Test: cd silan --version silan -b test.mp3 0.417392 Sound On 202.…

And, update the database with the script from @marmotte32 (above)  
So far, so good, the database was updated with the correct “Cue Out” parameter

(maybe related, but also I have problem removing song “Could not delete file because it is scheduled in the future.”, is in other topic)

But, if I upload the same track again (via upload in libretime), the problem persists  
It’s really and unexpected behavior, since silen is updated (0.4)

Any guide will help,  
Thx.

---

<div class="post-metadata">

**Author:** ![ppriede](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/ppriede/32/382_2.png) [@ppriede](https://discourse.libretime.org/u/ppriede)\
**Post date:** [August 30, 2020, 4:33am UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/17 "2020-08-30T04:33:46Z")

</div>

I think I found the problem

The “LibreTime media analyzer service” was not working  
`sudo systemctl restart libretime-analyzer`

Also the “LibreTime playout service”  
sudo systemctl restart libretime-playout

Greetings!

---

<div class="post-metadata">

**Author:** ![hairmare](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/hairmare/32/38_2.png) [@hairmare](https://discourse.libretime.org/u/hairmare)\
**Post date:** [December 16, 2020, 10:07pm UTC](https://discourse.libretime.org/t/how-to-check-if-silan-is-working/256/18 "2020-12-16T22:07:05Z")

</div>

We should consider replacing silan with something ffmpeg or gstreamer based in the future… silan was always kinda a pain to get up and running and it doesn’t look like a sila based “works perfectly everywhere” solution is in our reach rn.
