Automated conversion of surveillance footage


I have a surveillance camera setup where I would like to achieve the following:

  1. Save footage to samba share (done by camera)
  2. Detect that footage has been saved to samba share
  3. Send notification to mobile device
  4. Converted video into more common file format

I have managed to get 1-3 working, so now I am only missing point 4 but here I really run into issues. I have manage to covert the video file on my desktop using ffmpeg, so I know which command to run but I can simply not get it working in home assistant. Any ideas to this working?

FYI I run HassOS 4.13 on a RPi 3.