I made a simple screen capture script that uses ffmpeg to create MPEG-4 video file. I replaced two script lines from the original script. If you are using ALSA sound driver, replace ‘-f alsa -i pulse’ to ‘-f alsa -i hw:0,0’.
xwininfo -root | grep ‘geometry’ | awk ‘{print $2;}’ finds current screen resolution. I hard coded it to make the script short.
#!/bin/sh
# capture screen to mp4 video file
video_file="$1"
# alsa -ac -i hw:0,0
# xwininfo -root | grep 'geometry' | awk '{print $2;}'
# 1440x900+0+0
ffmpeg -f alsa -i pulse \
-f x11grab -s 1440x900+0+0 \
-r 24 -i :0.0 -sameq -f mpeg -ar 48000 -s hd720 -y \
$video_file
Converting video to image files
ffmpeg -i movie.mpg movie%d.jpg
I could convert an ebook to number of page images for printing. After capturing ebook reader on screen from the first page to the last, ran the following code to extract all images in a separate directory.
ffmpeg -i ../paida_lajin.mp4 -qscale:v 2 pl_%04d.jpg
Thank you for the post. Usefull