There are a few questions and answers on here with regard to being alerted when a process completes/exits(1, 2) – but these all assume that the user has issued said process themselves, and thus can script it with an alert built into the governing script, or pipe the process to some kind of alert.
My situation is that I would like to be alerted of the completion/exit of a process that my user is not initializing. Namely, I am bulk processing massive video files on a Ubuntu 12.04 LTS server. Certain operations on these files take a very long time, so I would like some kind of alert (email would be great) when a specific one finishes. They take so long, that doing this on a one-off basis, manually, based on PIT would be perfectly fine.
To provide more info – let's say I'm processing a particularly big file, and I see that it has progressed on to an FFMPEG script, the process itself being a python script (that is quite complex, and not written by myself, and something I do not wish to modify – though that would be the first logical approach). I imagine issuing a command or script with the PID of said running python script as an argument, and when the process with that PID is no longer running, the alert script does its thing.