I know there are similar questions around, but unfortunately didn't find answer to my question.
What I like to achieve is video camera originated videos compress as small as possible with as less as possible quality loss. And resize video from 1080p to 720p (720i).
So to get best result it is advisable to use 2 pass encoding. At this problem I have a problem. When I run 2nd pass I get error:


Code:
[libx264 @ 0xd9b8a0] constant rate-factor is incompatible with 2pass.
I have tried very different configurations, but unfortunately didn't find where is my mistake.
For example:

Code:
avconv -y -i 00000.MTS -qscale 3 -vcodec libx264 -preset medium -pass 1 -f mp4 /dev/null
avconv -y -i 00000.MTS -qscale 3 -vcodec libx264 -preset medium -pass 2 test.mp4
there is no resize or other tags, just to make it as simple as possible.
I'd be happy if someone could advise how to achieve my goal, or at least point to my mistake


Thanks!