maxcutlyp / YoutubeBot

A self-hosted Discord bot for playing YouTube videos
48 stars 26 forks source link

Terminated bug #9

Open suchencjusz opened 1 year ago

suchencjusz commented 1 year ago

Fresh install - Ubuntu 20.04

does not work, after downloading the song it displays an error - terminated

Here is the log file (containing information about the system)

Ubuntu 20.04.6 LTS YoutubeBot tty1

YoutubeBot login: root
Password: 
Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.15.107-2-pve x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
New release '22.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Last login: Fri Jun  9 22:10:29 UTC 2023 on tty1
root@YoutubeBot:~# ls
YoutubeBot
root@YoutubeBot:~# cd YoutubeBot/
root@YoutubeBot:~/YoutubeBot# ls 
README.md  dl  nohup.out  pfp.png  requirements.txt  restart  systemd  youtubebot.py
root@YoutubeBot:~/YoutubeBot# python3.10 youtubebot.py 
2023-06-09 22:14:41 INFO     discord.client logging in using static token
2023-06-09 22:14:42 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: b8dd09c8defd391b0c2ec31beb68a405).
logged in successfully as AREK ON THE BEAT
[youtube] Extracting URL: https://www.youtube.com/watch?v=Gq3jneCl4Mk
[youtube] Gq3jneCl4Mk: Downloading webpage
[youtube] Gq3jneCl4Mk: Downloading android player API JSON
[youtube] Extracting URL: https://www.youtube.com/watch?v=Gq3jneCl4Mk
[youtube] Gq3jneCl4Mk: Downloading webpage
[youtube] Gq3jneCl4Mk: Downloading android player API JSON
[info] Gq3jneCl4Mk: Downloading 1 format(s): 599
[download] ./dl/803331359757303858/Gq3jneCl4Mk.m4a has already been downloaded
[download] 100% of  211.85KiB
Terminated
root@YoutubeBot:~/YoutubeBot# 2023-06-09 22:14:55 INFO     discord.client logging in using static token
2023-06-09 22:14:56 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: f99d1a837949ccacd39797e08eadee2c).
logged in successfully as AREK ON THE BEAT
[youtube] Extracting URL: https://www.youtube.com/watch?v=Gq3jneCl4Mk
[youtube] Gq3jneCl4Mk: Downloading webpage
[youtube] Gq3jneCl4Mk: Downloading android player API JSON
[youtube] Extracting URL: https://www.youtube.com/watch?v=Gq3jneCl4Mk
[youtube] Gq3jneCl4Mk: Downloading webpage
[youtube] Gq3jneCl4Mk: Downloading android player API JSON
[info] Gq3jneCl4Mk: Downloading 1 format(s): 599
[dashsegments] Total fragments: 1
[download] Destination: ./dl/901929379297382431/Gq3jneCl4Mk.m4a
[download] 100% of  211.85KiB in 00:00:00 at 527.44KiB/s
[FixupM4a] Correcting container of "./dl/901929379297382431/Gq3jneCl4Mk.m4a"
Terminated
2023-06-09 22:15:09 INFO     discord.client logging in using static token
2023-06-09 22:15:10 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: a04a55426df35cc251ae2cba845e3efe).
logged in successfully as AREK ON THE BEAT
[youtube] Extracting URL: https://www.youtube.com/watch?v=Gq3jneCl4Mk
[youtube] Gq3jneCl4Mk: Downloading webpage
[youtube] Gq3jneCl4Mk: Downloading android player API JSON
[youtube] Extracting URL: https://www.youtube.com/watch?v=Gq3jneCl4Mk
[youtube] Gq3jneCl4Mk: Downloading webpage
[youtube] Gq3jneCl4Mk: Downloading android player API JSON
[info] Gq3jneCl4Mk: Downloading 1 format(s): 599
[download] ./dl/901929379297382431/Gq3jneCl4Mk.m4a has already been downloaded
[download] 100% of  211.34KiB
Terminated
2023-06-09 22:15:17 INFO     discord.client logging in using static token
2023-06-09 22:15:18 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: 1f0f2cd23465204f6ccd53a04ad9e787).
logged in successfully as AREK ON THE BEAT
[youtube] Extracting URL: https://www.youtube.com/watch?v=SDTZ7iX4vTQ
[youtube] SDTZ7iX4vTQ: Downloading webpage
[youtube] SDTZ7iX4vTQ: Downloading android player API JSON
[youtube] Extracting URL: https://www.youtube.com/watch?v=SDTZ7iX4vTQ
[youtube] SDTZ7iX4vTQ: Downloading webpage
[youtube] SDTZ7iX4vTQ: Downloading android player API JSON
[info] SDTZ7iX4vTQ: Downloading 1 format(s): 599
[dashsegments] Total fragments: 1
[download] Destination: ./dl/901929379297382431/SDTZ7iX4vTQ.m4a
[download] 100% of  963.01KiB in 00:00:00 at 1.89MiB/s
[FixupM4a] Correcting container of "./dl/901929379297382431/SDTZ7iX4vTQ.m4a"
Terminated
2023-06-09 22:15:27 INFO     discord.client logging in using static token
2023-06-09 22:15:28 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: 08e48ce11daefc4819868650fe9bae35).
logged in successfully as AREK ON THE BEAT
^C
root@YoutubeBot:~/YoutubeBot#
maxcutlyp commented 1 year ago

Hey @suchencjusz - make sure you have ffmpeg installed and in your PATH. Typing ffmpeg in the terminal should print some version info.

If you have ffmpeg installed and it's still not working, git pull the latest changes to the bot then try again and post the output. It (probably) won't fix your issue, but it will give you an error message for us to work with.

DubbaThony commented 7 months ago

If you are getting terminated out of the blue, it might also be OOMK (out of memory killer) killing off the app. Do you have enough ram?