On the surface this seems like a terrible idea:
FFmpeg is mountains of extremely complex C code whose entire job is processing untrusted inputs.
Choosing to make such code network-enabled if you can't trust your inputs, I would recommend to sandbox if at all possible. Otherwise you are asking for trouble.