
transform.transform(AWTUtil.fromBufferedImageRGB(rgb), yuv);
</BUG>
ByteBuffer buf = ByteBuffer.allocate(rgb.getWidth() * rgb.getHeight() * 3);
<BUG>encoder.encodeFrame(yuv, buf);
</BUG>
videoTrack.addFrame(
MP4Packet.createMP4Packet(buf, i * 1001, 24000, 1001, i, true, null, 0, i * 1001, 0));
}
if (i == 1) {

if (videoTrack == null) {
videoTrack = muxer.addVideoTrack(profile.fourcc, new Size(rgb.getWidth(), rgb.getHeight()),
APPLE_PRO_RES_422, 24000);
videoTrack.setTgtChunkDuration(HALF, SEC);
}
Picture8Bit yuv = Picture8Bit.create(rgb.getWidth(), rgb.getHeight(), ColorSpace.YUV422);
transform.transform(AWTUtil.fromBufferedImageRGB8Bit(rgb), yuv);
ByteBuffer buf = ByteBuffer.allocate(rgb.getWidth() * rgb.getHeight() * 3);
encoder.encodeFrame8Bit(yuv, buf);
videoTrack.addFrame(
MP4Packet.createMP4Packet(buf, i * 1001, 24000, 1001, i, true, null, 0, i * 1001, 0));
}
if (i == 1) {
