beetbox / beetbox/audioread

Do not use hardcoded scheme in GstAudioFile

Open
#34 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
538
Forks
112
PR merge metrics
No merged PRs in 30d

Description

GStreamer supports e.g. http-audiostreams, but the current implementation in `gstdec.py` prefixes everything with `file://`; if that prefix would be added only when there isn't any scheme already provided, `GstAudioFile` could be used for example with Internet radio streams (which was my original goal when I came across this library, since this nicely abstracts the gory details of GStreamer):

```
radio_stream = 'http://mp3channels.webradio.antenne.de/chillout'
with audioread.gstdec.GstAudioFile(radio_stream) as f:
process_stream(f)
```

Obviously, it would be even nicer if the user of this library wouldn't even need to know what backend is used in the above case, and could just pass the URL in `audioread.audio_open` (unless this library is wanted to kept file-only for some reason).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in gstdec.py at GstAudioFile, where inputs are prefixed with file://. Check how local paths and already-schemed URLs are handled, then verify that local paths retain the prefix while http URLs do not. The broader audio_open behavior is a separate question left open by the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
audio-video-rtc
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.