Closed Bug 1571586 Opened 7 months ago Closed 7 months ago

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

Categories

(Core :: WebRTC, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: alwu, Assigned: jhlin)

References

(Blocks 1 open bug)

Details

Attachments

(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 jolin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4f04f46d12fe
p1: cast bitrate to correct type and set it when initializing. r=jya
https://hg.mozilla.org/integration/autoland/rev/8dcd37f23927
p2: set realtime properties when initializing. r=jya
https://hg.mozilla.org/integration/autoland/rev/41013239c79c
p3: return proper error when initializating. r=jya
You need to log in before you can comment on or make changes to this bug.