How to check if silan is working

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

hi, ive found this

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

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.

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.

Did you follow the instructions on 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.

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

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.

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 !

@robbt,

Iā€™ve just been here : 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 :

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

Hello @hairmare

I followed the instructions on Silan Installation Ā· libretime/libretime Wiki Ā· GitHub

For the 0.3.2~trusty~sfo-1, the website 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/ bionic InRelease [242 kB]
Get:2 Index of /ubuntu/ bionic-updates InRelease [88.7 kB]
Get:3 Index of /ubuntu/ bionic-backports InRelease [74.6 kB]
Get:4 Index of /ubuntu bionic-security InRelease [88.7 kB]
Ign:5 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 ./ Release [1,011 B]
Get:7 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 ./ Release.gpg
Reading package listsā€¦ Done
W: GPG error: 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 ./ 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 :slight_smile:

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.

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

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 :smiley:

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

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.

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.361224 Sound Off

1 Like

For a script to fix this Iā€™d suggest checking out - https://github.com/LibreTime/libretime/pull/324 - I havenā€™t tested it but it might work.

Iā€™ve tried this .py script and it works !

Thanks for all your great help :slight_smile:

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

1 Like

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

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.

1 Like

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!

2 Likes

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.

1 Like