From a2d2c42305407366b44ddd042a758fc8032f9f93 Mon Sep 17 00:00:00 2001 From: lolilolicon Date: Thu, 3 Dec 2009 00:52:24 +0800 Subject: [PATCH] ffcast.1 replaces man/ffcast.1.gz --- Makefile | 4 +- README | 4 +- ffcast.1 | 131 ++++++++++++++++++++++++++++++++++++++++++++++++ man/ffcast.1.gz | Bin 3133 -> 0 bytes 4 files changed, 136 insertions(+), 3 deletions(-) create mode 100644 ffcast.1 delete mode 100644 man/ffcast.1.gz diff --git a/Makefile b/Makefile index 5227528..22f3902 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ CC=gcc xrectsel : xrectsel.c -lX11 ${CC} ${CFLAGS} xrectsel.c -lX11 -o xrectsel -install : xrectsel ffcast ffcast.conf man/ffcast.1.gz +install : xrectsel ffcast ffcast.conf ffcast.1 install -D -m755 xrectsel ${DESTDIR}${PREFIX}/bin/xrectsel install -D -m755 ffcast ${DESTDIR}${PREFIX}/bin/ffcast install -D -m644 ffcast.conf ${DESTDIR}${PREFIX}/share/ffcast/doc/ffcast.conf - install -D -m644 man/ffcast.1.gz ${DESTDIR}${PREFIX}/share/man/man1/ffcast.1.gz + install -D -m644 ffcast.1 ${DESTDIR}${PREFIX}/share/man/man1/ffcast.1 .PHONY : clean clean : diff --git a/README b/README index 8aeca03..c3fbeba 100644 --- a/README +++ b/README @@ -1 +1,3 @@ -Who needs a README when you've got a manpage? +THE FFCAST SCRIPT IS BORING. + +Q.E.D. diff --git a/ffcast.1 b/ffcast.1 new file mode 100644 index 0000000..85b4ce5 --- /dev/null +++ b/ffcast.1 @@ -0,0 +1,131 @@ +.TH "FFCAST" "1" "2009-11-25" "ffcast 0.2" "" +.SH NAME +ffcast - Take screencast using ffmpeg with the help of xwininfo and xrectsel +.SH SYNOPSIS +\fBffcast\fR [options] +.SH DESCRIPTION +\fBffcast\fR is a screencast script written in bash. It calls ffmpeg to capture any specified area on the target X11 display. It supports all video codecs and formats ffmpeg supports. Before ffcast actually calls ffmpeg to record the video, it determines the capture area either by interactively asking the user to select one, or by reading the geometry defined by command line. In the interactive mode, the user can either freely select a rectangle area, or select one or more windows by clicking them. +.SH OPTIONS +.TP +\fB-o, --output\fR \fI\fR +Specify output filename. Filename extension is essential if \fBFORMAT\fR is not set either by config file or from command line using \fB--format\fR. If \fI\fR is \fB-\fR, output goes to standard output, in which case \fBFORMAT\fR must be set. +.TP +\fB-d, --display\fR \fI\fR +Display to connect to. Format: \fB[hostname]:number.screen_number\fR, e.g. `:0.1'. By default, ffcast reads the environment variable \fBDISPLAY\fR as display. +.TP +\fB-a, --fullscreen\fR +Capture full screen, identical to `\fB--winid root\fR' +.TP +\fB-w, --xwininfo\fR +Use \fBxwininfo\fR to define capture area, either by click or by specifying window \fBid\fRs with the \fB--winid\fR option. This is useful for capturing events inside an existing window. You can also select multiple windows, specifying window number with the \fB--winno\fR option. +.TP +\fB-s, --xrectsel\fR +Freely select capture area by mouse dragging using \fBxrectsel\fR. When ffcast is triggered with this option, your mouse cursor changes to a cross. You select your capture area by dragging your mouse with button 1 pressed. Then, if button 1 is released, capture will start instantly; if keyboard is pressed instead, capture will abort. Think about `\fBscrot -s\fR'. +.TP +\fB-j, --xjustcap\fR \fI\fR +This option enables the user to tell ffcast about the exact capture area using \fI\fR, thus no manual selection is performed. +This is free selection, like \fB--xrectsel\fR, just without the need of touching your mouse. +.IP +Supported \fI\fR \fBformats\fR are: +.br +\fB*1) "(x1,y1) (x2,y2)"\fR +.br +(x1,y1) and (x2,y2) are the positions of two diagonal corners of the rectangle area in question. +.br +The \fBcomma\fR between xN and yN is required, but the parentheses are optional. +.br +Any of the \fBx1, y1, x2, y2\fR parameters consists of digits, or is a \fBpercentage\fR value written as digits% +.br +If any of \fBx1, y1, x2, y2\fR is written as \fBpercentage\fR, e.g. 20%, it is equivalent to 20% of the full x or y resolution of you screen. +.br +\fB*2) "wxh-x+y gravity"\fR +.br +\fBw\fR: Width of the rectangle area. +.br +\fBh\fR: Height of the rectangle area. +.br +\fB-x\fR: Additional horizontal positioning of the rectangle, added to the initial positioning by \fBgravity\fR. Optional. +.br +\fB+y\fR: Additional vertical positioning of the rectangle, added to the initial positioning by \fBgravity\fR. Optional. +.br +\fBgravity\fR: Determines the initial positioning of the rectangle. Valid values are: \fBNorthwest, North, Northeast, East, Southeast, South, Southwest, West and Center\fR(or \fBCentre\fR). Optional. +.br +Any of \fBw, h, x, y\fR parameters consists of digits, or is a \fBpercentage\fR value written as digits% +.TP +\fB-M, --mod16\fR +Force capture frame size to be \fBmod 16\fR. ffmpeg requires video frame size to be \fBmod 2\fR, which is the default behavior of ffcast. By using this option, you tell ffcast to always adjust capture geometry to \fBmod 16\fR. This may improve video quality for the x264 encoder, but not too much. +.TP +\fB-n, --winno\fR \fI\fR +Number of window(s) to be captured. Only effective with \fB--xwininfo\fR, and without \fB--winid\fR option. This enables capturing multiple windows. Think about the \fBGIMP\fR, and you'll find this option useful. +.TP +\fB-i, --winid\fR \fI\fR +Specify windows to be capture by window \fBid\fRs. \fI\fR is a list of whitespace seperated window \fBid\fRs quoted inside double or single quotes, e.g. "0x80000a 0x800039 0x160003c". see \fBxwininfo\fR(1) \fB-id\fR option. +.TP +\fB-b, --borderless\fR +Ignore borders of window(s). +.TP +\fB-B, --border\fR +Do not ignore borders. This, as well as \fB--borderless\fR, is only effective with \fB--xwininfo\fR, obviously. +.TP +\fB-c, --codec\fR \fI\fR +Force Output Video Codec. Default value: 'x264'. Use ? or list for a list. Use '' to let ffmpeg guess video codec from output extension. +.TP +\fB-f, --format\fR \fI\fR +Force Output Format. Default value: 'h264'. Use ? or list for a list. Use '' to let ffmpeg guess video format from output extension. +.TP +\fB-p, --preset\fR \fI\fR +x264 preset. Default value: 'lossless_slow'. Use ? or list for a list. Dive into \fI/usr/share/ffmpeg/*.ffpreset\fR for details. See \fBffmpeg\fR(1) for more info (`\fBPreset files\fR' section). +.TP +\fB-r, --rate\fR \fI\fR +Set frame rate (fps). Default value: 15. Set it to a higher level if you find your video choppy. +.TP +\fB-t, --duration\fR \fI