ruby-av / paperclip-av-transcoder

Audio/Video Transcoder for Paperclip using FFMPEG/Avconv
MIT License
136 stars 82 forks source link

Post processing complete #20

Closed jinge6 closed 9 years ago

jinge6 commented 9 years ago

I am trying to capture when the video transcoding has finished so I can notify the user about success or not, and to mark the transcoded video as ready to show on my site.

I have tried the capturing the "after__post_process" event but that is firing before the transcoding has finished.

Not sure if that is a bug or if I have to find another way to capture completion of the transcoding?

Cheers, James

owahab commented 9 years ago

This gem forks a new shell to run the transcoding command. There is currently no built-in way to make sure the attachment has been processed.

You may, however, try one of these:

  1. If you're using a background worker, perhaps you can listen on the job completion.
  2. You can add an extra field <attachment>_meta and this gem will populate it for you when it's done with any of the styles.
jinge6 commented 9 years ago

Thanks for the quick response. I've setup a polling service to mark attachment completion.