Distorted vlc playback with x264 encoded file
===

I have captured raw video in rgb format from my webcam using ffmpeg:
ffmpeg -f video4linux2 -s 320x240 -r 10 -i /dev/video0 -f rawvideo -pix-fmt rgb24 -r10 webcam.rgb24

This raw video file plays ok in mplayer.

I encode this file using x264:
x264 --input-res 320x240 --demuxer raw --input-fmt rgb24  --fps 10 -o webcam.mkv webcam.rgb24

However when I try to play webcam.mkv with vlc it is an interlaced, distorted image.

I don't know what I am doing wrong.  
