Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled/Corrupted audio when using a modified version of play-from-disk #127

Open
e3ndr opened this issue Sep 16, 2022 · 0 comments
Open

Comments

@e3ndr
Copy link

e3ndr commented Sep 16, 2022

Your environment.

  • Version: v3.1.44
  • Browser: Chrome (105.0.5195.125)

What did you do? / What did you expect? / What happened?

I'm working on a screen sharing/voice chatting service and I've come across an issue when using a modified example of play-drom-disk. I'm trying to pipe in an OGG file and stream that to a receiver (here's the code) but the audio is garbled/corrupted.

garbled.mp4

For context, here's how the video is getting to the server:

  1. MediaRecorder records audio into a webm file (Opus, 510kbps, 48khz, 2 channel, 16bit).
  2. I grab a chunk every ~250ms and send that to my api via websocket (it's running on my local machine though).
  3. I then remux the data into a NUT container (for ease of data handling).

And here's how the media is getting to pion:

  1. I wait for the SDP to given to pion, since I need stdin for the OGG stream.
  2. I attach the output of the NUT feed to a OGG remuxer (here's the ffmpeg command I'm running).
  3. I dump the output of the OGG remuxer to a file.
  4. I pipe that output into the pion code via stdin.

Now the raw OGG does not exhibit the playback issues shown in the screen recording, leading me to believe that it's either a pion bug or, more likely, a bug in my code.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant