diff --git a/record-and-playback/video/scripts/process/video.rb b/record-and-playback/video/scripts/process/video.rb index 1d8fc1f236..3e6090c1e7 100755 --- a/record-and-playback/video/scripts/process/video.rb +++ b/record-and-playback/video/scripts/process/video.rb @@ -67,6 +67,7 @@ events = Nokogiri::XML(File.open("#{raw_archive_dir}/events.xml")) initial_timestamp = BigBlueButton::Events.first_event_timestamp(events) final_timestamp = BigBlueButton::Events.last_event_timestamp(events) duration = BigBlueButton::Events.get_recording_length(events) +participants = BigBlueButton::Events.get_num_participants(events) metadata = events.at_xpath('/recording/metadata') logger.info 'Generating video events list' @@ -227,7 +228,7 @@ video_props['formats'].each_with_index do |format, i| end logger.info('Generating closed captions') -ret = BigBlueButton.exec_ret('utils/gen_webvtt', '-i', raw_archive_dir, '-o', process_dir) +ret = BigBlueButton.exec_ret('/home/bigbluebutton/src/record-and-playback/core/scripts/utils/gen_webvtt', '-i', raw_archive_dir, '-o', process_dir) raise 'Generating closed caption files failed' if ret != 0 captions = JSON.parse(File.read("#{process_dir}/captions.json")) @@ -281,6 +282,7 @@ metadata_xml = Nokogiri::XML::Builder.new do |xml| xml.published('true') xml.start_time(start_real_time) xml.end_time(start_real_time + final_timestamp - initial_timestamp) + xml.participants(participants) xml.playback do xml.format('video') xml.link("#{props['playback_protocol']}://#{props['playback_host']}/playback/video/#{meeting_id}/") diff --git a/record-and-playback/video/scripts/publish/video.rb b/record-and-playback/video/scripts/publish/video.rb index b2ee0b7237..d1a6de3aa6 100755 --- a/record-and-playback/video/scripts/publish/video.rb +++ b/record-and-playback/video/scripts/publish/video.rb @@ -40,6 +40,7 @@ end props = YAML.safe_load(File.open(File.expand_path('../bigbluebutton.yml', __dir__))) video_props = YAML.safe_load(File.open(File.expand_path('../video.yml', __dir__))) +recording_dir = props['recording_dir'] process_dir = "#{props['recording_dir']}/process/video/#{meeting_id}" publish_dir = "#{video_props['publish_dir']}/#{meeting_id}" process_donefile = "#{props['recording_dir']}/status/processed/#{meeting_id}-video.done" @@ -81,6 +82,12 @@ end # Copy over metadata xml file FileUtils.cp("#{process_dir}/metadata.xml", "#{publish_dir}/metadata.xml") +# Get raw size of presentation files +raw_dir = "#{recording_dir}/raw/#{meeting_id}" +# After all the processing we'll add the published format and raw sizes to the metadata file +BigBlueButton.add_raw_size_to_metadata(publish_dir, raw_dir) +BigBlueButton.add_playback_size_to_metadata(publish_dir) + # Copy over css and js support files FileUtils.cp_r("#{process_dir}/css", publish_dir) FileUtils.cp_r("#{process_dir}/js", publish_dir)