Skip to content
Snippets Groups Projects
Commit 0559152d authored by Calvin Walton's avatar Calvin Walton
Browse files

Improvements for audio desync issues

This incorporates only the audio desync related changes from #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
parent 2a6b0b62
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ module BigBlueButton
module EDL
module Audio
FFMPEG_AEVALSRC = "aevalsrc=s=48000:c=stereo:exprs=0|0"
FFMPEG_AFORMAT = "aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo"
FFMPEG_AFORMAT = "aresample=async=1000,aformat=sample_fmts=s16:sample_rates=48000:channel_layouts=stereo"
FFMPEG_WF_CODEC = 'libvorbis'
FFMPEG_WF_ARGS = ['-c:a', FFMPEG_WF_CODEC, '-q:a', '2', '-f', 'ogg']
WF_EXT = 'ogg'
......@@ -145,6 +145,10 @@ module BigBlueButton
if audioinfo[input[:filename]][:format][:format_name] == 'wav'
ffmpeg_cmd += ['-ignore_length', '1']
end
# Prefer using the libopus decoder for opus files, it handles discontinuities better
if audioinfo[input[:filename]][:audio][:codec_name] == 'opus'
ffmpeg_cmd << '-c:a' << 'libopus'
end
ffmpeg_cmd += ['-i', input[:filename]]
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment