Merge pull request #3581 from kepstin/sanity-deskshare-fixup
recording: Run the 'ser' fixup tool on deskshare videos, too
This commit is contained in:
commit
d26c6d5305
@ -29,7 +29,7 @@ module BigBlueButton
|
|||||||
raise MissingDirectoryException, "Directory not found #{to_dir}" if not BigBlueButton.dir_exists?(to_dir)
|
raise MissingDirectoryException, "Directory not found #{to_dir}" if not BigBlueButton.dir_exists?(to_dir)
|
||||||
raise FileNotFoundException, "No recording for #{meeting_id} in #{from_dir}" if Dir.glob("#{from_dir}").empty?
|
raise FileNotFoundException, "No recording for #{meeting_id} in #{from_dir}" if Dir.glob("#{from_dir}").empty?
|
||||||
|
|
||||||
Dir.glob("#{from_dir}/#{meeting_id}-*.flv").each { |file|
|
Dir.glob("#{from_dir}/#{meeting_id}-*").each { |file|
|
||||||
puts "deskshare #{file} to #{to_dir}"
|
puts "deskshare #{file} to #{to_dir}"
|
||||||
FileUtils.cp(file, to_dir)
|
FileUtils.cp(file, to_dir)
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,22 @@ def check_webcam_files(raw_dir, meeting_id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_deskshare_files(raw_dir, meeting_id)
|
def check_deskshare_files(raw_dir, meeting_id)
|
||||||
|
meeting_dir = "#{raw_dir}/#{meeting_id}"
|
||||||
|
|
||||||
|
BigBlueButton.logger.info("Repairing red5 serialized streams")
|
||||||
|
cp="/usr/share/red5/red5-server.jar:/usr/share/red5/lib/*"
|
||||||
|
if File.directory?("#{meeting_dir}/deskshare")
|
||||||
|
FileUtils.cd("#{meeting_dir}/deskshare") do
|
||||||
|
Dir.glob("*.flv.ser").each do |ser|
|
||||||
|
BigBlueButton.logger.info("Repairing #{ser}")
|
||||||
|
ret = BigBlueButton.exec_ret('java', '-cp', cp, 'org.red5.io.flv.impl.FLVWriter', ser, '0', '7')
|
||||||
|
if ret != 0
|
||||||
|
BigBlueButton.logger.warn("Failed to repair #{ser}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
desktops = BigBlueButton::Events.get_start_deskshare_events("#{raw_dir}/#{meeting_id}/events.xml")
|
desktops = BigBlueButton::Events.get_start_deskshare_events("#{raw_dir}/#{meeting_id}/events.xml")
|
||||||
desktops.each do |desktop|
|
desktops.each do |desktop|
|
||||||
raw_desktop_file = "#{raw_dir}/#{meeting_id}/deskshare/#{desktop[:stream]}"
|
raw_desktop_file = "#{raw_dir}/#{meeting_id}/deskshare/#{desktop[:stream]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user