4 ms·
I made a similar server a while ago, but it is more minimal and command-line-oriented [1]. The only client so far is a fairly minimal browser client, but it is
by stirner 9y ago
I made a similar server a while ago, but it is more minimal and command-line-oriented [1]. The only client so far is a fairly minimal browser client, but it is functional. It supports any container/codec that libav supports, and allows either MP3 or Ogg Opus as streaming formats. Songs are dynamically transcoded to the streaming format when they are requested. This means you can have a library of heterogeneous, potentially streaming-unfriendly formats, and not have to worry about the streaming codec du jour or transcode your entire library when you want to use a new codec.
I want to do more work on the server, but I've been busy working on an audio format library in Rust to support the transcoding. Right now, the best option is to either exec() the ffmpeg command line tool, which is easy but has overhead and makes distribution more difficult, or use the libav* C libraries, which are quite complex and in my experience poorly documented. I've decided the best option is to make a cleaner, more minimal audio library that wraps reference encoder/decoder libraries.
How does mStream handle transcoding, if at all?
[1] https://github.com/wwalexander/river https://github.com/wwalexander/river
- mStreamTeam 9y agomStream doesn't do any transcoding. Instead I've focused on support for all common file formats. The webapp includes a fallback to Aurora JS if the the browser doesn't support the filetype. Typically this is only needed for FLAC but recently Firefox and Chrome have added FLAC streaming
- stirner 9y agoThanks for the info. The main reason I transcode the streams before transmitting is for size, not compatibility. There are a lot of situations where you really, really don't want to stream a 20 MB FLAC file. Lossy codecs like Opus at 128-192 kbps or MP3 V3/V4 can achieve transparency at a much smaller size, which is vital if you have a slower or metered connection.
- mStreamTeam 9y agoThat's a good use case. People typically ask me about trans coding as a why to stream unsupported file codecs. When I have the time I'll take another look into transcoding