Closed luckcolors closed 7 years ago
Unfortunately FFmpeg doesn't support Module Files/Tracker Music/Chiptunes, you probably already tested it trying to play a chiptune file After some research, I found two solutions:
openmpt123
. A command-line decoder made by OpenMPT. It should be easier to implement and maintain, but it has no documentation.Update: I was talking with the Chiptune2.js developer, and he said it would better be another project the support for Node.js, and he helped me understand how libopenmpt works as well So I worked this whole day trying to understand how libopenmpt works and how to use it. I will release the module tomorrow after I implement two more features, then I just need to integrate DiscordDJ with it :)
Thanks :D.
Also i wanted to let you know that i discovered that ffmpeg is actually able to read chiptune files. You can use this test command: ffmpeg -i chiptunefiles.xm mod etc... -codec:a libmp3lame -qscale:a 2 output.mp3 Also it seems that ffmpeg uses openmodplug library to decode.
But that is only for local files and without information like title, artist, duration and message. It doesn't work with URLs and other stuff like that. Also, I've just finished the node-chiptune library, it makes no sense to not use it :P
Yeah sorry about discovering that now :P. But well a libopenmtp nodejs library is always handy. :D
I'm closing this for now, feel free to reopen in case you're still interested.
Another cool thing to support will be the ability to play chiptunes for that there http://lib.openmpt.org/libopenmpt/ is compilable using emscripten to javascript (here's a wrapper for web browsers https://github.com/deskjet/chiptune2.js.git ) this will be ofcourse an extension for the /files command. Of course this is a long term request.