I tried it with FFmpeg version 0.8.5, using an AVI input file just like you.
The following command produced correct results:
ffmpeg -i 1.avi -ss 00:00:05 -t 00:00:01.50 -vcodec libx264 -vpre default -acodec libfaac out1.mp4
Here are some tips to get it working:
Update to the latest version of FFmpeg.
For Ubuntu, follow the tutorials here. I've been using them myself.
On OS X, install FFmpeg using Homebrew, by calling
brew install ffmpeg.
On Windows, just download the precompiled versions.
Use the correct length format.
Note that the duration format is using decimal points, not commas, e.g.
-threads 0 option.
-threads 0 however gave me the error "nal buffer is too small". I don't even know why they allow a value of zero here, and unless you have a specific reason to do so, I would just leave this argument out. Ideally, it should enable
libx264, but there might be a bug I'm not aware of.
Encode without B-pictures.
Depending on the size of the output video, I don't know if
libx264 is even able to reliably produce output using B-pictures that reference one or more intra-coded pictures. This might even lead to the artifacts you describe.
You can try to disable B-pictures (or "B-frames") with