UMS backports (ffmpeg engine) and subsequent impovments

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.