Added participants, raw size, and playback size to video metadata
This commit is contained in:
parent
496a42ff90
commit
a239384c39
@ -67,6 +67,7 @@ events = Nokogiri::XML(File.open("#{raw_archive_dir}/events.xml"))
|
|||||||
initial_timestamp = BigBlueButton::Events.first_event_timestamp(events)
|
initial_timestamp = BigBlueButton::Events.first_event_timestamp(events)
|
||||||
final_timestamp = BigBlueButton::Events.last_event_timestamp(events)
|
final_timestamp = BigBlueButton::Events.last_event_timestamp(events)
|
||||||
duration = BigBlueButton::Events.get_recording_length(events)
|
duration = BigBlueButton::Events.get_recording_length(events)
|
||||||
|
participants = BigBlueButton::Events.get_num_participants(events)
|
||||||
metadata = events.at_xpath('/recording/metadata')
|
metadata = events.at_xpath('/recording/metadata')
|
||||||
|
|
||||||
logger.info 'Generating video events list'
|
logger.info 'Generating video events list'
|
||||||
@ -227,7 +228,7 @@ video_props['formats'].each_with_index do |format, i|
|
|||||||
end
|
end
|
||||||
|
|
||||||
logger.info('Generating closed captions')
|
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
|
raise 'Generating closed caption files failed' if ret != 0
|
||||||
|
|
||||||
captions = JSON.parse(File.read("#{process_dir}/captions.json"))
|
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.published('true')
|
||||||
xml.start_time(start_real_time)
|
xml.start_time(start_real_time)
|
||||||
xml.end_time(start_real_time + final_timestamp - initial_timestamp)
|
xml.end_time(start_real_time + final_timestamp - initial_timestamp)
|
||||||
|
xml.participants(participants)
|
||||||
xml.playback do
|
xml.playback do
|
||||||
xml.format('video')
|
xml.format('video')
|
||||||
xml.link("#{props['playback_protocol']}://#{props['playback_host']}/playback/video/#{meeting_id}/")
|
xml.link("#{props['playback_protocol']}://#{props['playback_host']}/playback/video/#{meeting_id}/")
|
||||||
|
@ -40,6 +40,7 @@ end
|
|||||||
props = YAML.safe_load(File.open(File.expand_path('../bigbluebutton.yml', __dir__)))
|
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__)))
|
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}"
|
process_dir = "#{props['recording_dir']}/process/video/#{meeting_id}"
|
||||||
publish_dir = "#{video_props['publish_dir']}/#{meeting_id}"
|
publish_dir = "#{video_props['publish_dir']}/#{meeting_id}"
|
||||||
process_donefile = "#{props['recording_dir']}/status/processed/#{meeting_id}-video.done"
|
process_donefile = "#{props['recording_dir']}/status/processed/#{meeting_id}-video.done"
|
||||||
@ -81,6 +82,12 @@ end
|
|||||||
# Copy over metadata xml file
|
# Copy over metadata xml file
|
||||||
FileUtils.cp("#{process_dir}/metadata.xml", "#{publish_dir}/metadata.xml")
|
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
|
# Copy over css and js support files
|
||||||
FileUtils.cp_r("#{process_dir}/css", publish_dir)
|
FileUtils.cp_r("#{process_dir}/css", publish_dir)
|
||||||
FileUtils.cp_r("#{process_dir}/js", publish_dir)
|
FileUtils.cp_r("#{process_dir}/js", publish_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user