madebyhiro / codem-transcode

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

Transcoder accepts new jobs when it can't spawn ffmpeg. #19

Closed tieleman closed 10 years ago

tieleman commented 11 years ago

When ffmpeg can't be spawned by the transcoder (due to permissions or in some other way the binary can't be found) it still accepts jobs, but these will never finish or complete.

Don't accept jobs if ffmpeg can't be spawned.

tieleman commented 11 years ago

Awesome! Thanks for taking the time. What would make it perfect is if there was any error checking on child_process.spawn as well. There are multiple ways spawning can fail (a missing binary is of course the first one), but also for example if the process doesn't have permission to execute the binary.

See: http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options (failed exec example)

I think that might be a fail-safe way to check for other spawning errors.