Merge pull request #217 from kepstin/ffmpeg-version-check
FFmpeg version check changes
This commit is contained in:
commit
7ab1dc4cb3
@ -955,15 +955,35 @@ check_state() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check if any of the red5 BigBlueButton applications did not start propery
|
# Check for required external commands
|
||||||
#
|
#
|
||||||
COMMANDS="ffmpeg ruby gem ghostscript pdf2swf"
|
COMMANDS="ruby gem ghostscript pdf2swf"
|
||||||
for cmd in $COMMANDS ; do
|
for cmd in $COMMANDS ; do
|
||||||
if ! which $cmd > /dev/null; then
|
if ! which $cmd > /dev/null; then
|
||||||
echo "# $cmd command not found"
|
echo "# $cmd command not found"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if ffmpeg is installed, and whether it is a supported version
|
||||||
|
#
|
||||||
|
FFMPEG_VERSION=$(ffmpeg -version 2>/dev/null | grep ffmpeg | cut -d ' ' -f3)
|
||||||
|
case "$FFMPEG_VERSION" in
|
||||||
|
0.11.*)
|
||||||
|
# This is the current supported version; OK.
|
||||||
|
;;
|
||||||
|
'')
|
||||||
|
echo "# Warning: No ffmpeg version was found on the system"
|
||||||
|
echo "# Recording processing will not function"
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "# Warning: The installed ffmpeg version '${FFMPEG_VERSION}' is not supported"
|
||||||
|
echo "# Recording processing may not function correctly"
|
||||||
|
echo
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
if [ -f /usr/share/red5/log/sip.log ]; then
|
if [ -f /usr/share/red5/log/sip.log ]; then
|
||||||
#
|
#
|
||||||
|
@ -68,8 +68,7 @@ module BigBlueButton
|
|||||||
# create_blank_video(15, 1000, canvas.jpg, blank-video.flv)
|
# create_blank_video(15, 1000, canvas.jpg, blank-video.flv)
|
||||||
def self.create_blank_deskshare_video(length, rate, blank_canvas, video_out)
|
def self.create_blank_deskshare_video(length, rate, blank_canvas, video_out)
|
||||||
BigBlueButton.logger.info("Task: Creating blank deskshare video")
|
BigBlueButton.logger.info("Task: Creating blank deskshare video")
|
||||||
loop_param = (`ffmpeg -version | grep ffmpeg | cut -d ' ' -f3`).chomp.eql?("0.11.2") ? "-loop 1" : "-loop_input"
|
command = "ffmpeg -y -loop 1 -t #{length} -i #{blank_canvas} -loglevel #{BigBlueButton::FFMPEG_LOG_LEVEL} -v -10 -r #{rate} -vcodec flashsv #{video_out}"
|
||||||
command = "ffmpeg -y #{loop_param} -t #{length} -i #{blank_canvas} -loglevel #{BigBlueButton::FFMPEG_LOG_LEVEL} -v -10 -r #{rate} -vcodec flashsv #{video_out}"
|
|
||||||
BigBlueButton.execute(command)
|
BigBlueButton.execute(command)
|
||||||
# TODO: check for result, raise exception when there is an error
|
# TODO: check for result, raise exception when there is an error
|
||||||
end
|
end
|
||||||
@ -83,8 +82,7 @@ module BigBlueButton
|
|||||||
# create_blank_video(15, 1000, canvas.jpg, blank-video.flv)
|
# create_blank_video(15, 1000, canvas.jpg, blank-video.flv)
|
||||||
def self.create_blank_video(length, rate, blank_canvas, video_out)
|
def self.create_blank_video(length, rate, blank_canvas, video_out)
|
||||||
BigBlueButton.logger.info("Task: Creating blank video")
|
BigBlueButton.logger.info("Task: Creating blank video")
|
||||||
loop_param = (`ffmpeg -version | grep ffmpeg | cut -d ' ' -f3`).chomp.eql?("0.11.2") ? "-loop 1" : "-loop_input"
|
command = "ffmpeg -y -loop 1 -t #{length} -i #{blank_canvas} -loglevel #{BigBlueButton::FFMPEG_LOG_LEVEL} -v -10 -r #{rate} #{video_out}"
|
||||||
command = "ffmpeg -y #{loop_param} -t #{length} -i #{blank_canvas} -loglevel #{BigBlueButton::FFMPEG_LOG_LEVEL} -v -10 -r #{rate} #{video_out}"
|
|
||||||
BigBlueButton.execute(command)
|
BigBlueButton.execute(command)
|
||||||
# TODO: check for result, raise exception when there is an error
|
# TODO: check for result, raise exception when there is an error
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user