FSWEBCAM(1)
π FSWEBCAM π
okay bestie, welcome to the manual page for fswebcam β that's section 1, the User Commands corner of the manual, and it's giving tiny-but-mighty. Let's get into it π
β¨ NAME β¨
fswebcam β small and simple webcam for *nix. literally the whole point. π
πΈ SYNOPSIS πΈ
fswebcam [<options>] <filename> [[<options>] <filename> ... ]
π¦ DESCRIPTION π¦
so fswebcam is a small and simple webcam app for *nix, and no cap it really does keep it simple. it can capture images from a whole bunch of different sources, and then it'll do some simple manipulation on the image it grabbed.
the image can be saved as one or more PNG, JPEG or WEBP files. iconic π
you can also send the image straight to stdio β just use the filename "-". and the output filename gets formatted by strftime, so you can put date/time stuff in there and it'll do the thing. β¨
π CONFIGURATION π
π Configuration File
config files use the long version of options, without the -- prefix. no dashes, bestie, just the word.
comments start with a # symbol β and it has to be at the beginning of the line, not just vibing somewhere in the middle.
π General Options
-?,--helpβ shows a usage summary. the little cheat sheet π«Ά-c,--configβ load options from a file. you can load more than one config file, and you can mix them with command-line arguments, go off.
β οΈ Note: this option can not be used from within a configuration file. so don't try it, it's not the vibe.
-q,--quietβ hides all messages except errors. silence, but make it stylish π€«-v,--verboseβ prints extra information during the capture process. she's chatty now π¬--versionβ prints the version number and exits. bye π-l,--loop <frequency>β continually captures images. the time between images is specified in seconds. default behaviour is to capture a single image and exit.
β οΈ Note: the time to capture the next image is calculated relative to the epoch, so an image will not be captured immediately when the program is first started. like, she needs a sec. π
--offset <seconds>β sets the offset to use when calculating when the next image is due in loop mode. the value can be positive or negative.--count <number>β sets the number of times to capture an image in loop mode before exiting. default is0, which means loop forever. forever and ever bestie βΎοΈ-b,--backgroundβ run in the background. in this modestdoutand console logging are unavailable. she's busy, don't @ her.--pid <filename>β saves the PID of the background process to the specified file. ignored when you're not using background mode.-L,--log [file/syslog:]<filename>β redirect log messages to a file or syslog. for example:
--log output.log
--log file:output.log
--log syslog
--gmtβ use GMT instead of the local timezone when formatting text withstrftime. π
π₯ Capture Options
-d,--device [<prefix>:]<device name>β set the source or device to use. the source module is selected automatically unless you specify it in the prefix. default is/dev/video0.
available source modules, in order of preference:
V4L2β capture images from a V4L2 compatible video device.V4L1β capture images from a V4L1 compatible video device.FILEβ capture an image from a JPEG or PNG image file.RAWβ reads images straight from a device or file.TESTβ draws colour bars. π yes the test pattern, she's serving
-i,--input <input number or name>β set the input to use. you can pick an input by either its number or its name, your choice bestie. default is"0".--list-inputsβ list available inputs for the selected source or device.
fswebcam -d v4l2:/dev/video1 --list-inputs
-t,--tuner <tuner number>β set the tuner to use.-f,--frequency <frequency>β set the frequency of the selected input or tuner. the value may be read as KHz or MHz depending on the input or tuner.-p,--palette <name>β try to use the specified image format when capturing the image. default is to select one automatically.
supported formats:
PNGJPEGMJPEGS561RGB32RGB24BGR32BGR24YUYVUYVYYUV420PBAYERSBGGR8SRGGB8SGBRG8SGRBG8RGB565RGB555Y16GREY
-r,--resolution <dimensions>β set the image resolution of the source or device. the actual resolution used may differ if the source or device cannot capture at the specified resolution. so don't be pressed if it negotiates, okay? π default is"384x288".--fps <frames per second>β sets the frame rate of the capture device. this currently only works with certain V4L2 devices. default is"0", which lets the device decide. she's independent π-F,--frames <number>β set the number of frames to capture. more frames mean less noise in the final image, however capture times will be longer and moving objects may appear blurred. trade-offs, bestie, trade-offs. default is"1".-S,--skip <number>β set the number of frames to skip. these frames will be captured but won't be used. use this option if your camera sends some bad or corrupt frames when it first starts capturing. default is"0".-D,--delay <delay>β inserts a delay after the source or device has been opened and initialised, and before the capture begins. some devices need this delay to let the image settle after a setting has changed. the delay time is specified in seconds. let her breathe π-T,--timeout <seconds>β adjusts the timeout period in seconds for frame capture. this should be increased for exposures longer than 10 seconds. default is"10".-R,--readβ useread()to capture images. this can be slower but more stable with some devices. default is to usemmap(), falling back onread()ifmmap()is unavailable.-s,--set <name=value>β set a control. these are used by the source modules to control image or device parameters. numeric values can be expressed as a percentage of their maximum range or a literal value, for example:
--set brightness=50% --set framerate=5
non-numeric controls are also supported:
--set lights=on
V4L2 features a type of control called a 'button'. these controls do not take any value, but trigger an action. for example:
--set "Restore Factory Settings"
control names and values are not case sensitive. so scream them if you want, she doesn't care π
β οΈ Note: available controls will vary depending on the source module and devices used. for more information see the --list-controls option.
--list-controlsβ list available controls and their current values for the selected source module and device. for example:
fswebcam -d v4l2:/dev/video2 --list-controls
π§ Output Options
these options are performed in the order they appear on the command line, only effecting images output later on the command line. so like, position matters, it's giving main character energy for whatever comes after it β¨ for example:
fswebcam -r 640x480 output1.jpeg --scale 320x240 output2.jpeg
will create two images β "output1.jpeg" containing a full resolution copy of the captured image, and "output2.jpeg" containing the same captured image but scaled to half the size. two for one, ate. π₯
--no-bannerβ disable the banner. π«--top-bannerβ position the banner at the top of the image. β¬οΈ--bottom-bannerβ position the banner at the bottom of the image. this is the default.--banner-colour <#AARRGGBB>β set the colour of the banner. uses the web-style hexadecimal format (#RRGGBB) to describe the colour, and can support an alpha channel (#AARRGGBB). examples:
"#FF0000" is pure red.
"#80000000" is semi-transparent black.
"#FF000000" is invisible (alpha channel is at maximum).
default is "#40263A93".
--line-colour <#AARRGGBB>β set the colour of the divider line. see--banner-colourfor more information. default is"#00FF0000".--text-colour <#AARRGGBB>β set the colour of the text. see--banner-colourfor more information. default is"#00FFFFFF".--font <[file or font name]:[font size]>β set the font used in the banner. if no path is specified the path in theGDFONTPATHenvironment variable is searched for the font. Fontconfig names may also be used if the GD library has support. if no font size is specified the default of"10"will be used. default is"sans:10". cute and legible π--no-shadowβ disable the text shadow.--shadowβ enable the text shadow. this is the default behaviour.--title <text>β set the main text, located in the top left of the banner.--no-titleβ clear the main text.--subtitle <text>β set the sub-title text, located in the bottom left of the banner.--no-subtitleβ clear the sub-title text.--timestamp <text>β set the timestamp text, located in the top right of the banner. this string is formatted bystrftime. default is"%Y-%m-%d %H:%M (%Z)".--no-timestampβ clear the timestamp text.--info <text>β set the info text, located in the bottom right of the banner.--no-infoβ clear the info text.--underlay <filename>β load a PNG image and overlay it on the image, below the banner. the image is aligned to the top left.
β οΈ Note: the underlay is only applied when saving an image and is not modified by any of the image options or effects.
--no-underlayβ clear the underlay image.--overlay <filename>β load a PNG image and overlay on the image, above the banner. the image is aligned to the top left.
β οΈ Note: the overlay is only applied when saving an image and is not modified by any of the image options or effects.
--no-overlayβ remove the overlay image.--jpeg <factor>β set JPEG as the output image format. the compression factor is a value between0and95, or-1for automatic. this is the default format, with a factor of"-1".--png <factor>β set PNG as the output image format. the compression factor can be a value between0and9, or-1for automatic.--webp <factor>β set WEBP as the output image format. the compression factor is a value between0and100, or-1for automatic.
β οΈ requires WEBP support in libgd. no support, no webp, sorry bestie π
--save <filename>β saves the image to the specified filename.
β οΈ Note: this isn't necessary on the command-line where a filename alone is enough to save an image.
--revertβ revert to the original captured image and resolution. this undoes all previous effects on the image.
β οΈ Note: this only reverts the image itself, and not options such as font, colours and overlay.
--flip <direction[,direction]>β flips the image, bestie. direction can beh(horizontal) orv(vertical), and yeah you can stack two of them with a comma. Example:
--flip h Flips the image horizontally.
--flip h,v Flips the image both horizontally and vertically.
--crop <dimensions[,offset]>β crops the image down to a region. No offset? The cropped area lands right in the center of the image, main character energy. Examples:
--crop 320x240 Crops the center 320x240 area of the image.
--crop 10x10,0x0 Crops the 10x10 area at the top left corner of the image.
--scale <dimensions>β scales the image, up or down, whatever it takes. Example:--scale 640x480scales the image to 640x480.
Heads up bestie: the aspect ratio of the image is not maintained. It will absolutely stretch. It's giving squish. π«
--rotate <angle>β rotates the image in right angles only:90,180and270degrees.
Note: rotating the image90or270degrees will swap the dimensions. Not a bug, just math being math. β¨
--deinterlaceβ applies a simple deinterlacer to the image. That's it, that's the whole thing.--invertβ inverts all the colours in the image, creating a negative. Goth mode unlocked. π€--greyscaleβ removes all colour from the image. Sad beige aesthetic, but make it pixels. π«οΈ--swapchannels <c1c2>β swaps colour channels c1 and c2. Valid channels areR,GandBβ for Red, Green and Blue channels respectively.
Example: --swapchannels RB will swap the red and blue channels. π
--exec <command>β executes the specified command and waits for it to complete before continuing. The command line is formatted bystrftime. So yes, you can put all your fancy time placeholders in there. π
π¨ SIGNALS π¨
SIGHUPβ this causesfswebcamto reload its configuration. Fresh start, new you. πΈSIGUSR1β causesfswebcamto capture an image immediately, without waiting on the timer in loop mode. Instant. No thoughts, just capture. πΈ
π KNOWN BUGS π
The spacing between letters may be incorrect. This is an issue with the GD library β not us, not our fault, we're just the messenger. π
π REPORTING BUGS π
Please report bugs to <phil@sanslogic.co.uk>. Be nice, be specific, include the details. π«Ά
π SEE ALSO π
π AUTHOR π
Written by Philip Heron <phil@sanslogic.co.uk>. Iconic. Periodt. β¨
And that's a wrap on the whole page, bestie! This is fswebcam version 20200725, dated 25 July 2020, and you just read the one and only FSWEBCAM(1) man page. Go take some pictures, you absolute legend. πππ¦πΈ
π¦ where this page comes from
- epel 9: fswebcam 20200725-13.el9 Β· GPL-2.0-only
- fedora 43: fswebcam 20200725-13.fc43 Β· GPL-2.0-only
- fedora 44: fswebcam 20200725-14.fc44 Β· GPL-2.0-only
- nixos 26.05: fswebcam 20200725
- nixpkgs unstable: fswebcam 20200725
- ubuntu resolute: fswebcam 20200725-0.1 Β· GPL-2.0-only
- ubuntu stonking: fswebcam 20200725-0.1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms