sudo apt-get install mencoder
mencoder VideoS2.mp4 -vf scale=640:480 -ovc lavc -o VideoS2-small.mp4
OR
sudo apt-get install ffmpeg
ffmpeg -i videoS1.mp4 -r 30 -s 960x540 videoS1_test.mp4
OR
sudo apt-get install libav-tools
avconv -i input.mp4 -s 640x480 output.mp4
GUI
If you d rather work with a graphical interface you can download the following programs:
AVIDEMUX, which can resize and lower the size which helps in cases where the objective is to lower size. avidemux
HANDBREAK - Excellent tool for converting videos and optimizing size. I use it a lot when going from ogg to mp4 with h.264. Lowers A LOT the size. handbreak
OPENSHOT & PITIVI - Both are good video editors tha can help lower size when rendering the video. openshot and pitivi
VLC
Source: http://askubuntu.com/questions/160869/need-to-downsample-video-to-a-lower-resolution
Zoe