Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pure-Go AAC Decoder #9

Open
nlowe opened this issue Apr 26, 2020 · 4 comments
Open

Pure-Go AAC Decoder #9

nlowe opened this issue Apr 26, 2020 · 4 comments
Labels
area/playback enhancement New feature or request help wanted Extra attention is needed

Comments

@nlowe
Copy link
Owner

nlowe commented Apr 26, 2020

Unless we can figure out #8 , we should probably write a native AAC Decoder so we can drop gstreamer and use github.com/faiface/beep.

@nlowe nlowe added enhancement New feature or request area/playback labels Apr 26, 2020
@nlowe
Copy link
Owner Author

nlowe commented Apr 26, 2020

Note, there's already an open issue for this: faiface/beep#55, might be worth upstreaming if we get this working.

@nlowe
Copy link
Owner Author

nlowe commented Apr 26, 2020

After fixing #1 it looks like either gstreamer.freedesktop.org is stupid slow or is throttling us. Windows builds commonly spend 15-20 minutes just installing gstreamer. It'd be really awesome if we could figure this or #8 out.

@nlowe nlowe added the help wanted Extra attention is needed label May 23, 2020
@skuzzymiglet
Copy link

As far as I can see, it's https://github.com/gen2brain/aac-go, but that's a cgo binding

@nlowe
Copy link
Owner Author

nlowe commented Apr 3, 2021

Well, I appear to have fubar'd my gstreamer/pkg-config install on windows. I do have a solution that shells out to FFmpeg to transcode to PCM and then use https://github.com/faiface/beep to play the tracks. However, https://github.com/faiface/beep requires valid chunk lengths to be defined in the RIFF and fmt chunks. If FFmpeg streams output to a pipe, it can't detect the track length ahead of time and sets the chunk lengths to 0xffffffff which beep's WAV decoder does not like. The best workaround I have so far is to transcode to a temporary file and then play that through beep.

nlowe added a commit that referenced this issue Apr 4, 2021
Pandora appears to have added some new required parameters to the
REST login payload that appear random/encrypted. Fortunately, the
tokens returned by the Legacy JSONv5 API are valid for the REST
API. As a workaround, we use the Legacy JSONv5 API to perform a
Partner Login as an android device and then a User Login to get
a token. Every request after this uses the REST API.

Additionally, swap out gstreamer for FFmpeg+beep. We pipe tracks
to FFmpeg and write them to a temporary file, then use beep to
play the file. github.com/faiface/beep/wav refuses to play  files
with garbage chunk lengths (which FFmpeg sets if you stream to
stdout) so we have to transcode the whole file first.

These two changes are combined because my gstreamer/pkg-config
install appears to be broken so I couldn't test them independently.

Fixes #24
Obsoletes #10, #16, and #23
Partially Addresses #8 and #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/playback enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants