0

I am looking for a library which will assist me in streaming audio from files on my server to a client on a separate device. (Think Spotify.)

  • The audio files at the source are very large, long, and lossless.
  • The audio can (in fact, probably should) be compressed before sending.
  • The client does not need to store any permanent file on the other end.
  • Being able to seek within the stream is a must.
  • The server side could be .NET C# or .NET C++. The client is written in .NET C#.

My current plan is to use an RTS stream (actually, VoIP), but this strikes me as a less-than perfect solution because:

  • The stream doesn't actually need to be real-time since the audio source is a file. The client would benefit from being able to buffer.
  • Playback controls would need to be out-of-band and homebrew.

Does anybody have any suggestions for an audio-streaming library?

  • When you say that the audio should be compressed before sending, does the quality of the compressed audio matter? For example, are you willing to accept a lower quality lossy-compression stream from the lossless file? – Mr Public Apr 11 '18 at 17:38
  • @MrPublic that is correct, quality is not important. thank you for taking a look at my question! – Woodrow Barlow Apr 11 '18 at 21:08
1

If you haven't already, you should take a look at Opusfile, which is the library used by the Opus audio codec.

It supports lossy audio compression and seeking, however you will need to create a wrapper for the DLL in C#.

This should be a good starting point in terms of an Audio Codec.

  • +1 i think "decoder" is the phrase i was missing while googling. – Woodrow Barlow Apr 13 '18 at 13:14
  • i ended up using dr wav to decode the audio file into PCM samples, transmitting those samples over a socket, and using waveout to play those samples directly on the other end. – Woodrow Barlow Apr 16 '18 at 19:41
0

If a professional SDK is an option for you, take a look at LEADTOOLS multimedia library. (Disclosure: I'm a LEAD employee).

There's a .NET Media Server module that can stream audio, video or both. The SDK supports various protocols, but for seeking abilities, you might end up using RTSP. Seeking may also depend largely on the client-side player. If it buffers adequately, you may be able to use the client buffer to seek back enough for your needs.

The SDK has more than one audio codec, and depending on the protocol you choose, you might be able to perform encoding, compression and streaming in one process.

There's a free evaluation you can download, and tech support is free even during evaluation, so you can try and discuss your options before making any commitments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.