madebyhiro / codem-transcode

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

Corrupt source files displaying as successful #29

Closed bjrothman closed 10 years ago

bjrothman commented 10 years ago

FFmpeg is processing uploaded source files are incomplete or broken uploads. The fact that it starts processing is not a problem, but codem-transcode seems to be reporting a successful job.

I just upgraded to the newest version after starting to use codem-transcode about a year and a half ago. In the previous version I was using I had to compile FFmpeg myself, but codem would show a failed state if the job was not able to complete fully.

I might try a fix myself by comparing the original duration with the duration of the transcoded result, as the corrupt file seems to be displaying the correct duration of the original un-corrupted version.

How easy would it be to give an exit message of "finished, but corrupted source file" or something to that effect?

Thanks for all your hard work, it is so greatly appreciated! The RPM's make everything so much easier too!

tieleman commented 10 years ago

Hi, thanks for the report. I think it's a tricky matter, as we have no real way of knowing when a source file is corrupted. We rely completely on ffmpeg to report an error (and error code). ffmpeg does try very hard to parse a source file, even if it might be corrupted or partial. Some file formats even explicitly allow that (for example MPEG-TS). We can't even compare duration reliably, because some options in ffmpeg allow you to encode only parts of that file (for example the "-t duration" option, or the "-frames number" option).

Can you provide an example source file, exact encoding settings, and possibly ffmpeg output and exit codes? Maybe I can reproduce it.