- remove some files we don't need

- break down properties file for bbb core and matterhorn
This commit is contained in:
Richard Alam 2011-05-12 11:58:48 -04:00
parent 83d681262a
commit 97ba7e3510
24 changed files with 31 additions and 205 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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))

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}"

View File

@ -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()

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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}"