-3

Need your help to solve such use case:

When ffmpeg is starting I want to send a pushover notification (simple sh script). Is there a way to do it real-time or do I need to use crontab and something like ps aux|grep ffmpeg?

I can also make a proxy script which will be run instead of ffmpeg directly but not sure how to proxy all ffmpeg parameters untouched. Any ideas?

Paul Hodges
  • 10,927
  • 1
  • 16
  • 30
Jacek K
  • 1
  • 1
  • You likely want the proxy script. In the script you can specify an arg to collect `ffmpeg` args and pass then to `ffmpeg` with out quotes: `./ffmpeg-proxy.bash --ffmpeg-args "subcommand -v 'some value' $VAR"` and run `ffmpeg` with `ffmpeg $ffmpeg_args` – joshmeranda May 31 '22 at 14:14
  • Passing all the parameters can be done easily: https://stackoverflow.com/questions/4824590/propagate-all-arguments-in-a-bash-shell-script your script would just look like: ffmpeg "$@" & # The PID of ffmpeg can then be referenced as "$!" – vipw May 31 '22 at 14:16

0 Answers0