Open bdn76 opened 5 years ago
Not currently possible — ShinySDR's audio stream is proprietary in the sense of "I made up the protocol and nobody else uses it". However, I have also thought it would be good to be able to just point a regular streaming audio player at a ShinySDR server. Thanks for making the issue.
This is not the same feature as #11, using WebRTC for to-browser streaming, but they might end up sharing some infrastructure.
Cool. Thanks.
I've got a working implementation. It's uncompressed audio just like the existing stream. The latency is high since the browser doesn't consider this realtime and buffers a lot.
Just need to put in a link to it — probably next to the existing audio controls. And test with more players.
… dropping the URL into the ones I have handy just says there's a format error or does nothing. Maybe I need to create a "playlist"? I seem to recall that has been a thing, but I haven't used streaming audio not-in-a-web-page much lately.
Where i can get URL for stream?
Sorry, I was unclear; the changes aren't pushed yet.
As of commit 31fd6a791a4c3af729421800f32e9845cf0dd299 this feature is in; the link is inside the client audio controls (a collapsible section in the left sidebar where the Spectrum/Map/Telemetry/… display toggles are).
However, it doesn't work very well. Of the software I have handy, only Chrome will play the audio. Firefox tries to download it, Safari and QuickTime Player show a generic error, iTunes does something else random.
Non-mutually-exclusive hypotheses:
Any recommendations from people familiar with HTTP audio streaming would be welcome.
Hmm... I'm do not see URL:
Src up to date.
commit 7d89fb6260075c43be1e996aa6983b185d83546c Author: Kevin Reid kpreid@switchb.org Date: Fri Nov 9 08:28:15 2018 -0800
Implement audio streaming over HTTP.
Define a Resource that produces a streaming WAV, and add it to the
session as /<cap>/audio-stream.
The stream is not currently linked from anywhere.
Ok. I'm reconstruct URL from source: .../audio-stream/mono?rate=11025 and test it in player. mpv, vlc and ffplay work fine but mono/stereo switch not work:
.../audio-stream/stereo?rate=11025 Playing: .../audio-stream/stereo?rate=11025 [ffmpeg/demuxer] wav: Ignoring maximum wav data size, file may be invalid (+) Audio --aid=1 (pcm_f32le 2ch 11025Hz) AO: [pulse] 11025Hz stereo 2ch float
.../audio-stream/mono?rate=11025 Playing: .../audio-stream/mono?rate=11025 [ffmpeg/demuxer] wav: Ignoring maximum wav data size, file may be invalid (+) Audio --aid=1 (pcm_f32le 2ch 11025Hz) AO: [pulse] 11025Hz stereo 2ch float A: 00:00:06 / 00:00:09 (71%) Cache: 1s+179KB
MP3 would be better of course and variable bitrate must have for squelch interaction.
After cache flushing i'm see URL link:
mpv, vlc and ffplay work fine
Thanks for the report!
mono/stereo switch not work:
There is (currently) no mono/stereo switch; /mono
and /stereo
only mean anything in the test code you saw them in. You can configure the server for mono audio but if the server is stereo there is no mix-down feature for individual streams, currently.
MP3 would be better of course and variable bitrate must have for squelch interaction.
Indeed! I hope that integrating codecs will improve this and also the interactive stream — the WAV stream is just what was easy to put together.
Nice replcament for proprietry websdr. Can i listen stream without open browser via common wide player, VLC for example.