There seem to be two parts to the question:
- Is it possible (to launch a terminal command after encoding is done)?
- How to do it?
Yes it is, via a script that would simulate "watch folder" behaviour:
- watch for files in a specified folder
- once a file is there, wait for it to becomes available (if it isn't outright): not being used by another process
- once it's available, run a specified command (upload, etc.)
- delete or move the file when done - otherwise the script will attempt to repeat the process
AME would have to be set to encode files into that "watched" folder, and the script running in infinite loop would pick it up from there.
- Not sure if it can be done in BASH; certainly doable in perl.