diff --git a/record-and-playback/rap/lib/recordandplayback/generators/matterhorn_processor.rb b/record-and-playback/rap/lib/recordandplayback/generators/matterhorn_processor.rb index 13a2257198..fa56f5a474 100755 --- a/record-and-playback/rap/lib/recordandplayback/generators/matterhorn_processor.rb +++ b/record-and-playback/rap/lib/recordandplayback/generators/matterhorn_processor.rb @@ -56,9 +56,8 @@ module BigBlueButton Process.wait() end - def self.create_manifest_xml(audio, video, deskshare, manifest) - vpresenter = FFMPEG::Movie.new(video) - apresenter = FFMPEG::Movie.new(audio) + def self.create_manifest_xml(webcam, deskshare, manifest) + vpresenter = FFMPEG::Movie.new(webcam) vpresentation = FFMPEG::Movie.new(deskshare) puts "Creating manifest.xml ..." @@ -101,20 +100,6 @@ module BigBlueButton xml.resolution(vpresentation.width.to_s + "x" + vpresentation.height.to_s) } } - - xml.track("id" => "track-3", "type" => "presenter/source") { - xml.mimetype("application/ogg") - xml.tags - # Remove path and just have audio.ogg - xml.url(apresenter.path.sub(/.+\//, "")) - xml.checksum(Digest::MD5.hexdigest(File.read(apresenter.path)),"type" => "md5") - xml.duration(apresenter.duration.round.to_s.split(".")[0] + "000") - xml.audio("id" => "audio1") { - xml.encoder("type" => apresenter.audio_codec) - xml.channels(apresenter.audio_channels) - xml.bitrate(apresenter.bitrate.to_s + "000") - } - } } xml.metadata { @@ -169,9 +154,9 @@ module BigBlueButton aFile.close end - def self.zip_artifacts(audio, video, deskshare, dublincore, manifest, zipped_file) - puts "Zipping package... #{zipped_file} #{audio} #{video} #{deskshare} #{dublincore} #{manifest}" - files = [audio, video, deskshare, dublincore, manifest] + def self.zip_artifacts(webcam, deskshare, dublincore, manifest, zipped_file) + puts "Zipping package... #{zipped_file} #{webcam} #{deskshare} #{dublincore} #{manifest}" + files = [webcam, deskshare, dublincore, manifest] Zip::ZipFile.open(zipped_file, Zip::ZipFile::CREATE) do |zipfile| files.each { |f| puts f diff --git a/record-and-playback/rap/scripts/archive/master.rb b/record-and-playback/rap/scripts/archive/master.rb index aec26fec79..2e49d469f1 100755 --- a/record-and-playback/rap/scripts/archive/master.rb +++ b/record-and-playback/rap/scripts/archive/master.rb @@ -11,17 +11,17 @@ end meeting_id = opts[:meeting_id] -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) +# This script lives in scripts/archive/steps while bigbluebutton.yml lives in scripts/ +props = YAML::load(File.open('bigbluebutton.yml')) -audio_dir = props['audio_dir'] +audio_dir = props['raw_audio_src'] recording_dir = props['recording_dir'] raw_archive_dir = "#{recording_dir}/raw" -deskshare_dir = props['deskshare_dir'] +deskshare_dir = props['raw_deskshare_src'] redis_host = props['redis_host'] redis_port = props['redis_port'] -presentation_dir = props['presentation_dir'] -video_dir = props['video_dir'] +presentation_dir = props['raw_presentation_src'] +video_dir = props['raw_video_src'] # TODO: # 1. Check if meeting-id has corresponding dir in /var/bigbluebutton/archive diff --git a/record-and-playback/rap/scripts/archive/steps/archive-audio.rb b/record-and-playback/rap/scripts/archive/steps/archive-audio.rb deleted file mode 100755 index 0049bf045d..0000000000 --- a/record-and-playback/rap/scripts/archive/steps/archive-audio.rb +++ /dev/null @@ -1,18 +0,0 @@ -require '../lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String -end - -meeting_id = opts[:meeting_id] - -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -audio_dir = props['audio_dir'] -archive_dir = props['archive_dir'] - -BigBlueButton::AudioArchiver.archive(meeting_id, audio_dir, archive_dir) diff --git a/record-and-playback/rap/scripts/archive/steps/archive-deskshare.rb b/record-and-playback/rap/scripts/archive/steps/archive-deskshare.rb deleted file mode 100755 index c1776303c0..0000000000 --- a/record-and-playback/rap/scripts/archive/steps/archive-deskshare.rb +++ /dev/null @@ -1,18 +0,0 @@ -require '../lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String -end - -meeting_id = opts[:meeting_id] - -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -deskshare_dir = props['deskshare_dir'] -archive_dir = props['archive_dir'] - -BigBlueButton::DeskshareArchiver.archive(meeting_id, deskshare_dir, archive_dir) \ No newline at end of file diff --git a/record-and-playback/rap/scripts/archive/steps/archive-events.rb b/record-and-playback/rap/scripts/archive/steps/archive-events.rb deleted file mode 100755 index 5f160808cb..0000000000 --- a/record-and-playback/rap/scripts/archive/steps/archive-events.rb +++ /dev/null @@ -1,21 +0,0 @@ -require '../lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String -end - -meeting_id = opts[:meeting_id] - -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -redis_host = props['redis_host'] -redis_port = props['redis_port'] -archive_dir = props['archive_dir'] - -redis = BigBlueButton::RedisWrapper.new(redis_host, redis_port) -events_archiver = BigBlueButton::RedisEventsArchiver.new redis -events_archiver.save_events_to_file("#{archive_dir}/#{meeting_id}", events_archiver.store_events(meeting_id)) diff --git a/record-and-playback/rap/scripts/archive/steps/archive-presentation.rb b/record-and-playback/rap/scripts/archive/steps/archive-presentation.rb deleted file mode 100755 index b0d9850ac2..0000000000 --- a/record-and-playback/rap/scripts/archive/steps/archive-presentation.rb +++ /dev/null @@ -1,19 +0,0 @@ -require '../lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String -end - -meeting_id = opts[:meeting_id] - -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -presentation_dir = props['presentation_dir'] -archive_dir = props['archive_dir'] - -from_dir = "#{presentation_dir}/#{meeting_id}/#{meeting_id}" -BigBlueButton::PresentationArchiver.archive(meeting_id, from_dir, archive_dir) diff --git a/record-and-playback/rap/scripts/archive/steps/archive-video.rb b/record-and-playback/rap/scripts/archive/steps/archive-video.rb deleted file mode 100755 index d283429177..0000000000 --- a/record-and-playback/rap/scripts/archive/steps/archive-video.rb +++ /dev/null @@ -1,19 +0,0 @@ -require '../lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String -end - -meeting_id = opts[:meeting_id] - -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -video_dir = props['video_dir'] -archive_dir = props['archive_dir'] - -from_dir = "#{video_dir}/#{meeting_id}" -BigBlueButton::VideoArchiver.archive(meeting_id, from_dir, archive_dir) diff --git a/record-and-playback/rap/scripts/bigbluebutton.yml b/record-and-playback/rap/scripts/bigbluebutton.yml new file mode 100755 index 0000000000..ebf9f75d08 --- /dev/null +++ b/record-and-playback/rap/scripts/bigbluebutton.yml @@ -0,0 +1,9 @@ +recording_dir: /var/bigbluebutton/recording +raw_audio_src: /var/freeswitch/meetings +raw_video_src: /usr/share/red5/webapps/video/streams +raw_deskshare_src: /var/bigbluebutton/deskshare +raw_presentation_src: /var/bigbluebutton +redis_host: 192.168.0.166 +redis_port: 6379 + + diff --git a/record-and-playback/rap/scripts/matterhorn.yml b/record-and-playback/rap/scripts/matterhorn.yml new file mode 100755 index 0000000000..39367bae6a --- /dev/null +++ b/record-and-playback/rap/scripts/matterhorn.yml @@ -0,0 +1,3 @@ +matterhorn_server: root@ec2-50-16-8-19.compute-1.amazonaws.com +matterhorn_inbox: /opt/matterhorn/felix/inbox/ +matterhorn_key: /home/firstuser/.ssh/matt_id_rsa diff --git a/record-and-playback/rap/scripts/process/master.rb b/record-and-playback/rap/scripts/process/master.rb deleted file mode 100644 index 3d313b447e..0000000000 --- a/record-and-playback/rap/scripts/process/master.rb +++ /dev/null @@ -1,11 +0,0 @@ - -# -puts "pwd = #{Dir.pwd}" -Dir.glob("#{Dir.pwd}/steps/*.rb").sort.each do |file| - puts file - IO.popen("ruby #{file}") do |output| - output.each do |line| - puts line - end - end -end diff --git a/record-and-playback/rap/scripts/process/matterhorn.rb b/record-and-playback/rap/scripts/process/matterhorn.rb index 3048e27e82..e70242b2ac 100755 --- a/record-and-playback/rap/scripts/process/matterhorn.rb +++ b/record-and-playback/rap/scripts/process/matterhorn.rb @@ -9,8 +9,8 @@ end meeting_id = opts[:meeting_id] -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) +# This script lives in scripts/archive/steps while bigbluebutton.yml lives in scripts/ +props = YAML::load(File.open('bigbluebutton.yml')) recording_dir = props['recording_dir'] raw_archive_dir = "#{recording_dir}/raw/#{meeting_id}" diff --git a/record-and-playback/rap/scripts/process/steps/matterhorn/process-audio.rb b/record-and-playback/rap/scripts/process/steps/matterhorn/process-audio.rb deleted file mode 100755 index 5659d0711f..0000000000 --- a/record-and-playback/rap/scripts/process/steps/matterhorn/process-audio.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String - opt :config, "Ping all the sites" -end - -meeting_id = opts[:meeting_id] -props = YAML::load(File.open('properties.yaml')) - -archive_dir = props['archive_dir'] - -audio_dir = "#{archive_dir}/audio" -FileUtils.cp_r("#{archive_dir}/audio", matterhorn_dir) -wav_file = "#{matterhorn_dir}/audio/*.wav" -ogg_file = "#{matterhorn_dir}/audio.ogg" -proc = IO.popen("oggenc -Q --resample 44100 -o #{ogg_file} #{wav_file} 2>&1", "w+") -Process.wait() - \ No newline at end of file diff --git a/record-and-playback/rap/scripts/process/steps/matterhorn/process-deskshare.rb b/record-and-playback/rap/scripts/process/steps/matterhorn/process-deskshare.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/process/steps/matterhorn/process-events.rb b/record-and-playback/rap/scripts/process/steps/matterhorn/process-events.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/process/steps/matterhorn/process-presentations.rb b/record-and-playback/rap/scripts/process/steps/matterhorn/process-presentations.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/process/steps/matterhorn/process-video.rb b/record-and-playback/rap/scripts/process/steps/matterhorn/process-video.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/process/steps/simple/process-audio.rb b/record-and-playback/rap/scripts/process/steps/simple/process-audio.rb deleted file mode 100755 index e8ae2b30b3..0000000000 --- a/record-and-playback/rap/scripts/process/steps/simple/process-audio.rb +++ /dev/null @@ -1,18 +0,0 @@ -require '../lib/recordandplayback' -require 'rubygems' -require 'trollop' -require 'yaml' - -opts = Trollop::options do - opt :meeting_id, "Meeting id to archive", :default => '58f4a6b3-cd07-444d-8564-59116cb53974', :type => String -end - -meeting_id = opts[:meeting_id] - -# This script lives in scripts/archive/steps while properties.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -audio_dir = props['audio_dir'] -archive_dir = props['archive_dir'] - -BigBlueButton::AudioProcessor.process(meeting_id, audio_dir, archive_dir) \ No newline at end of file diff --git a/record-and-playback/rap/scripts/process/steps/simple/process-events.rb b/record-and-playback/rap/scripts/process/steps/simple/process-events.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/process/steps/simple/process-presentations.rb b/record-and-playback/rap/scripts/process/steps/simple/process-presentations.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/properties.yaml b/record-and-playback/rap/scripts/properties.yaml deleted file mode 100755 index 19d8df346b..0000000000 --- a/record-and-playback/rap/scripts/properties.yaml +++ /dev/null @@ -1,14 +0,0 @@ -recording_dir: /var/bigbluebutton/recording -scripts_home: /home/firstuser/python/src -audio_dir: /var/freeswitch/meetings -video_dir: /usr/share/red5/webapps/video/streams -deskshare_dir: /var/bigbluebutton/deskshare -presentation_dir: /var/bigbluebutton -redis_host: 192.168.0.166 -redis_port: 6379 -publish_dir: /var/bigbluebutton/recordings -playback_host: 192.168.0.166 -matterhorn_server: root@ec2-50-16-8-19.compute-1.amazonaws.com -matterhorn_inbox: /opt/matterhorn/felix/inbox/ -matterhorn_key: /home/firstuser/.ssh/matt_id_rsa - diff --git a/record-and-playback/rap/scripts/publish/master.rb b/record-and-playback/rap/scripts/publish/master.rb deleted file mode 100644 index 3d313b447e..0000000000 --- a/record-and-playback/rap/scripts/publish/master.rb +++ /dev/null @@ -1,11 +0,0 @@ - -# -puts "pwd = #{Dir.pwd}" -Dir.glob("#{Dir.pwd}/steps/*.rb").sort.each do |file| - puts file - IO.popen("ruby #{file}") do |output| - output.each do |line| - puts line - end - end -end diff --git a/record-and-playback/rap/scripts/publish/matterhorn.rb b/record-and-playback/rap/scripts/publish/matterhorn.rb index ec9d63c441..d39df31d34 100755 --- a/record-and-playback/rap/scripts/publish/matterhorn.rb +++ b/record-and-playback/rap/scripts/publish/matterhorn.rb @@ -10,12 +10,12 @@ end meeting_id = opts[:meeting_id] # This script lives in scripts/archive/steps while matterhorn.yaml lives in scripts/ -props = YAML::load(File.open('properties.yaml')) - -matt_server = props['matterhorn_server'] -matt_inbox = props['matterhorn_inbox'] -matt_key = props['matterhorn_key'] -recording_dir = props['recording_dir'] +bbb_props = YAML::load(File.open('bigbuebutton.yml')) +matt_props = YAML::load(File.open('matterhorn.yml')) +matt_server = matt_props['matterhorn_server'] +matt_inbox = matt_props['matterhorn_inbox'] +matt_key = matt_props['matterhorn_key'] +recording_dir = bbb_props['recording_dir'] process_dir = "#{recording_dir}/process/matterhorn/#{meeting_id}" target_dir = "#{recording_dir}/publish/matterhorn/#{meeting_id}" diff --git a/record-and-playback/rap/scripts/publish/steps/publish-matterhorn.rb b/record-and-playback/rap/scripts/publish/steps/publish-matterhorn.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/record-and-playback/rap/scripts/publish/steps/publish-simple.rb b/record-and-playback/rap/scripts/publish/steps/publish-simple.rb deleted file mode 100644 index e69de29bb2..0000000000