Playback not starting on `next` branch with either HttpRequest or YoutubeDL on M series ARM SoCs
maxall41 opened this issue · 12 comments
Songbird version: next
branch
Rust version (rustc -V
): 1.69.0
Serenity/Twilight version: next
Description:
I'm trying to play a track with HttpRequest and it doesn't seem to be playing I was also able to recreate this using the voice
example on the next
branch. I don't get any errors or anything it just doesn't play.
...
Steps to reproduce:
- Copy
serenity/voice
example from thenext
branch - Attempt to play youtube video using bot
It sounds like you're trying to play a track from youtube using an HttpRequest
. You need to use YoutubeDl
(and ensure you have yt-dlp installed) -- HttpRequest
lets you download from an URL which points directly to an audio source (e.g., "https://test.com/song.mp3"), but youtube effectively requires that you use a tool like yt-dlp to retrieve the URL of the audio/video data from a CDN,
Sorry I wasn't clear is what i meant was I am trying to download a youtube video with YoutubeDL
and it's not working and i am also having the same problem downloading and streaming standard files with HttpRequest
in that in both cases I get no errors and I get event that says they started playback but playback does not occur.
I found the issue. Rubato does not seem to work on MacOS with apple silicon I was able to get it working by running it in a linux VM on AWS. This should probably be noted in the documentation.
Ouch, that's unfortunate. Perhaps you could raise an issue with the Rubato devs? From what I can see they claim SIMD support on AArch64 as a feature, so it's not as if the library is x86_64 only by design.
Yeah I’ll create an issue over there.
Rubato works fine on macOS on both intel and arm.
This issue seems to be due to an implementation issue in songbird. See issue HEnquist/rubato#59
Interesting; unfortunately, I don't have a personal mac to test with. My best guess is format conversions biting somewhere between songbird and symphonia, unless there's some weird interaction with the chunk sizes we use?
I might be able to look into this when i have some more time.
Update: I tried to recreate this on an AWS Graviton instance and I was not able to recreate it. So this seems to be some sort of obscure issue with the M series SoC specific architecture. And not an issue with ARM architecture in general. Or maybe it's some sort of obscure bug in the darwin kernel
yeah- i have this issue too, with raw audio sources
@maxall41 Sorry to necropost, but after #193 was raised I've had the opportunity to test on an M-series Mac and I'm able to playback and resample MP3 sources via HttpRequest
in a call. The issue there was that Darwin errors out when setting the UDP receive buffer length to zero -- let me know if you still have any issues.