Required package :
ffmpeg, avconv
Note : If these package are not installed in then you can install it using these command.
For ffmpeg : sudo apt-get install ffmpeg
For avconv : sudo apt-get install libav-tools
Step 1 : Open presentation.rb file located in /usr/local/bigbluebutton/core/scripts/publish/
Step 2 : Replace below contents with given contents :
Existing Content :
if File.exist?(“#{$process_dir}/webcams.webm”)
BigBlueButton.logger.info(“Making video dir”)
video_dir = “#{package_dir}/video”
FileUtils.mkdir_p video_dir
BigBlueButton.logger.info(“Made video dir – copying: #{$process_dir}/webcams.webm to -> #{video_dir}”)
FileUtils.cp(“#{$process_dir}/webcams.webm”, video_dir)
BigBlueButton.logger.info(“Copied .webm file”)
else
audio_dir = “#{package_dir}/audio”
BigBlueButton.logger.info(“Making audio dir”)
FileUtils.mkdir_p audio_dir
BigBlueButton.logger.info(“Made audio dir – copying: #{$process_dir}/audio.webm to -> #{audio_dir}”)
FileUtils.cp(“#{$process_dir}/audio.webm”, audio_dir)
BigBlueButton.logger.info(“Copied audio.webm file – copying: #{$process_dir}/audio.ogg to -> #{audio_dir}”)
FileUtils.cp(“#{$process_dir}/audio.ogg”, audio_dir)
BigBlueButton.logger.info(“Copied audio.ogg file”)
end
Replace Content :
if File.exist?(“#{$process_dir}/webcams.webm”)
BigBlueButton.logger.info(“Making video dir”)
video_dir = “#{package_dir}/video”
FileUtils.mkdir_p video_dir
BigBlueButton.logger.info(“Made video dir – copying: #{$process_dir}/webcams.webm to -> #{video_dir}”)
FileUtils.cp(“#{$process_dir}/webcams.webm”, video_dir)
BigBlueButton.logger.info(“Copied .webm file”)
#Added by Ghanshyam Katriya Company : Ecosmob Technology Pvt Ltd. Date : 23/12/2015 Purpose : Convert .webm to .mp4
#Convert .webm video to .mp4 video command : ffmpeg -i {path}/webcams.webm -strict -2 {path}/webcams.mp4
command=”ffmpeg -i #{$process_dir}/webcams.webm -strict -2 #{$process_dir}/webcams.mp4″
BigBlueButton.execute(command)
FileUtils.cp(“#{$process_dir}/webcams.mp4”, video_dir)
else
audio_dir = “#{package_dir}/audio”
BigBlueButton.logger.info(“Making audio dir”)
FileUtils.mkdir_p audio_dir
BigBlueButton.logger.info(“Made audio dir – copying: #{$process_dir}/audio.webm to -> #{audio_dir}”)
FileUtils.cp(“#{$process_dir}/audio.webm”, audio_dir)
BigBlueButton.logger.info(“Copied audio.webm file – copying: #{$process_dir}/audio.ogg to -> #{audio_dir}”)
FileUtils.cp(“#{$process_dir}/audio.ogg”, audio_dir)
BigBlueButton.logger.info(“Copied audio.ogg file”)
#Added by Ghanshyam Katriya Company : Ecosmob Technology Pvt Ltd. Date : 23/12/2015 Purpose : Convert .ogg to .mp3
#Convert .ogg video to .wav video command : avconv -i {path}/audio.ogg {path}/audio.mp3
command=”avconv -i #{$process_dir}/audio.ogg #{$process_dir}/audio.mp3″
BigBlueButton.execute(command)
FileUtils.cp(“#{$process_dir}/audio.mp3”, audio_dir)
end
This script is not working for me. I followed the instructions as you mentioned here, but I am unable to generate the video of my recorded session. Can you please guide how to fix and run this script towards desired output.
LikeLike
Hello Sumit,
This script is working fine for me & some others also. It’s working fine for new recording. But still If you wan’t to convert your old recordings then you need to rebuild those recording with meeting id.
Thanks.
LikeLike
Thanks for quick replay.
Can you guide more on this because I did exactly as you per the instructions, Please let me know how can I use this code snippet
LikeLike
You will get better idea about rebuilding of recordings in BigBlueButton http://docs.bigbluebutton.org/dev/recording.html#rebuild-every-recording
LikeLike
Can you share your contact number, so I will discuss the problem in detail with you?
LikeLike
You can reach me at ghanshyam.katriya (Skype)
LikeLike