Before every transcode session, I need to retrieve info on the source file to determine output settings. It would be efficient to incorporate this function into the codem-transcode package as it could allow for a single system to manage all the transcoding tasks as well as some automated presets based on input file parameters.
There is a handy package already available to retrieve json data from source files which could be added easily into the codem system: https://npmjs.org/package/node-ffprobe
So you would have some endpoint that you can use for retrieving information about a file on the filesystem, something like:
With some additional data:
And you would receive the result of that probe in a JSON-formatted response.
I think that would be a good way to do such a thing. You could then decide what kind of processing presets you want to send to the transcoder.
Great, I'll whip up a patch.
Added support for ffprobe (Issue #10)
Extra endpoint /probe and extra config option "ffprobe".
I've pushed a branch containing the new functionality, see:
Let me know if this works for you and I'll push a new release. The README is updated, so check that out on how to use the ffprobe functionality.
Added extra logging info for #10.
A new package has been pushed to npm (0.4.1):