0

I am using flutter_webrtc package for streaming video from a camera. There is a requirement to implement a two way communication in which the user can speak through the mobile and the audio can be played from camera and vice versa. The camera only supports PCMU as codec. How to set PCMU codec using setCodecPreferences function?

Also, how can we set the samples per frame as 640 for PCMU?

5
  • 2
    Use the example code here github.com/flutter-webrtc/flutter-webrtc/blob/main/example/lib/… to filter the available list, selecting just the PCMU one (which you know will be available as it's mandatory). Commented Mar 19, 2024 at 17:29
  • How can we change the samples per frame to 640?
    – viki
    Commented Mar 19, 2024 at 17:59
  • I think currently the samples per frame is sending as 160
    – viki
    Commented Mar 20, 2024 at 4:21
  • PCMU is specified as 50 frames per second at a clockrate of 8khz which means 160 samples per frame. You might want to revisit your requirements as they don't make sense. Commented Mar 20, 2024 at 4:35
  • 1
    160 samples per frame = 20ms frames - which is standard for telephony. You are asking for 80ms frames which would cause too much delay for telephony, but might be OK for a camera. I don't know of any way to change it, but it might be possible. Commented Mar 20, 2024 at 12:43

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.