UMS backports (ffmpeg engine)

Necessary backports to make ums ffmpeg engine version work.
Since delta is rather large I suggest code review to see if anything is missing or removed by mistake.