Shell commands are not allowed on free hosting. If you want to execute shell commands, upgrade to premium. However, I’m not sure which plan provides shell access, you’ll have to check that yourself.
Also, please note that both free and premium servers do not have any video transcoding software installed. Video transcoding is a very demanding process, so most web hosting providers do not allow it on their servers, because it would take too much processing power away from other sites on the server.
You can perform video conversion using CloudConvert as a paid API service, this can offset the video transcoding workload to a service that is dedicated to this purpose while keeping your web server easy on the load.
Usually, most premium hosting plans have either exec or shell_exec enabled (as you paid for it, and in most cases you do not need shell_*) but running heavy computation (not just video encoding) may also result in suspension. There are also JavaScript libraries that do this type of conversion on the client side but at a very expensive cost for it being slow when processed on clients’ computers.
Actually, just ask the user to paste a YouTube link and embed it, or if you’re the producer, use FFmpeg on your computer to compress it.