fix bitrate setting and add bitrate validation
Merge pull request #817 from ruil2/enc_bitrate

    fix bitrate setting and add bitrate validation