Ts3audiobot: Youtube not playing songs over *exactly* 3:00

Created on 17 Apr 2020  Â·  8Comments  Â·  Source: Splamy/TS3AudioBot

Describe the bug
Youtube songs over exactly 2:59 (sometimes 3:00, might be due to rounding?) get immediately "skipped". When playing any song up to three minutes it is being played as usual.

Example TeamSpeak output:

<15:32:39> "kev": !play https://www.youtube.com/watch?v=GTISI3Bg4Mc
<15:32:41> "kev": !song
<15:32:41> "Bot2": ► Best Friends [00:00/00:00]
<15:32:44> "kev": !song
<15:32:44> "Bot2": Error: There is nothing on right now...

(Same behavior with !ytp and !yta)

It seems like the song is being queued but it's never being played. See below:

2020-04-17 14:58:53.1880| INFO|1|Bot.OnMessageReceived User kev requested: !ytp crawling linkin park
2020-04-17 14:58:57.4530| INFO|1|PlayManager.StopInternal Song queue ended: No next song could be played.

[Edit:] Downloading songs over 3:00 with youtube-dl works without any issues.

Steps to reproduce
I don't know really. It randomly started 3 days ago when we first used radiostreams. I don't think it is related to that though.

Version
dotnet 3.1.201
develop TS3AB 0.12.0-alpha.19
Also tried reinstalling 0.12.0-alpha.19 and 0.11.0. Reinstalled youtube-dl and ffmpeg. Obviously I'm not getting 429-blocked because songs that are up to 3:00 long are beeing played just fine.

Platform
Ubuntu 18.04

Actually made a huge post before I noticed the 3:00 issue. Not sure if any more logs or config files are needed, so I let everything else out. Just let me know if you need anything else.

bug

All 8 comments

Possible Solution?
I might have found what causes this. I currently have three history entries and the history is never updated. I think it might be corrupted?

Just confused as to why it still doesn't work after reinstalling. If I knew the history location I could possibly fix it myself.

It would also make sense that playing some youtube videos won't work. The workflow of TS3AB might be that the songs are simply pushed to history?

I don't suspect the history to be at fault, since it's only a sinple update event _after_ the resource was started successfully. That means it 1) shouldn't prevent the resource from starting and 2) if it would throw an error it would be in the log.
The history is all saved in the ts3audiobot.db so to clean it you can simply delete the file.
You can also upload you db file here if you want and i can take a look.

I was able to reproduce this with a (almost) fresh bot. Interesting that this did not turn up before.

@Splamy I don't know anything about your code tbh as I am really bad at OOP, so I thought this might be the cause. Thanks for explaining it so well, though.

@Flakebi Oh wow alright. Thought the error was only on my side.

Guess it's not necessary for me to provide any more logs then.

I've also had issues the last few days.

19:50:39.3572| INFO|0| User Sourcecode requested: !play [URL]https://www.youtube.com/watch?v=Ux2SYiBtrLM[/URL]
19:50:43.0049| INFO|0| Song queue ended: No next song could be played.

I removed ts3audiobot.db and restarted the bot, but the issue persists.

I don't know if it's the same issue, but last week I had an issue with music playing (all kind of youtube music).

Try to delete your .cache directory, that's solved it for me. :)

@srkhost that actually fixed it for me. Thanks! Didn't think it would be that easy lol

Can someone else with the same issue confirm this fix, so this can be closed? (Maybe @Flakebi ?)

Nice find @srkhost, I can confirm that removing .cache/youtube-dl fixes this issue. Seems to be ytdl-org/youtube-dl#23638, not sure why this happens though. I think the audiobot should suggest to remove this directory or run youtube-dl --rm-cache-dir in case that it gets a 403 when fetching the audio.
ffmpeg output:

$ ffmpeg with -hide_banner -nostats -threads 1 -i "https://r6---sn-h0jeen76.googlevideo.com/videoplayback?expire=1587511238&ei=ZiufXsvyFMfE-gbDzpuwCA&ip=188.195.196.32&id=o-ACvvjT6wOC5SRWTv-z14td2Zxz4PhExgjcRMIbpuiANy&itag=251&source=youtube&requiressl=yes&mh=3w&mm=31%2C26&mn=sn-h0jeen76%2Csn-4g5ednsd&ms=au%2Conr&mv=m&mvi=5&pl=24&gcr=de&initcwndbps=1517500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=2734367&dur=180.041&lmt=1576496733706915&mt=1587488799&fvip=5&keepalive=yes&fexp=23882514&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=ALrAebAwRQIgWUhgthVBOJ_9pRMS_3xBAxFLa0abqgk9AcqmwPCtreQCIQCECONCGlhb5r2dnYXRuRUWMx-97zytHSheSsRPqX_Jfg%3D%3D&sig=AJpPlLswRQIhAKTKvbU4MrouIYInHQcMT2bPzob-cB34=awZZ2MF_Y4dAiA0XRW4K==fK8Mq8yUgCR8MSSA7qCP4xP5M4pCPmJmE&ratebypass=yes" -ac 2 -ar 48000 -f s16le -acodec pcm_s16le pipe:1
[https @ 0x23af540] HTTP error 403 Forbidden
https://r6---sn-h0jeen76.googlevideo.com/videoplayback?expire=1587511238&ei=ZiufXsvyFMfE-gbDzpuwCA&ip=188.195.196.32&id=o-ACvvjT6wOC5SRWTv-z14td2Zxz4PhExgjcRMIbpuiANy&itag=251&source=youtube&requiressl=yes&mh=3w&mm=31%2C26&mn=sn-h0jeen76%2Csn-4g5ednsd&ms=au%2Conr&mv=m&mvi=5&pl=24&gcr=de&initcwndbps=1517500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=2734367&dur=180.041&lmt=1576496733706915&mt=1587488799&fvip=5&keepalive=yes&fexp=23882514&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=ALrAebAwRQIgWUhgthVBOJ_9pRMS_3xBAxFLa0abqgk9AcqmwPCtreQCIQCECONCGlhb5r2dnYXRuRUWMx-97zytHSheSsRPqX_Jfg%3D%3D&sig=AJpPlLswRQIhAKTKvbU4MrouIYInHQcMT2bPzob-cB34=awZZ2MF_Y4dAiA0XRW4K==fK8Mq8yUgCR8MSSA7qCP4xP5M4pCPmJmE&ratebypass=yes: Server returned 403 Forbidden (access denied)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

TykooHagen picture TykooHagen  Â·  4Comments

Najsr picture Najsr  Â·  3Comments

iiAlphaWolf01 picture iiAlphaWolf01  Â·  4Comments

officialtaxz picture officialtaxz  Â·  6Comments

Edith445544986 picture Edith445544986  Â·  4Comments