You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add an option to choose which Recordings to be exported as mp4.
The idea is to read "events.xml" file,check its origin eg. Greenlight, Moodle1, Moodle2, Wordpress1 etc and export mp4 for all the origins except ones from "Greenlight". Please advise.
opts = Optimist.options do
opt :meeting_id, 'Meeting id to archive', type: String
opt :format, 'Playback format name', type: String
opt :log_stdout, 'Log to STDOUT', type: :flag
end
#####BEGIN OF CHECK XXXXXXXX#####
meeting_metadata = BigBlueButton::Events.get_meeting_metadata("/var/bigbluebutton/recording/raw/#{meeting_id}/events.xml")
File.open("/var/bigbluebutton/recording/raw/#{meeting_id}/events.xml") do |f|
f.each_line do |line|
if line =~ /greenlight/
exit(0)
end
#####END OF CHECK XXXXXXXX#####
REST OF THE CODE
The text was updated successfully, but these errors were encountered:
look a few lines below. you can get the origin without looping thru the raw events.
look for origin in metadata
meeting_name = metadata.xpath('recording/meta/meetingName').inner_text
example of getting the name, just need to modify and get the bb-origin-server
For anyone is interested to execute @danielpetri1 script for specific recordings only (based on server origin) add the following code in presentation.rb below [exit(0) if playback != 'presentation']
I am trying to add an option to choose which Recordings to be exported as mp4.
The idea is to read "events.xml" file,check its origin eg. Greenlight, Moodle1, Moodle2, Wordpress1 etc and export mp4 for all the origins except ones from "Greenlight". Please advise.
My Edits at "presentation.rb" :
require File.expand_path('../../../lib/recordandplayback', FILE)
require File.expand_path('../../../lib/recordandplayback/interval_tree', FILE)
include IntervalTree
opts = Optimist.options do
opt :meeting_id, 'Meeting id to archive', type: String
opt :format, 'Playback format name', type: String
opt :log_stdout, 'Log to STDOUT', type: :flag
end
meeting_id = opts[:meeting_id]
playback = opts[:format]
exit(0) if playback != 'presentation'
#####BEGIN OF CHECK XXXXXXXX#####
meeting_metadata = BigBlueButton::Events.get_meeting_metadata("/var/bigbluebutton/recording/raw/#{meeting_id}/events.xml")
File.open("/var/bigbluebutton/recording/raw/#{meeting_id}/events.xml") do |f|
f.each_line do |line|
if line =~ /greenlight/
exit(0)
end
#####END OF CHECK XXXXXXXX#####
REST OF THE CODE
The text was updated successfully, but these errors were encountered: