madebyhiro / codem-transcode

Offline video transcoder written in node.js
Other
153 stars 68 forks source link

FFprobe integration #10

Closed teamwenger closed 11 years ago

teamwenger commented 12 years ago

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

tieleman commented 12 years ago

So you would have some endpoint that you can use for retrieving information about a file on the filesystem, something like:

POST /probe

With some additional data:

{
    "source_file": "/PATH/TO/INPUT/FILE.mp4"
}

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.

teamwenger commented 12 years ago

Exactly, that seems like the ideal way to organize this.

On Friday, October 12, 2012, Sjoerd Tieleman wrote:

So you would have some endpoint that you can use for retrieving information about a file on the filesystem, something like:

POST /probe

With some additional data:

{ "source_file": "/PATH/TO/INPUT/FILE.mp4"}

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.

— Reply to this email directly or view it on GitHubhttps://github.com/madebyhiro/codem-transcode/issues/10#issuecomment-9373023.

tieleman commented 11 years ago

Great, I'll whip up a patch.

tieleman commented 11 years ago

I've pushed a branch containing the new functionality, see:

https://github.com/madebyhiro/codem-transcode/tree/ffprobe

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.

teamwenger commented 11 years ago

The readme is understandable and clear. Seems easy enough to use and a good implementation of the idea. Good work!

On Mon, Oct 15, 2012 at 5:54 AM, Sjoerd Tieleman notifications@github.comwrote:

I've pushed a branch containing the new functionality, see:

https://github.com/madebyhiro/codem-transcode/tree/ffprobe

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.

— Reply to this email directly or view it on GitHubhttps://github.com/madebyhiro/codem-transcode/issues/10#issuecomment-9443741.

tieleman commented 11 years ago

A new package has been pushed to npm (0.4.1):

https://npmjs.org/package/codem-transcode