[opus] inbandfec is adding samples

Marc Lindahl marc at bowery.com
Thu Jul 11 13:57:55 PDT 2013


I didn't expect this, is it normal?  When you use inbandfec, and have packet losses, you end up with more audio samples than you started with.

With short frame (2.5), the FEC isn't supposed to do anything but it shouldn't do that should it?  and 20mS frame, should do 'something' but… add audio?

I'm using opus_demo for this.

Here's the steps (I have my test audio in it's own folder, parallel with opus and sox):

make raw audio:

../sox-14.4.1/sox music_orig.wav -t raw music_orig.raw

try a few different encodings:

../opus-1.1-alpha/opus_demo audio 48000 2 128000 -framesize 2.5 -loss 10 -inbandfec music_orig.raw music_orig_f2.5_b128000_lr10_fec.raw 
../opus-1.1-alpha/opus_demo audio 48000 2 128000 -framesize 2.5 -loss 10  music_orig.raw music_orig_f2.5_b128000_lr10.raw
../opus-1.1-alpha/opus_demo audio 48000 2 128000 -framesize 20 -loss 10 -inbandfec music_orig.raw music_orig_f20_b128000_lr10_fec.raw 
../opus-1.1-alpha/opus_demo audio 48000 2 128000 -framesize 20 -loss 10  music_orig.raw music_orig_f20_b128000_lr10.raw

(note - sometimes you get 'error decoding frame: buffer too small' message…)

check file sizes:

ls -lsh music_orig* 
  34056 -rw-r--r--  1 mlindahl  staff    17M Jul 11 15:53 music_orig.raw
  34056 -rw-r--r--  1 mlindahl  staff    17M Sep  4  2012 music_orig.wav
  34048 -rw-r--r--  1 mlindahl  staff    17M Jul 11 15:59 music_orig_f2.5_b128000_lr10.raw
179408 -rw-r--r--  1 mlindahl  staff    88M Jul 11 15:57 music_orig_f2.5_b128000_lr10_fec.raw
  34048 -rw-r--r--  1 mlindahl  staff    17M Jul 11 16:49 music_orig_f20_b128000_lr10.raw
  49192 -rw-r--r--  1 mlindahl  staff    24M Jul 11 16:01 music_orig_f20_b128000_lr10_fec.raw


Notice the FEC files are significantly longer.  They also sound very odd, like frames are being repeated…

Im I doing something wrong or….?

Regards,
Marc


More information about the opus mailing list