• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • Happy New Year everyone! A new version (1.0.0-beta.16) is out for Linux, fixing an issue that could lock the bot up when using it with TS3. Please visit the resources section or the main page (https://www.sinusbot.com) for the new package.

Solved Playback skips forward inside long audio files.

Minding

New Member
Hey, I deployed an instance of the SinusBot docker image to my cluster the other day, and so far the experience has been fairly good.

I noticed however, that the player jumps inside long tracks repeatedly (every 2-7 minutes; when I go back it's every few seconds - but not always at the same time).
I downloaded these files using youtube-dl via the interface, but since the playback doesn't always jump at the same position I am somewhat confident that the files are not corrupted. They also have different file sizes, so an download limit or something similar seems unlikely as well.

My server only has limited RAM resources, but there is still quite some over (around 500Mb).
I increased the logging level to 10 as recommended and restarted the pod, but the output does not suggest any issues:
PLAY [admin] aa764455-ff52-4682-bbbd-7eb8855e668b OK
2022/05/22 20:24:23 6e2202f0 7cefac38 DEBUG New channel aa764455-ff52-4682-bbbd-7eb8855e668b () ID ad3727da-a8bb-4b3c-b3bf-8c03d60280ab (cc 0)
2022/05/22 20:24:25 6e2202f0 7cefac38 INFO SEEK [admin] 87.765961 OK
2022/05/22 20:24:28 6e2202f0 7cefac38 INFO SEEK [admin] 96.436172 OK
2022/05/22 20:24:32 6e2202f0 7cefac38 INFO SEEK [admin] 98.031914 OK
2022/05/22 20:24:34 6e2202f0 7cefac38 INFO SEEK [admin] 98.882980 OK
2022/05/22 20:24:41 6e2202f0 7cefac38 DEBUG Removing closed channel aa764455-ff52-4682-bbbd-7eb8855e668b () ID ad3727da-a8bb-4b3c-b3bf-8c03d60280ab
2022/05/22 20:24:41 6e2202f0 7cefac38 DEBUG Deleting channel aa764455-ff52-4682-bbbd-7eb8855e668b () ID ad3727da-a8bb-4b3c-b3bf-8c03d60280ab (cc 1)
2022/05/22 20:24:41 6e2202f0 7cefac38 DEBUG Channels now zero
2022/05/22 20:24:41 6e2202f0 7cefac38 DEBUG Done playing
(here you can see me triggering the issue multiple times, by going back a few seconds each time it happens)

My configuration is almost as shipped (changes include "LogLevel", "IsProxied" and "MaxSimultaneousChunkDownloads"):
INI:
TS3Path = "/opt/sinusbot/TeamSpeak3-Client-linux_amd64/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/opt/sinusbot/data/"
ListenPort = 80
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 10
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/youtube-dl"
EnableDebugConsole = false
EnableInternalCommands = false
AllowStreamPush = false
UploadLimit = 300000000
RunAsUser = 0
RunAsGroup = 0
ExternalFileBase = ""
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
HostnameMask = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = ""
LicenseKey = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
IsProxied = true
DenyStreamURLs = []
Pragma = 0
UserAgent = ""

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  MaxSimultaneousChunkDownloads = 8
  CacheStreamed = false
  TimeoutSingleDownloader = 0
  TimeoutMultiDownloader = 0
  ChunkSize = 3145728

[TS3]
  AvatarMaxWidth = 0
  AvatarMaxHeight = 0
  AllowGIF = false

[StreamRewrites]

[Scripts]
  Debug = false
  AllowReload = false
  EnableTimer = false
  DisableLegacyEvents = false
  DevMode = false
  ScriptTimeout = 5

[Themes]
  Default = ""

[SpeechRecognition]
  Enable = false

[FFmpeg]
  UserAgent = "SinusBot (1.0.0-beta.16-ba60e37)"
  WaitTime = 0

[DAV]
  Enable = false

[XServer]
  Delay = 0
  Debug = false

[SHMem]
  Enable = false
  Size = 0
  Delay = 0
  Interval = 0

[RadioStations]
  URL = ""
  UpdateInterval = 0

[TTS]
  Enabled = false

  [[TTS.Modules]]
    Locale = "en-US"
    Filename = "voice_lstm_en-US.zvoice"
    PipelineFile = "voice_lstm_en-US/sfg/pipeline"
    Prefix = "voice_lstm_en-US/sfg/"
    Instances = 2

  [[TTS.Modules]]
    Locale = "de-DE"
    Filename = "voice_lstm_de-DE.zvoice"
    PipelineFile = "voice_lstm_de-DE/nfh/pipeline"
    Prefix = "voice_lstm_de-DE/nfh/"
    Instances = 2

I'd appreciate any help :)

PS: Some unrelated minor questions in case anyone can give a short answer on these:

- The radio list that ships with the docker image seems to use an outdated URL: radionomy.com
DEBUG Server seems broken or unreachable. Maybe ICY? Trying GET
DEBUG GET didn't work either. Stream will be forwarded to FFmpeg directly.
Streaming http://streaming308.radionomy.com:80/00000
INFO PLAYURL [admin] http://streaming308.radionomy.com:80/00000 NOK
Is this going to be fixed / can I manually fix it somehow?

- The TeamSpeak bot is very loud (20db - 30db over pleasant level) even when I set it to 1% volume. Is that normal / can I further reduce the volume somehow?

- The configuration documentation seems to be missing a number of options.
 
Last edited:

flyth

is reticulating splines
Staff member
Developer
Contributor
About the skipping: that's usually due to the download being too slow and the downloader skipping parts. People have had more luck with alternatives/forks of youtube-dl, such as yt-dlp. Should be a drop-in replacement in most cases.

- The radio list that ships with the docker image seems to use an outdated URL: radionomy.com
Is this going to be fixed / can I manually fix it somehow?
I'll try to update the internal list soon again - you can however always add urls to the bot manually.

- The TeamSpeak bot is very loud (20db - 30db over pleasant level) even when I set it to 1% volume. Is that normal / can I further reduce the volume somehow?
Haven't heard of that problem before, hmm...

- The configuration documentation seems to be missing a number of options.
Yeah, probably. However, I think the most important options are already in there. If you have specific questions, feel free to ask. :)
 

Minding

New Member
Thank you for the fast response!

1.) I think you're right. I downloaded the file and played on my PC where it stopped after about 3 minutes.
I wasn't aware that this could happen with youtube-dl :/.
I'll give yt-dlp a try and report back.

2.) Cool, thanks.

3.) I have tested it with 6 people (1x TS5, and 5x TS3) - everyone has adjusted the volume between (-15db and -30db). 1% is very loud and 0% is just off. :/
 

Minding

New Member
Okay, so the issue is that Youtube changed their protocol as described on the youtube-dl GitHub repository.
It looks like youtube-dl didn't implement a fix for it yet, while yt-dlp did.

For anyone how has the same issue, this should solve it for you:
Bash:
# Make sure python is installed (dependency of yt-dlp)
apt update
apt install python3
# Get yt-dlp
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
chmod a+rx /usr/local/bin/yt-dlp
# Replace youtube-dl with yt-dlp
mv /usr/local/bin/yt-dlp /usr/local/bin/youtube-dl

I also tried changing "YoutubeDLPath" in "/opt/sinusbot/data/config.ini" to "/usr/local/bin/yt-dlp", but got "youtube-dl is unavailable" in the web interface.

@flyth Could you replace youtube-dl with yt-dlp in the docker image, since youtube-dl seems to be permanently broken (the issue exists for a year now)?
 
Last edited:
Top