+ private void constructCodecParamsString(final EncodingOptions options,
+ final int videoBitrate, final int audioBitrate,
+ final StringBuffer codecParams, final String videoCodec,
+ final String audioCodec) {
+
+ codecParams.append("-acodec " + audioCodec + " -vcodec " + videoCodec
+ + " ");
+
+ if (videoBitrate != -1)
+ codecParams.append("-b " + videoBitrate + "k ");
+
+ if (audioBitrate != -1)
+ codecParams.append("-b:a " + audioBitrate + "k ");
+
+ if (options.deinterlace)
+ codecParams.append("-filter:v yadif ");
+ }
+