No shared hosting provide access to command line.
If you don't want to use vps, you can use third part encoding service.
Like my service :
PinkEncode - Plateforme automatisée d'encodage vidéos - mp4, flv, avi, watermark
It work's with xml api.
You send video list to encode with your params, and the service comme to take the videos on your ftp, make the encodeing process, send the encoded files on your ftp and send xml alertes with encoding results.
You can contact me if you want more information.