LinuxCommandLibrary

streamer

Capture video and audio streams

SYNOPSIS

streamer [options] -o output_file

PARAMETERS

-h, --help
    Displays a help message with available options and exits.

-d device, --device=device
    Specifies the video input device to use (e.g., /dev/video0). Defaults to /dev/video.

-c channel, --channel=channel
    Selects the input channel or source on the video device.

-s widthxheight, --size=widthxheight
    Sets the desired capture resolution (e.g., 640x480, 1280x720).

-f format, --format=format
    Specifies the output image format (e.g., jpeg, ppm, rgb24) or video pixel format.

-o filename, --output=filename
    Defines the name of the output file for captured images or video.

-t frames, --total-frames=frames
    Sets the total number of frames to capture for video recording. Use 0 for continuous capture.

-r rate, --rate=rate
    Specifies the desired frame rate in frames per second for video capture.

-j quality, --jpeg-quality=quality
    Sets the JPEG compression quality for output images (1-100, where 100 is best).

-F, --fullscreen
    Attempts to capture in fullscreen mode if supported by the device and display server.

-i input, --input=input
    Selects the video input source (e.g., composite, tuner, camera).

-S, --snap
    Captures a single snapshot image and exits. Overrides video capture settings.

-a, --avi-capture
    Enables AVI video capture mode. Requires -t to specify total frames.

DESCRIPTION

streamer is a robust command-line utility designed for capturing still images and video clips from Video4Linux (V4L) compatible devices, such as webcams, TV tuners, or video capture cards. It offers a flexible interface for interacting with these hardware devices, allowing users to precisely control parameters like capture resolution, frame rate, output format, and file naming conventions. This tool is particularly valuable for automating video capture tasks through scripting, or for users who prefer direct command-line control over graphical user interfaces.

streamer supports a variety of common image formats, including JPEG and PPM, and can record video in formats like AVI. Its extensive set of options enables fine-grained customization of the capture process, making it a powerful utility for multimedia enthusiasts, developers, and system administrators working with V4L devices on Linux systems. It can handle single-frame snapshots, timed captures, and continuous video recording with ease.

CAVEATS

Using streamer requires a properly configured Video4Linux-compatible device and its corresponding kernel modules to be loaded. Not all devices support every resolution, frame rate, or pixel format, so experimentation may be necessary to find compatible settings. The performance of capture can be highly dependent on the device's capabilities and available system resources. For advanced video processing, encoding, or streaming beyond basic capture, more comprehensive tools like ffmpeg might be more suitable.

VIDEO4LINUX (V4L) INTERACTION

streamer operates directly on the Video4Linux API, the standard framework for video capture devices in the Linux kernel. A basic understanding of V4L concepts, such as video devices (e.g., /dev/video0), input channels, and supported formats, is beneficial for troubleshooting and optimizing streamer usage. This direct interaction makes it a core tool for low-level video device control.

SCRIPTING AND AUTOMATION

Given its command-line interface, streamer is exceptionally well-suited for integration into shell scripts. This enables powerful automation capabilities, such as creating time-lapse videos by capturing images at set intervals, implementing simple security monitoring by periodically saving webcam snapshots, or building custom, automated video recording solutions without needing a graphical environment.

HISTORY

streamer has been a foundational utility for Linux users interacting with Video4Linux devices for many years. It emerged to provide a simple, command-line driven method for webcam and other video input device control, predating the widespread adoption of more integrated multimedia frameworks. Its development has consistently focused on direct and reliable interaction with the underlying V4L API, making it a trusted choice for basic capture tasks and scripting. While the multimedia landscape on Linux has evolved with more feature-rich tools, streamer maintains its relevance as a lightweight and effective option, particularly for server environments, embedded systems, or situations where a minimal, scriptable capture solution is required.

SEE ALSO

ffmpeg(1), v4l2-ctl(1), motion(1)

Copied to clipboard