but I cant control bitrate and resolution ( convert MKV HD movie 1280x720p > SD 720x576p) for my SD box player.
For downscaling, try
--vf resize:width=720,height=576,method=spline --sar 64:45Color matrix should probably also be converted to Rec.601 for accurate playback and you'd need AviSynth for that. One alternative is to flag the video Rec.709 (
--colorprim "bt709" --transfer "bt709" --colormatrix "bt709"), but many players simply assume Rec.601 for SD.
I want target video+audio bitrate 2Mbps
Why? CRF is good for you, really!
If you insist on deciding a bitrate yourself, it's quite simple:
x264 --preset slow --tune film --bitrate 1500 --pass 1 -o NUL input.xyz
x264 --preset slow --tune film --bitrate 1500 --pass 2 -o output.mkv input.xyz
and time encoding fast more 10f/s
If you resize to 576p, encoding will be twice as fast. You can also use faster presets:
--preset medium (which is also the default if you don't set a preset) or
--preset fastIf the problem is that x264 doesn't saturate the CPU fully (some cores have low load during encoding), you can either run multiple encodes at once or try to find the bottleneck. In your case this is probably not a problem unless you start using AviSynth and heavy filters.