Install ffmpeg packages in linux ( fedora, ubuntu and etc ) using installers (yum,apt-get and etc)
use the following command to record the Desktop :
ffmpeg -r 30 -s 1280x720 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi
use the following command to record the Desktop :
ffmpeg -r 30 -s 1280x720 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi
But when we give resolution 1280x720 it will only take that part of your Desktop ( or some it will not record when your Desktop resolution is less the specified ) for that problem we need use one small script to record the Desktop
cat > record_myDesktop.sh << EOF
#!/bin/bash
cur_dis=$( xrandr | grep '*' )
res=$(echo $cur_dis |awk '{print $1}')
echo $cur_dis
echo "ffmpeg -r 30 -s $res -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi"
ffmpeg -r 30 -s $res -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi
EOF
chmod +x record_myDesktop.sh
./record_myDesktop.sh
--
0 comments:
Post a Comment