Skip to content

Commit

Permalink
Merge pull request bigbluebutton#7624 from ffdixon/revert-cc-recording
Browse files Browse the repository at this point in the history
BigBlueButton 2.2-beta-10 introduced a regression in processing recordings with closed captions. This reverts the changes to the presentation recording format so recordings will process again.

Bumping the version to 2.2-beta-11 so we can release.
  • Loading branch information
kepstin authored Jun 14, 2019
2 parents bf2e222 + 6d0f778 commit 65371da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 38 deletions.
2 changes: 1 addition & 1 deletion bigbluebutton-config/bigbluebutton-release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BIGBLUEBUTTON_RELEASE=2.2.0-beta-10
BIGBLUEBUTTON_RELEASE=2.2.0-beta-11
23 changes: 4 additions & 19 deletions record-and-playback/presentation/scripts/process/presentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
raw_archive_dir = "#{recording_dir}/raw/#{meeting_id}"
log_dir = props['log_dir']

BigBlueButton.logger.info("setting captions dir")
captions_dir = props['captions_dir']
captions_meeting_dir = "#{captions_dir}/#{meeting_id}"

target_dir = "#{recording_dir}/process/presentation/#{meeting_id}"
if not FileTest.directory?(target_dir)
FileUtils.mkdir_p "#{log_dir}/presentation"
Expand Down Expand Up @@ -202,22 +198,11 @@
FileUtils.cp_r("#{pres_dir}/thumbnails", "#{target_pres_dir}/thumbnails")
end

BigBlueButton.logger.info("Copying closed captions")

captions = JSON.load(File.new("#{captions_meeting_dir}/captions.json"))
captions_json = []
captions.each do |track|
caption = {}
caption[:localeName] = track['label']
caption[:locale] = track['lang']
captions_json << caption
FileUtils.cp("#{captions_meeting_dir}/caption_" + track['lang'] + ".vtt", target_dir)
BigBlueButton.logger.info("Generating closed captions")
ret = BigBlueButton.exec_ret('utils/gen_webvtt', '-i', raw_archive_dir, '-o', target_dir)
if ret != 0
raise "Generating closed caption files failed"
end

File.open("#{target_dir}/captions.json", "w") do |f|
f.write(captions_json.to_json)
end

captions = JSON.load(File.new("#{target_dir}/captions.json", 'r'))

if not presentation_text.empty?
Expand Down
18 changes: 0 additions & 18 deletions record-and-playback/presentation/scripts/publish/presentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1185,9 +1185,6 @@ def processDeskshareEvents(events)
$process_dir = "#{recording_dir}/process/presentation/#{$meeting_id}"
BigBlueButton.logger.info("setting publish dir")
publish_dir = $presentation_props['publish_dir']
BigBlueButton.logger.info("setting captions dir")
captions_dir = bbb_props['captions_dir']
captions_meeting_dir = "#{captions_dir}/#{$meeting_id}"
BigBlueButton.logger.info("setting playback url info")
playback_protocol = bbb_props['playback_protocol']
playback_host = bbb_props['playback_host']
Expand Down Expand Up @@ -1228,21 +1225,6 @@ def processDeskshareEvents(events)
BigBlueButton.logger.info("Copied audio.ogg file")
end

BigBlueButton.logger.info("Copying caption files to #{target_dir}")
captions = JSON.load(File.new("#{captions_meeting_dir}/captions.json"))
captions_json = []
captions.each do |track|
caption = {}
caption[:localeName] = track['label']
caption[:locale] = track['lang']
captions_json << caption
FileUtils.cp("#{captions_meeting_dir}/caption_" + track['lang'] + ".vtt", target_dir)
end

File.open("#{target_dir}/captions.json", "w") do |f|
f.write(captions_json.to_json)
end

if File.exist?("#{$process_dir}/captions.json")
BigBlueButton.logger.info("Copying caption files")
FileUtils.cp("#{$process_dir}/captions.json", package_dir)
Expand Down

0 comments on commit 65371da

Please sign in to comment.