• 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.

Solved Unable to play music via youtube-dl (Error 403: Forbidden)

Bituspy

Member
Hi,

Okay so I start with the info from the diagnostic script.

Code:
==========================================================
SINUSBOT RELATED
SYSTEM INFORMATION
- Operating System: Ubuntu 18.04.4 LTS
- Kernel: Linux 4.15.0-1065-aws x86_64
- Load Average: 0.02 0.06 0.02
- Uptime: 2 days, 0 hours, 12 minutes, 49 seconds
- OS x64 check: OK
- OS Updates: 3 (updates available!)
- OS Missing Packages: None
- OS APT Last Update: 17.04.2020 11:11:05 UTC +00:00:00
- Shell Locale: C.UTF-8
- Bot Start Script: not found
- CPU:
    Architecture:        x86_64
    CPU(s):              1
    Thread(s) per core:  1
    Core(s) per socket:  1
    Socket(s):           1
    Model name:          Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
    CPU MHz:             2400.035
    Hypervisor vendor:   Xen
    Virtualization type: full
- RAM: 425.31 MB/983.68 MB in use (43%)
- SWAP: 0 B/0 B in use (0%) (SWAP disabled)
- DISK: 31.93 GB/38.71 GB in use (82%)
- Package versions:
   - libglib: 2.56.4-0ubuntu0.18.04.6

BOT INFORMATION
- Status: running (PIDs: 3194 3193, User: sinusbot)
- Webinterface: port locally reachable (Port: 8087)
- Binary: /opt/sinusbot/sinusbot
- Binary Info: MD5 Hash: 224b687db910b732fe5a7cfec4f6c78e, Perms: 755, User: si                             nusbot
- Version: 1.0.0-beta.10-202ee4d
- TS3 Plugin: installed (md5 hash match)
   - Bot Plugin: aa483aea105cb62033392b1ce6d317ab
   - TS3 Client: aa483aea105cb62033392b1ce6d317ab
- Config:
   - LogLevel = 10 (debug log active)
   - TS3Path = /opt/sinusbot/teamspeak3-client/ts3client_linux_amd64 (Version 3.                             3.2)
   - YoutubeDLPath = /usr/local/bin/youtube-dl (does exist, version: 2020.03.24)
- Installed scripts: Youtube_Search.js; advertising.js; alonemode.js; bookmark.                             js; command.js; followme.js; norecording.js; rememberChannel.js; sinusbot-comman                             ds.js; welcome.js

BOT TECHNICAL INFORMATION
- File exists:
   - TS3Client/libqxcb-glx-integration.so: no
- LDD output:
    linux-vdso.so.1 (0x00007ffeff7dc000)
    libswresample.so.2 => /opt/sinusbot/libswresample.so.2 (0x00007f4d03a6a000)
    libavfilter.so.6 => /opt/sinusbot/libavfilter.so.6 (0x00007f4d03712000)
    libavformat.so.57 => /opt/sinusbot/libavformat.so.57 (0x00007f4d03311000)
    libavcodec.so.57 => /opt/sinusbot/libavcodec.so.57 (0x00007f4d029ac000)
    libavutil.so.55 => /opt/sinusbot/libavutil.so.55 (0x00007f4d02738000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4d02534000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4d02196000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4d01f77000                             )
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4d01bee0                             00)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4d019d6000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4d015e5000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4d013c8000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4d011c0000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4d03c84000)

REACHABILITY CHECKS
- HTTPS check with IPv4 mode: SUCCESS [Connection established to www.sinusbot.c                             om, CODE #200]
- HTTPS check with IPv6 mode: IGNORED [Disabled]
- DNS resolution check: SUCCESS [www.sinusbot.com resolved to 104.28.15.74]
- Update server checks:
    update01.sinusbot.com -> 104.28.14.74: SUCCESS [CODE #404]
    update02.sinusbot.com -> 104.28.14.74: SUCCESS [CODE #404]
    update03.sinusbot.com -> 104.28.14.74: SUCCESS [CODE #404]

TIME INFORMATION
- Time (local): 17.04.2020 11:58:04 UTC +00:00:00
- Time (remote): 17.04.2020 11:58:04 UTC +00:00:00
- Time (difference): 0 secs (Time diff less than 2 secs. Good.)
- Timezone: Etc/UTC

OTHER INFORMATION
- TeamSpeak3 Version: 3.3.2
- youtube-dl Version: 2020.03.24
- DiagScript Version: 0.8.0
==========================================================

My config.ini

Code:
TS3Path = "/opt/sinusbot/teamspeak3-client/ts3client_linux_amd64"
ListenHost = "0.0.0.0"
DataDir = "/opt/sinusbot/data/"
ListenPort = 8087
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 10
EnableProfiler = false
YoutubeDLPath = "/usr/local/bin/youtube-dl"
EnableDebugConsole = false
EnableInternalCommands = false
AllowStreamPush = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
ExternalFileBase = ""
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = ""
HostnameMask = ""
SampleInterval = 60
StartVNC = false
EnableWebStream = false
LogFile = ""
LicenseKey = "PbNEIaUrFcqHjbrzl36I6GpGvn6PpFRRcL9PAQ/NUBY="
IsProxied = false
DenyStreamURLs = []
Pragma = 0
UserAgent = ""

[YoutubeDL]
  BufferSize = 524288
  MaxDownloadSize = 419430400
  MaxDownloadRate = 104857600
  MaxSimultaneousChunkDownloads = 6
  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.10-202ee4d)"
  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


My bot is not playing any music from !youtube script.

My bot is not playing any music from !qyt

My bot plays once from !yt then it stops.

If I queue music from !youtube the music bot stops after first song (you need to basically restart the bot in order to play it once more)

Code:
2020-04-17T17:39:10+05:30 Playing next from queue:
2020-04-17T17:39:07+05:30 [ Youtube_Search:1015:44] Append to queue: Pkh8UtuejGw
2020-04-17T17:38:56+05:30 [ Youtube_Search:1015:44] Append to queue: Pkh8UtuejGw
2020-04-17T17:38:50+05:30 Playing next from queue:
2020-04-17T17:38:47+05:30 [ Youtube_Search:1015:44] Append to queue: aJOTlE1K90k
2020-04-17T17:38:38+05:30 Playing next from queue:

The command just keeps skipping until the whole list gets over, same goes for !qyt.

Any help will be appreciated.
 

Bituspy

Member
It says could not import file.

Everything was working fine around 24 hours ago. I was playing songs from music bot nothing wrong. Just 2 hours ago I tried nothing is working.
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
Looks like other people are having trouble with youtube-dl aswell recently. (https://github.com/ytdl-org/youtube-dl/issues/24713, https://github.com/ytdl-org/youtube-dl/issues/24736, https://github.com/ytdl-org/youtube-dl/issues/23638, ...)

Try removing the signature cache:
Bash:
su sinusbot
youtube-dl --rm-cache-dir
and then try again.

If that doesn't work: Try manually downloading something from the CLI: youtube-dl -v -i --no-playlist --no-call-home -x https://www.youtube.com/watch?v=fHI8X4OXluQ
 

Bituspy

Member
Code:
su sinusbot
youtube-dl --rm-cache-dir

This fixed it after 2-3 restarts. I even tried to reinstall the scripts properly but finally it works fine.
 

doman991

Helping Hand
Looks like other people are having trouble with youtube-dl aswell recently. (https://github.com/ytdl-org/youtube-dl/issues/24713, https://github.com/ytdl-org/youtube-dl/issues/24736, https://github.com/ytdl-org/youtube-dl/issues/23638, ...)

Try removing the signature cache:
Bash:
su sinusbot
youtube-dl --rm-cache-dir
and then try again.

If that doesn't work: Try manually downloading something from the CLI: youtube-dl -v -i --no-playlist --no-call-home -x https://www.youtube.com/watch?v=fHI8X4OXluQ
It seems to be working again thx.
 

Lala Sabathil

Donor
is awesome!
Contributor
Insider
For me it helped to install the YouTube-dl via python3 pip install

(and set the path to the pip version of YouTube-dl)
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
But it fix other errors too.
As example with the actual YouTube-dl I have the problem that it fails with error: wrong format
your youtube-dl might have been outdated then
 

Kilian57

Active Member
For me it helped to install the YouTube-dl via python3 pip install

(and set the path to the pip version of YouTube-dl)

After trying to clear the cache several times I tried that but it didn't work for me.

By the way writing here because my thread got closed as solved https://forum.sinusbot.com/threads/could-not-import-file.7831/


Looks like other people are having trouble with youtube-dl aswell recently. (https://github.com/ytdl-org/youtube-dl/issues/24713, https://github.com/ytdl-org/youtube-dl/issues/24736, https://github.com/ytdl-org/youtube-dl/issues/23638, ...)

Try removing the signature cache:
Bash:
su sinusbot
youtube-dl --rm-cache-dir
and then try again.

If that doesn't work: Try manually downloading something from the CLI: youtube-dl -v -i --no-playlist --no-call-home -x https://www.youtube.com/watch?v=fHI8X4OXluQ
Executing the youtube-dl command manually works...
 

Kilian57

Active Member
Jep is allowed to use it and I also testes yt-dl as that user
You can read everthing in my thread but here is the error

Code:
2020-05-02T20:37:32+02:00 DOWNLOAD [admin] https://www.youtube.com/watch?v=fHI8X4OXluQ NOK
2020-05-02T20:37:32+02:00 Error loading file (/opt/sinusbot/data//store/2e97fc8e-6e06-476d-8dd5-7ec4d266eb01/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855): Could not open file!
2020-05-02T20:37:32+02:00 Downloading (single) 3.2M with codec opus from youtube
2020-05-02T20:37:32+02:00 Probing https://r4---sn-4g5e6nze.googlevideo.com/videoplayback?expire=1588466251&ei=672tXqHzF6qQ4gHYgYuwDg&ip=144.76.45.220&id=o-AFobwwiEU_3XFgue-Ivp_2FtGfsYfBOQMhHT69XU762H&itag=251&source=youtube&requiressl=yes&mh=bb&mm=31%2C29&mn=sn-4g5e6nze%2Csn-4g5ednls&ms=au%2Crdu&mv=m&mvi=3&pl=21&gcr=ua&initcwndbps=682500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3347057&dur=203.221&lmt=1579202977598688&mt=1588444533&fvip=4&keepalive=yes&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRQIhAMezIXPB2cltC_8bc6fJ-2NcyDRIP1H-ylTgJhoooNYpAiBGDYS-UQ-ZTOeRxqEMUbS06GQAqIu56mv3t32wPHKeUQ%3D%3D&sig=AJpPlLswRQIgVVt2y3Hu1o-5WB7EKuwX4YnEmxwia10sUCwhXZ3KlwgCIQDWQdx4OqhVKQXvCzNQwR4z72jw_oXb_T_0xg8K0ukDjg==&ratebypass=yes for HTTP range support
2020-05-02T20:37:32+02:00 Downloading thumbnail
2020-05-02T20:37:30+02:00 JOBS-ADD [admin] https://www.youtube.com/watch?v=fHI8X4OXluQ OK
 

Kilian57

Active Member
I did it as the sinusbot user (ts in my way since 2015), as root and manually. I updated today and made a new install through pip and that doesn't work either.
I will look into it tomorrow again. I'm a bit tilted by it now.
Thx anyway and maybe reopen my thread
Kilian
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
I updated today
What's the version you're using? (youtube-dl --version)
I will look into it tomorrow again. I'm a bit tilted by it now.
Thx anyway and maybe reopen my thread
We don't need 50+ threads about the same topic; let's just discuss it here.

(DE) Ich behandel dich nicht anders als andere. Wenn du dich umguckst wirst du einen haufen Threads zum gleichen Thema finden, die ich ebenfalls schließe und hier hin verweise. Es ist anstrengend, wenn jeder einen neuen Thread zu dem selben Problem öffnet; Nicht nur für die Leute die versuchen zu helfen, sondern auch für Leute die nach Lösungen suchen. Mein schließen des Threads war kein Vorwurf an dich, sondern nur ein lazy-copy-paste Hinweis um die Übersichtlichkeit zu verbessern. :)
Kurz durchatmen und einen Schritt zurücktreten. 🐱
FAQ: Why are you guys so rude?
 
Last edited:

Kilian57

Active Member
Hello again
First thanks for your help.
Haven't looked into this for a long time and now decided to update everything and try again. Surprise it didn't worked but I got some new clues.

Code:
Jun 11 01:51:27 main sinusbot[2117]: 2020/06/11 01:51:27 2e97fc8e 579a265f PLUGIN [         youtube:175:20] YTWeb Triggered with "played" at https://www.youtube.com/watch?v=eFTLKWw542g
Jun 11 01:51:28 main sinusbot[2117]: 2020/06/11 01:51:28 2e97fc8e          DEBUG  Downloading thumbnail
Jun 11 01:51:28 main sinusbot[2117]: 2020/06/11 01:51:28 2e97fc8e          DEBUG  Probing https://r5---sn-4g5e6nsd.googlevideo.com/videoplayback?expire=1591854688&ei=AHLhXpTVD8jTgAe7nJSgAg&ip=144.76.45.220&id=o-AKD3IbtkQMSTHQ7pt5dVKjoPfI0h2nNAGA8f7LGhdYBN&itag=251&source=youtube&requiressl=yes&mh=m4&mm=31%2C26&mn=sn-4g5e6nsd%2Csn-f5f7lne6&ms=au%2Conr&mv=m&mvi=4&pl=21&pcm2=yes&gcr=ua&initcwndbps=1077500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3901428&dur=245.401&lmt=1540279956675088&mt=1591833034&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cpcm2%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgNI0djIiT-SdiHbzpym55GHxogLrTMNUdJ6NW9ESiaYICID9f9k0n7r882Nb9lIJTsJN2roS0rW_vK52XAiDgLFdE&sig=AOq0QJ8wRQIhAIZMFAvxpULm58gtb4tbW7NLoIoWxeTjrgPhyb_FjhoDAiAxn0K6gerCNfHYQ5XeDDnJIaue9ph36Lc6OSdT4m9H4Q==&ratebypass=yes for HTTP range support
Jun 11 01:51:28 main sinusbot[2117]: 2020/06/11 01:51:28 2e97fc8e          INFO   Downloading (single) 3.7M with codec opus from youtube
Jun 11 01:51:29 main sinusbot[2117]: 2020/06/11 01:51:29 2e97fc8e 579a265f DEBUG  Done playing
Jun 11 01:52:02 main sinusbot[2117]: 2020/06/11 01:52:02 2e97fc8e          INFO   JOBS-ADD [admin] https://www.youtube.com/watch?v=eFTLKWw542g OK
Jun 11 01:52:04 main sinusbot[2117]: 2020/06/11 01:52:04 2e97fc8e          DEBUG  Downloading thumbnail
Jun 11 01:52:04 main sinusbot[2117]: 2020/06/11 01:52:04 2e97fc8e          DEBUG  Probing https://r6---sn-4g5ednle.googlevideo.com/videoplayback?expire=1591854723&ei=I3LhXvzRMvrZ-gbU-56wDg&ip=144.76.45.220&id=o-AK4qWIPxRsqG7vIadWyBX--UHC5aI59-GV-dw5LqI2lx&itag=251&source=youtube&requiressl=yes&mh=m4&mm=31%2C29&mn=sn-4g5ednle%2Csn-4g5e6nsd&ms=au%2Crdu&mv=m&mvi=5&pl=21&gcr=ua&initcwndbps=1077500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3901428&dur=245.401&lmt=1540279956675088&mt=1591833034&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgdaQVv09Fzwl3-EIAzLtU3R2waluP_7j3paU_CraWjrgCIQCBr394HAba7NvpRoI6yNd6p6YyTJjWa9Zbb7_dLYYfrQ%3D%3D&sig=AOq0QJ8wRAIgPNxMcOF22CfKIGk3QU2TmUqxDvk00Vv9xfhq8NwRDJ8CIDfBfPB9eEs9gF8GhrzVjjyl_Av_JU2yWx6ZC3aRCe_J&ratebypass=yes for HTTP range support
Jun 11 01:52:04 main sinusbot[2117]: 2020/06/11 01:52:04 2e97fc8e          INFO   Downloading (single) 3.7M with codec opus from youtube
Jun 11 01:52:04 main sinusbot[2117]: 2020/06/11 01:52:04 2e97fc8e          DEBUG  Error loading file (/opt/sinusbot/data//store/2e97fc8e-6e06-476d-8dd5-7ec4d266eb01/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855): Could not open file!
Jun 11 01:52:04 main sinusbot[2117]: 2020/06/11 01:52:04 2e97fc8e          INFO   DOWNLOAD [admin] https://www.youtube.com/watch?v=eFTLKWw542g NOK

As far as I can tell youtube-dl is not the problem but storing the file. Anyone got some smart ideas or do I need to wipe the database? Well this is my opportunity for a clean up so not too bad if we can't fix this.

Hope you're all doing fine
Kilian


(DE) Ich behandel dich nicht anders als andere.
Sry wollte nicht unhöflich werden oder so wirken. Ich schätze eure Arbeit wirklich sehr. Hatte soweit ich es einschätzen kann nur als erster einen Thread zu dem Thema aufgemacht, dann alle anderen dazu gelesen und die Vorschläge ausprobiert. Nur damit meiner mit den Worten nutz die Such-Funktion zugemacht wird. Ich weiß wie frustrierend es sein kann wenn alle immer wieder das selbe fragen. Hatte mich da nur ungerecht behandelt gefühlt. Aber ist ja alles wieder im Loot. Danke nochmal :)
 
Last edited:
Top