Above test script should work, it is just basic PHP script to run a system command from PHP script.

If that is not working, there should be some problem with PHP restriction, mencoder installation or its path.

To verify mencoder is working, login to ssh and run following command in SSH prompt

Code:
/usr/bin/mencoder '/home/mmvideos/public_html/video/ristinamodel_balloons_2__2_.mpeg' -o /home/mmvideos/public_html/flvideo/119214297363517344.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -ofps 24 -vf harddup
Code:
ls - l /home/mmvideos/public_html/video/ristinamodel_balloons_2__2_.mpeg
ls -l /home/mmvideos/public_html/flvideo/119214297363517344.flv