nikitazep Is it possible to install third-party js players such as plyr.io?
nikitazep Is it possible to transcode video formats using ffmpeg?
FFmpeg can do almost anything, but it's a command-line tool, not a PHP application. You can transcode a video from FFmpeg command-line, but how are you going to effectively do this from PHP/server? Even if Files Gallery triggers a transcode of a video, this will take a long time to complete before the video can be output. It certainly can't do it in real-time speed. And even if we did this, you would need to store the transcoded video somewhere (cache).
Why not transcode your videos up front with FFmpeg? This is how any video service like Youtube would do it ...