DuncteBot / skybot-lavalink-plugin

Lavalink plugin adding support for several audio source managers
Apache License 2.0
24 stars 6 forks source link

Tiktok: The audio codec used in the track is not supported #19

Closed zeleop closed 1 year ago

zeleop commented 1 year ago

Description

TikTok Error out Could not load tiktok video

Version info

Client used: My own

Output of the Error:

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Could not load TikTok video
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.getPlaybackUrl(TikTokAudioTrack.java:63) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.dunctebot.sourcemanagers.Mp3Track.loadStream(Mp3Track.java:54) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.loadStream(TikTokAudioTrack.java:86) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.process(TikTokAudioTrack.java:72) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:104) ~[lavaplayer-1.4.0.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:361) ~[lavaplayer-1.4.0.jar!/:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
        Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation:
  lavaplayer.version: 1.4.0-original
  os.arch: amd64
  os.name: Windows 10
  os.version: 10.0
  java.vendor: Azul Systems, Inc.
  java.version: 17.0.6
  java.runtime.version: 17.0.6+10-LTS
  java.vm.version: 17.0.6+10-LTS
Caused by: java.io.IOException: Unexpected status code for video page response: 404
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.extractData(TikTokAudioSourceManager.java:114) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.extractData(TikTokAudioSourceManager.java:98) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.loadPlaybackUrl(TikTokAudioTrack.java:109) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.getPlaybackUrl(TikTokAudioTrack.java:54) ~[jar:file:C:\Users\Senne\Desktop\lavalink-lts-plugins\.\plugins\skybot-lavalink-plugin-1.4.1.jar!/:na]
        ... 8 common frames omitted

output of java -version:

openjdk version "17.0.6" 2023-01-17 LTS
OpenJDK Runtime Environment Zulu17.40+19-CA (build 17.0.6+10-LTS)
OpenJDK 64-Bit Server VM Zulu17.40+19-CA (build 17.0.6+10-LTS, mixed mode, sharing)
duncte123 commented 1 year ago

sigh I hate it when this happens. I'll try to fix it soon

duncte123 commented 1 year ago

Fixed in version 1.4.2

zoli456 commented 1 year ago

Now it give me when I try to play a video from Tiktok: com.sedmelluq.discord.lavaplayer.tools.FriendlyException: The audio codec used in the track is not supported. at com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack.loadAudioTrack(MpegAudioTrack.java:65) ~[lavaplayer-1.4.0.jar!/:na] at com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack.process(MpegAudioTrack.java:41) ~[lavaplayer-1.4.0.jar!/:na] at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:25) ~[lavaplayer-1.4.0.jar!/:na] at com.dunctebot.sourcemanagers.Mp3Track.loadStream(Mp3Track.java:58) ~[skybot-lavalink-plugin-1.4.2.jar!/:na] at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.loadStream(TikTokAudioTrack.java:90) ~[skybot-lavalink-plugin-1.4.2.jar!/:na] at com.dunctebot.sourcemanagers.tiktok.TikTokAudioTrack.process(TikTokAudioTrack.java:76) ~[skybot-lavalink-plugin-1.4.2.jar!/:na] at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:104) ~[lavaplayer-1.4.0.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:361) ~[lavaplayer-1.4.0.jar!/:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na] Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation: lavaplayer.version: 1.4.0-original os.arch: amd64 os.name: Linux os.version: 5.4.0-146-generic java.vendor: Oracle Corporation java.version: 13.0.2 java.runtime.version: 13.0.2+8 java.vm.version: 13.0.2+8

duncte123 commented 1 year ago

@zoli456 do you have the link that happens with?

During my testing everything worked fine

zoli456 commented 1 year ago

I tried with these random videos: https://www.tiktok.com/@dannyphantom.exe/video/7237320845331270955 https://www.tiktok.com/@mariahandbill/video/7237938251615604014 https://www.tiktok.com/@mobilfox_official/video/7225686441857174811 https://www.tiktok.com/@cznburak/video/7239297138134469894

zoli456 commented 1 year ago

@duncte123 Any update on this?

duncte123 commented 1 year ago

@duncte123 Any update on this?

I wish I had the free time to work on this 24/7, but unfortunately, I do not. I can probably take a look next month.

duncte123 commented 1 year ago

I tried a couple of videos and the closest I got was this, tiktok is doing something fuckery with the MP4s and I currently cannot figure out what it is

https://github.com/DuncteBot/skybot-lavalink-plugin/assets/8843386/3e53f4fd-ef5f-43a3-9329-3bef0c55a8cc

duncte123 commented 1 year ago

@zoli456 Would you mind testing this release for me? It should fix tiktok playback. Please also refer to the compatibility guide in the readme to see if you can run this verion on v3 as well.

zoli456 commented 1 year ago

I had to set up on my own machine because I only rent that server and they dont support lavalink 4. It gives me a very long error message. Full message: https://pastebin.com/X9kfZSzY Last part: com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Failed to find data for tiktok video at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.extractData(TikTokAudioSourceManager.java:147) ~[jar:file:F:\DiscordBotFiles\server.\plugins\skybot-lavalink-plugin-1.5.0.jar!/:na] at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.extractData(TikTokAudioSourceManager.java:101) ~[jar:file:F:\DiscordBotFiles\server.\plugins\skybot-lavalink-plugin-1.5.0.jar!/:na] at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.loadItem(TikTokAudioSourceManager.java:76) ~[jar:file:F:\DiscordBotFiles\server.\plugins\skybot-lavalink-plugin-1.5.0.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:452) ~[lavaplayer-17c75f5.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:434) ~[lavaplayer-17c75f5.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:223) ~[lavaplayer-17c75f5.jar!/:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:1623) ~[na:na]

2023-07-10T15:16:10.424+02:00 ERROR 2632 --- [ader-2-thread-1] lavalink.server.player.AudioLoader : Load failed

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Failed to find data for tiktok video at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.extractData(TikTokAudioSourceManager.java:147) ~[jar:file:F:\DiscordBotFiles\server.\plugins\skybot-lavalink-plugin-1.5.0.jar!/:na] at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.extractData(TikTokAudioSourceManager.java:101) ~[jar:file:F:\DiscordBotFiles\server.\plugins\skybot-lavalink-plugin-1.5.0.jar!/:na] at com.dunctebot.sourcemanagers.tiktok.TikTokAudioSourceManager.loadItem(TikTokAudioSourceManager.java:76) ~[jar:file:F:\DiscordBotFiles\server.\plugins\skybot-lavalink-plugin-1.5.0.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:452) ~[lavaplayer-17c75f5.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:434) ~[lavaplayer-17c75f5.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:223) ~[lavaplayer-17c75f5.jar!/:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:1623) ~[na:na]

duncte123 commented 1 year ago

Try a different video or the same one again, for some reason tiktok is not sending you the video page

zoli456 commented 1 year ago

It works. Every tiktok video started without a problem.