Skip to content

.opus files choke system as does { type: 'opus'} #3979

@KM0KA

Description

@KM0KA

Please describe the problem you are having in as much detail as possible:

I have my environment playing audio when I submit .ogg files and .mp3 files. It is my understanding that .ogg files will not use FFMEG, but the .mp3 files will to convert the stream to opus format.

I am having issues getting the audio to not lag. I am also having fidelity issues. The quality is lacking and is on the tinny side. I have used { highWaterMark: ?} at various settings from 12-100. Some marginal quality improvements. I have the DISCORD bitrate at the highest available (96 kbps).

I am using .ogg so as to not use FFMEG and get any performance improvements that course provides. How can I tell if I am bypassing FFMEG and the system is working as intended?

I had been pulling from AWS CloudFront which had horrible results, so I pull the file local before I initiate:

connection.play(file).

This resulted in dramatic improvements.

But I am still suffering from fidelity issues and dropping on occasion. So I have experimented.

I have converted mp3 to the highest quality of both .ogg and opus files. The end result is a file size larger than the original mp3 file.

When I attempt to play any .opus file, the system hangs. This is with and without setting the:

{ type: 'opus'} parameters.

If I play a .ogg file without setting this, it will play. If I attempt to set this flag { type: 'opus'} or { type: 'ogg/opus'} in any situation, the system hangs. So I think there is some bug that needs to be crushed.

How can I increase fidelity?

Is the bitrate setting supposed to be spelled out like in the following:

{bitrate :96000} instead of {bitrate :96} ?

I have tried {bitrate : 128000} and {bitrate :96000} with no discernible performance improvements.

Should I pull from a fs stream and pipe it in? Is there some tweak I need to do to get the fidelity to be acceptable?

Thanks in advance.

Include a reproducible code sample here, if possible:

// Place your code here

Further details:

  • discord.js version:
  • Node.js version:
  • Operating system:
  • Priority this issue should have – please be realistic and elaborate if possible:
  • I have also tested the issue on latest master, commit hash:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions