ffmpeg.js icon indicating copy to clipboard operation
ffmpeg.js copied to clipboard

Simple config to rebuild with custom features

Open Kagami opened this issue 5 years ago • 0 comments

Idea by @tpetry https://github.com/Kagami/ffmpeg.js/issues/97#issuecomment-617604263

Yeah it's a complicated topic and i don't know a solution too. But maybe compiling a special build could be done for all the folks who have never compiled anything by abstracting the complete building step?

I am thinking on maybe the building could be improved that you place a .ffmpeg-configuration.json5 in a folder specifying all the codecs you want to be activated or deactivated and then you simply run node build-ffmpeg.js which is using docker to make reproducible builds and the user does not need to install any package (and building would work on windows too).

Maybe the configuration file could be a json5 file provided by the project (with every option set to false) like this where you simply toggle options and dont need to research the options:

{
   "presets": {
      "webm": false,
      "h264": false,
      // ...
   },
   "decoders": {
      "h264": false,
      "mpeg2": false,
      // ...
   },
   "muxers": {
      "concat": false
      // ...
   },
  // ...
}

The real advantage is you could checkin the ffmpeg .ffmpeg-configuration.json5 to your repository and you can later easily rebuild it because you have documented what you need, and with json5 you could add comments to every option why you activated it. An information which is in my experience most often lost after months because people dont do this for large compile parameters.

Kagami avatar Apr 22 '20 07:04 Kagami