museofficial / muse

🎧 a self-hosted midwestern Discord music bot that doesn't suck
MIT License
894 stars 236 forks source link

Bot suddenly stops playback #1050

Open Stanisgrox opened 3 months ago

Stanisgrox commented 3 months ago

What's happening? When playing any song bot connects and starts playback of first 10-40 sec of video but then stops.

Logs

 prisma:client:libraryEngine  sending request, this.libraryStarted: true +17ms
  muse Spawned ffmpeg with ffmpeg -reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5 -to 225 -i REDACTED -acodec libopus -vn -f webm pipe:1 +837ms
  muse [WS => Shard 0] Heartbeat acknowledged, latency of 140ms. +11s
  prisma:client  Prisma Client call: +47s
  prisma:client  prisma.setting.findUnique({
  where: {
    guildId: 'REDACTED'
  }
}) +1ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  findUniqueSetting(where: {
    guildId: "REDACTED"
  }) {
    guildId
    playlistLimit
    secondsToWaitAfterQueueEmpties
    leaveIfNoListeners
    queueAddResponseEphemeral
    autoAnnounceNextSong
    defaultVolume
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +47s
  prisma:client  Prisma Client call: +5ms
  prisma:client  prisma.fileCache.create({
  data: {
    hash: 'REDACTED',
    accessedAt: new Date('2024-07-18T22:36:38.240Z'),
    bytes: 524206
  }
}) +0ms
  prisma:client  Generated request: +0ms
  prisma:client  mutation {
  createOneFileCache(data: {
    hash: "REDACTED"
    accessedAt: "2024-07-18T22:36:38.240Z"
    bytes: 524206
  }) {
    hash
    bytes
    accessedAt
    createdAt
    updatedAt
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +5ms
  muse Evicting oldest files... +36s
  prisma:client  Prisma Client call: +15ms
  prisma:client  prisma.fileCache.aggregate({
  select: {
    _sum: {
      select: {
        bytes: true
      }
    }
  }
}) +0ms
  prisma:client  Generated request: +0ms
  prisma:client  query {
  aggregateFileCache {
    _sum {
      bytes
    }
  }
}
 +0ms
  prisma:client:libraryEngine  sending request, this.libraryStarted: true +15ms
  muse No files needed to be evicted. Total size of the cache is currently 2422126 bytes, and the cache limit is 2000000000 bytes. +2ms

Additional context L:ogs look fine like it should just end playback. It downloads 100-500 kb file and plays it then it ends. I've redacted guild id and link cause it contains IP but there's nothing on this side.

Runtime I'm running Muse:

Versions

Stanisgrox commented 3 months ago

Seeking while music plays prolongates this playback by additional seconds.

ike2117 commented 3 months ago

I've been experiencing the same issue. Currently running muse:latest and after a few seconds of playback, stream stops

Stanisgrox commented 3 months ago

Well I narrowed that down to FFMPEG issue. If I try to put same string inside console to start playback I get 403 error code. If I enter google API link inside browser it works fine.

It's strange 'cause bot version of FFMPEG doesn't get 403.