EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

Consider Opus FEC and PLC #444

Open ikonst opened 9 years ago

ikonst commented 9 years ago

A good way to experiment is:

gst-launch filesrc location=foo.wav ! wavparse ! audioresample ! \
  opusenc inband-fec=1 packet-loss-percentage=10 ! \
  identity drop-probability=0.1 ! \
  opusdec use-inband-fec=1 plc=1 ! \
  autoaudiosink

plc=1 definitely improves things, while package-loss-percentage > 0 just seems to make things worse, so this should be researched.

Also, see https://bugzilla.gnome.org/show_bug.cgi?id=744338. Before opusdec gains a way of knowing the actual maximum packet duration, the constant 120ms latency added by use-inband-fec=1 would make it inappropriate for RTC.

ikonst commented 9 years ago

@sdroege , you might have some input.

superdump commented 9 years ago

I'm not sure about signaling for in-band opus FEC. But fine for non-interoperable usage.

This draft is being discussed by IETF at the moment. https://tools.ietf.org/html/draft-ietf-payload-flexible-fec-scheme-00

ikonst commented 9 years ago

I'm not sure about signaling for in-band opus FEC.

FEC's presence is signaled by Opus headers, so it's naturally interoperable; i.e. if you start sending Opus in-band FEC while your decoder doesn't have use-inband-fec=0, nothing will break, and vice versa.

plc=1 is also not an interop risk.

The maximum packet duration corresponds to SDP's maxptime according to Oliver Crête, so this is already standardized.

ikonst commented 9 years ago

Anyway, I'd appreciate if somebody else will try, e.g.:

gst-launch-1.0 filesrc location=/Users/ilyak/music.wav ! wavparse ! audioresample ! \
  opusenc inband-fec=1 bitrate-type=0 bitrate=64000 packet-loss-percentage=25 ! \
  identity drop-probability=0.2 ! \
  opusdec use-inband-fec=1 plc=1 ! \
  autoaudiosink

and confirm or disprove my impression that Opus FEC doesn't really work.

Ideas, anyone?

ikonst commented 9 years ago

OK, actually read the source.