摘要:本文主要向大家介绍了Linux运维知识的Linux录制gif文件,通过具体的内容向大家展现,希望对的大家学习Linux运维知识有所帮助。
本文主要向大家介绍了Linux运维知识的Linux录制gif文件,通过具体的内容向大家展现,希望对的大家学习Linux运维知识有所帮助。
在分享一些知识点的时候,往往是一图胜前言,但是图片只是静态的,也有其局限性;这就想到了动态图片—gif,这里介绍下Linux环境下录制gif文件的方法。
安装
这里使用Ubuntu 16.04,Unity界面,使用byzanz录制gif文件
sudo apt-get install byzanz
使用
在使用看看byzanz的用法
Usage:
byzanz-record [OPTION…] record your current desktop session
Help Options:
-?, –help Show help options
–help-all Show all help options
–help-gtk Show GTK+ Options
Application Options:
-d, –duration=SECS Duration of animation (default: 10 seconds)
-e, –exec=COMMAND Command to execute and time
–delay=SECS Delay before start (default: 1 second)
-c, –cursor Record mouse cursor
-a, –audio Record audio
-x, –x=PIXEL X coordinate of rectangle to record
-y, –y=PIXEL Y coordinate of rectangle to record
-w, –width=PIXEL Width of recording rectangle
-h, –height=PIXEL Height of recording rectangle
-v, –verbose Be verbose
–display=DISPLAY X display to use
byzanz-record -d 10 -x 10 -y 10 -w 600 -h 500 test_gif.gif
其中
-d 10 录制时间长度为10秒,默认也是10秒
-x 10 录制区域的横坐标
-y 10 录制区域的纵坐标
-w 600 录制区域的宽度
-h 500 录制区域的高度
test_gif.gif 录制后的文件名
这样就可以录制屏幕操作为gif文件了
这样有个问题就算,我需要手动的,使用实实在在的参数数字来指定要录制的区域,但,往往我们又很难知道。所以,这里就打算把整个屏幕区域录制下来,使用xrandr来查看当前屏幕的分辨率,并指定参数给byzanz
xx@xx:~ $xrandr
Screen 0: minimum 8 x 8, current 1600 x 900, maximum 32767 x 32767
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 434mm x 236mm
1600x900 60.00*+
1280x1024 75.02 60.02
1280x720 60.00
1024x768 75.08 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 60.00
720x400 70.08
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
这样就可以指定录制区域为整个屏幕,就不会漏了
byzanz-record -d 40 -w 1600 -h 900 my_gif.gif
效果
希望这篇文章可以帮助到你,总之同学们,it知识尽在职坐标。
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号