Git Product home page Git Product logo

Comments (4)

benkaiser avatar benkaiser commented on August 20, 2024

Hi @daltek ,

A key difference between node-music-player and subsonic and node-music-player is that although node-music-player works in a remote situation, it is usually run on a local computer. That said I do see that in the future running it as a remote streaming server.

I'm not sure exactly, but the cost of transcoding a song every single time a user wants to stream it sounds costly. I feel it would be a better option to convert it on the fly, but to pipe the output to both the filesystem and the response (standard output back to the client).

I also think that rather than making this the default, having a setting on the client-side that can be set that would then change the request url from /songs/:id to /transcode/:id which would transcode from whatever format it is in to mp3 (unless it is already mp3).

Do you have any coding skills to implement this? Info on the ffmpeg command that subsonic uses can be found here. I'll take a look at the pull request if you manage to implement it (also keep in mind that I want to keep the dependency on just node.js modules so that it is easily cross-platform should I finish implementing that one day).

I myself have a bunch of features I want to implement first.

from stretto.

benkaiser avatar benkaiser commented on August 20, 2024

Also this ffmpeg library (should we opt to depend on ffmpeg) can convert the audio codec and send the stream to two places just fine. It would look something like the following (with res being the response it is the response the client is requesting):

ffmpeg('/path/to/infile.flac')
  .format('mp3')
  .output('/path/to/outfile.mp3')
  .output(res);

from stretto.

daltek avatar daltek commented on August 20, 2024

Hello Ben,

Thanks for your replies and consideration.

I like the idea of copying transcoded output back to the filesystem for future use. Unfortunately I have absolutely no experience with nodejs, and negligible programming experience beyond a few shell scripts. I'll count this project as one more reason why I should make the effort to learn a bit though!

Meanwhile I wish you every success and will keep an eye on the project; great stuff.
Best wishes.

from stretto.

benkaiser avatar benkaiser commented on August 20, 2024

Closing as this is an enhancement and has been added to trello.
Trying to keep github issues to just bugs and in-progress development.
Trello card for reference: https://trello.com/c/WmudxWuo/53-allow-on-the-fly-transcoding-via-ffmpeg

from stretto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.