bigbluebutton-Github/record-and-playback
Calvin Walton d402f519c6 fix(recording): Deskshare audio processing hang
This is a refinement of the fix introduced in 3c1a9cd7c4.

Further investigation of the issue reveals that the cause of the bad
timestamps which result in error messages or hang is when the `apad`
filter does not receive any input audio frames. This happens if the
seekpoint is after the end of audio. The existing seekpoint checks can't
cover this, because in a deskshare file the video stream can continue on
after the audio stream ends.

The `,asetpts=N` filter was added to deal with this problem, and it
works in most cases. But there is a case where it fails - when the
"mismatched length" audio stretching to work around broken recordings
from BigBlueButton 0.81/0.90 kicks in.

The issue there is that the `atrim=start=S` filter (used due to the
difficulty of calculating seeks when stretching) hits the invalid
timestamps and hangs.

I'm working around this issue with a "defense in depth" combination of
two changes:

* Move the `,asetpts=N` filter to be applied before the audio stretch
  filters. This fixes the processing hang.
* Adjust the conditions on the "mismatched length" audio stretching so
  that it only gets applied on audio files likely to be from extremely
  old BigBlueButton versions - those with audio in wav files, or encoded
  to vorbis.

BigBlueButton has been using audio recorded directly to opus by
FreeSWITCH for quite a while, and the handling for gaps or lost packets
is done in current BBB versions by a combination of the libopus decoder
and the use of ffmpeg's `aresample=async=1000` filter to dynamically
stretch, squish, or fill in audio so it becomes a continuous stream
that's locked to the file timestamps. Applying the "mismatched length"
processing on top of that is probably making audio sync issues worse.
2023-10-03 14:21:50 -04:00
..
core fix(recording): Deskshare audio processing hang 2023-10-03 14:21:50 -04:00
notes/scripts refactor(record-and-playback): replace trollop by optimist 2021-11-23 23:59:59 -03:00
podcast/scripts refactor(record-and-playback): replace trollop by optimist 2021-11-23 23:59:59 -03:00
presentation fix(recording): missing cursor 2023-05-25 15:31:45 +00:00
screenshare [issue-9789] - Changes in review. 2022-05-02 09:42:00 -03:00
slides Delete the 'slides' processing scripts 2014-11-13 11:15:43 -02:00
video recording/video: Fix typo in area layout 2023-03-23 13:44:37 -04:00
.rubocop.yml Style changes; enable NewCops in Rubocop 2022-01-20 13:57:53 +01:00
changelog.md
deploy.sh [issue-17504] - changes in review 2023-05-11 10:05:37 -03:00
pyproject.toml presentation recording: generate poll svg images without gnuplot 2020-01-13 14:34:30 -05:00