• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

sinusbot doesn't properly call youtube-dl (wrong flags passed?)

Kaisky

New Member
Hello!
So I am just for the first time setting up a sinusbot on my teamspeak server. (domain is kaisky.net, feel free to come) Both sinusbot and the teamspeak is running on the same Debian Linux server. I mostly followed the Installation Guide here https://www.bennetrichter.de/en/tutorials/teamspeak3-discord-music-bot-sinusbot/ and also went for the youtube-dl feature.
Both the sinusbot and youtube-dl are installed in /opt/sinusbot and im 100% sure its not an issue with sinusbot not finding youtube-dl (it has permissions and I would get some more useful Error if that was be the problem)

After trying alot I figured out: Calling youtube-dl independently via ssh works without problems, as long as I dont pass the -J flag. If I pass the -J, it will just dump lots of Information about the video but not actually download anything. According to https://sinusbot.github.io/docs/youtube-dl/ sinusbot always calls youtube-dl with the -J flag by default, so my suggestion is thats the source of the error, because the only Error Log I can see in the webinterface is

Cannot playback URL of type text/html; charset=utf-8

So why would sinusbot call the -J flag and how do I change that and why does noone else have this issue?

Regards,

Kaisky


Edit: It's quiet possible that this is a recent youtube-dl bug, that it won't download while dumping the json-file. My youtube-dl is up-to-date though (2021.02.10)
 

markeloff

Member
¡Hola!
Así que por primera vez estoy configurando un sinusbot en mi servidor teamspeak. (el dominio es kaisky.net, no dude en venir) Tanto sinusbot como teamspeak se ejecutan en el mismo servidor Debian Linux. Seguí principalmente la Guía de instalación aquí https://www.bennetrichter.de/en/tutorials/teamspeak3-discord-music-bot-sinusbot/ y también opté por la función youtube-dl.
Tanto sinusbot como youtube-dl están instalados en / opt / sinusbot y estoy 100% seguro de que no es un problema con sinusbot que no encuentra youtube-dl (tiene permisos y obtendría un error más útil si ese fuera el problema)

Después de probar mucho, me di cuenta: llamar a youtube-dl de forma independiente a través de ssh funciona sin problemas, siempre que no pase la bandera -J. Si paso la -J, simplemente arrojará mucha información sobre el video, pero en realidad no descargará nada. De acuerdo con https://sinusbot.github.io/docs/youtube-dl/, sinusbot siempre llama a youtube-dl con la bandera -J de forma predeterminada, por lo que mi sugerencia es que esa es la fuente del error, porque el único registro de errores que puedo ver en la interfaz web es



Entonces, ¿por qué sinusbot llamaría la bandera -J y cómo puedo cambiar eso y por qué nadie más tiene este problema?

Saludos,

Kaisky


Editar: Es muy posible que se trate de un error reciente de youtube-dl, que no se descargará mientras se descarga el archivo json. Sin embargo, mi youtube-dl está actualizado (2021.02.10)
me pasa
lo mismo
 

flyth

is reticulating splines
Staff member
Developer
Contributor
So why would sinusbot call the -J flag and how do I change that and why does noone else have this issue?
The -J flag is fine, that's how it usually works.

However, youtube-dl (or whatever service it uses) probably changed something in the recent version(s) and the bot needs to be updated to support it. I'll look into it.
 

Roshke

Active Member
The -J flag is fine, that's how it usually works.

However, youtube-dl (or whatever service it uses) probably changed something in the recent version(s) and the bot needs to be updated to support it. I'll look into it.
Please implement a fix since I had to use an older version of YouTube-DL.
I don't know in what version they made the change but I used this version:
https://github.com/ytdl-org/youtube-dl/releases/tag/2021.01.16

is it possible to see what is the full command that the music?
 

olokos

Insider
Insider
Youtube-dl has just released an update 4 hours ago.

The problem is sadly the same:

2021-02-22T01:13:04+01:00 [sinusbot-commands:174:16] Error while downloading YouTube Video: iv8GW1GaoIc; json: cannot unmarshal number 49.168 into Go struct field YTDLFormat.abr of type int

This is with youtube-dl 2021.02.22

Wondering whether I should downgrade already or just wait for an update for sinusbot
 

MauriceR

Well-Known Member
Contributor
Youtube-dl has just released an update 4 hours ago.

The problem is sadly the same:

2021-02-22T01:13:04+01:00 [sinusbot-commands:174:16] Error while downloading YouTube Video: iv8GW1GaoIc; json: cannot unmarshal number 49.168 into Go struct field YTDLFormat.abr of type int

This is with youtube-dl 2021.02.22

Wondering whether I should downgrade already or just wait for an update for sinusbot

Well, if you're using YouTube-DL then I would downgrade the version as long as it isn't fixed.
 

Irame

Member
Hi,

I use sinusbot in a docker container via the normal "sinusbot/docker" image.
I get the same error even if I downgrade youtube-dl within the container to version 2021.01.16 or an much earlier version like 2020.05.03 or 2019.11.28.

To downgrade youtube-dl inside the container i did the following:
  1. I ran a bash inside the container:
    sudo docker exec -it [CONTAINER_ID] /bin/bash

  2. I downloaded the older version with the same command the script uses:
    curl -s -L -o /usr/local/bin/youtube-dl https://yt-dl.org/downloads/2020.05.03/youtube-dl
    chmod 755 /usr/local/bin/youtube-dl

  3. I restarted the container:
    sudo docker container restart [CONTAINER_ID]
 

olokos

Insider
Insider
I can confirm that rollback to 2021.01.16 as a temporary fix works fine.

I made a symlink from /opt/sinusbot/youtube-dl to /usr/local/bin/youtube-dl, so that only 1 version of youtube-dl is used system-wide, is that a good thing to do?

I also use youtube-dl --remove-cache-dir (could've made a typo here) regularly, but this way the cache would be stored in /usr/local/bin/youtube-dl and sinusbot will use that one, since config.ini points to /opt/sinusbot/youtube-dl which is a symlink to /usr/local/bin/youtube-dl.

I'd appreciate if somebody could tell me their thoughts about this setup.
 
Top