четверг, 13 июня 2013 г.

Screencast recording in Linux with ffmpeg

Screencast recording can be performed in HQ using ffmpeg x11grab and pulseaudio:
ffmpeg -f alsa -ac 2 -ab 160k -i pulse -acodec pcm_s16le \
    -f x11grab -r 25 -s 1280x1024 -i :0.0+0,0 -aspect 4:3 \
    -vcodec libx264 -vpre lossless_ultrafast -threads 0 \
    screencast.mkv
options:
-s - recording size
-i - display index + start coords (0,0 - upper left corner)

Run
$ x264 --help
to see all available -vpre options.

ffmpeg should be configured as follows:
./configure --prefix=/usr/local/share/ffmpeg/ --enable-x11grab \
    --enable-gpl --disable-ffplay --disable-ffserver \
    --enable-small --disable-debug --disable-yasm \
    --disable-ffprobe --enable-libx264 --enable-shared

Комментариев нет:

Отправить комментарий