After some trials, I found an useful solution [2] and made some modifications. It is a shell script that uses ffmpeg to record the video content of target window.
#!/bin/sh
echo -e "Usage: bash $0 outputfile\nClick on the window to be recorded."
size=$(xwininfo -frame | awk '/geometry/ {print $2}')
offset=$(echo $size | awk -F + '{print $2","$3}')
ffmpeg -f alsa -ac 2 -ab 192k -i pulse -f x11grab -s $size -r 30 -i :0.0+$offset -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 $1
---[1] Such as recordMyDesktop and xvidcap
[2] Run FFMPEG with x11grab
No comments:
Post a Comment