Closed Bug 1571586 Opened 7 months ago Closed 7 months ago

The compressed size of encoded video from AppleVTEncoder is not as expected


(Core :: WebRTC, defect, P2)




Tracking Status
firefox70 --- fixed


(Reporter: alwu, Assigned: jhlin)


(Blocks 1 open bug)



(3 files)

When using an encoder to encode a video, we can set a targeted bit rate to tell encoder what the size of encoded video we would like to have, then the encoder would try to balance the whole size of video to make the average bit rate of the encoded frame similar as the bit rate we set.

However, when we use AppleVTEncoder to encode video, we found that the bit rate of the encoded video is really far from the one we expect.

Eg. we set the bit rate to 2M, but the result video's bit rate is only around 658K, which makes video quality very bad.

The parameter type of MediaDataEncoder::SetBitrate() is MediaDataEncoder::Rate/ uint32_t, but interpreted by AppleVTEncoder as a kCFNumberSInt64Type CFNumber.

Assignee: nobody → jolin

With minor code cleanup.

Depends on D41105

Pushed by
p1: cast bitrate to correct type and set it when initializing. r=jya
p2: set realtime properties when initializing. r=jya
p3: return proper error when initializating. r=jya
You need to log in before you can comment on or make changes to this bug.