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

Recording: Audio processing changes to reduce audio desync #11683

Merged
merged 2 commits into from Mar 18, 2021

Conversation

kepstin
Copy link
Contributor

@kepstin kepstin commented Mar 18, 2021

This PR incorporates two changes related to audio sync issues:

  1. An improvement to the way the ffmpeg filter chain is generated such that the cut points of the audio segments in the recording are calculated absolutely from the start of the meeting, instead of relative to the previous segment. This prevents accumulation of rounding errors from affecting audio synchronization. (That said, the way video is cut can still accumulate errors!)
  2. Incorporate the audio sync fixes from screenshare: add rap processing for screen streams with audio (complements #11622) #11626 - add the aresample filter with the async option to fill in timestamp gaps in the source audio, and prefer using the libopus decoder on opus input files. These changes were completely independent of the screenshare audio feature, and should be applied to all audio streams.

This gives the following advantages over the previous code:

* The ffmpeg input filters are loaded from a filter "script" file instead
  of passed on the command line. This fixes some cases of recordings
  failing to process because the ffmpeg command line generated for the
  audio processing exceeded the max command line length limit. (Although
  that only really happens due to BBB bugs...)
* Use absolute positions when trimming audio segments for cuts.
  Previously segments were trimmed to the length of the segment, and the
  results were concatenated. There's some possibility of accumulated
  errors in the segment lengths causing audio desync over time. The new
  code incrementally concatenates the segments, and cuts each segment
  end based on the absolute time since the start of the meeting, to
  avoid error accumulation.
This incorporates only the audio desync related changes from bigbluebutton#11626
* Add the aresample filter with async option to fill in timestamp gaps
* Use the libopus decoder for opus audio instead of ffmpeg's builtin
  decoder
@ffdixon ffdixon merged commit 8ccece2 into bigbluebutton:develop Mar 18, 2021
@flowerpower
Copy link

Have you implemented this solution also on 2.2.x releases? I have desync problems between audio and video on recordings with BBB 2.2.31

@ffdixon
Copy link
Member

ffdixon commented Apr 27, 2021

This won't be back ported. Ubuntu 16.04 (which is the basis for 2.2.x) is nearing end of life and the project is moving to 18.04 which is the basis for BigBlueButton 2.3.

@flowerpower
Copy link

But you have release BBB 2.2.36 only 26 days ago! If I upgrade my BBB cluster from 2.2.31 to 2.2.36 I will solve my desync problem on recordings? It's not possible a new versione 2.2.37 also with this desync fix? A lot of university use BBB 2.2.x and have this problem with lessons recordings and students and professors aren't happy

@hostbbb
Copy link
Contributor

hostbbb commented Apr 27, 2021

@flowerpower I suggest building a 2.3 server, take the raw archives from a "bad" out of sync recording. And process it with bbb record --rebuild to see if there is improvement. 2.3 RAP processing, is faster and can do many recordings in parallel.. if you are a large university getting all your recording processed in a separate pipeline could get you recordings quicker and allow bbb server to focus on meetings

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

Successfully merging this pull request may close these issues.

None yet

4 participants