[opus] How to change codec frame_size at runtime

minhbq at viettel.com.vn minhbq at viettel.com.vn
Wed Apr 25 10:42:09 UTC 2018

Hi all, 
Please guide me How to change frame_size of opus codec at run-time (20ms, 40ms, 60ms) 
I'm stucking in this case: 
1. init codec width default config (frame_size =20ms, bandwidth=48KHz, bitrate = 48kbps...), then in runtime changing: 
- bitrate = 24, 16, 6kbps: sound is OK 
- frame_size = 40ms, 60ms: Not OK, sound is distort so bad 
2. init codec with frame_size = 40ms , others is default, then in runtime changing: 
- bitrate = 6kbps: OK 
- bitrate = 24, 48kbps: Not OK 

I'm using opus_encoder_ctl api: 

opus_encoder_ctl(opus_data->enc, OPUS_SET_BITRATE(avg_bps)); 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20180425/8a23b2c7/attachment.html>

More information about the opus mailing list