USTREAMER(1)
π USTREAMER(1) π
okay so welcome bestie, you've just opened the USTREAMER(1) page from the General Commands Manual section and honestly? you're about to have a great time π¦β¨
β¨ NAME β¨
ustreamer β stream MJPEG video from any V4L2 device to the network π
π SYNOPSIS π
ustreamer [OPTIONS]
π DESCRIPTION π
Β΅Streamer</purl> (ustreamer) is a lightweight and very quick server that streams MJPEG video from any V4L2 device straight to the network. no cap. π₯
And the best part? Every new browser has native support for this video format, plus most video players like mplayer, VLC etc. So likeβ¦ no plugin drama, no weird codec chaos, it just works π
Β΅Streamer is part of the PiKVM project π and it was designed to stream VGA and HDMI screencast hardware data at the highest resolution and FPS possible. main character energy fr fr.
πΈ USAGE πΈ
okay so if you run it with zero arguments, ustreamer will try to open /dev/video0 at a 640x480 resolution and start streaming on http://127.0.0.1:8080. that's the default vibe π
You can override this behavior using the parameters --device, --host and --port. For example, to stream to the world, run:
ustreamer --device=/dev/video1 --host=0.0.0.0 --port=80
β οΈ Please note that since Β΅Streamer v2.0 cross-domain requests were disabled by default for security reasons. To enable the old behavior, use the option --allow-origin=\*. π
For example, the recommended way of running Β΅Streamer with a TC358743-based capture device on a Raspberry Pi is:
ustreamer \
--format=uyvy \ # Device input format
--encoder=m2m-image \ # Hardware encoding with V4L2 M2M intraface
--workers=3 \ # Maximum workers for V4L2 encoder
--persistent \ # Suppress repetitive signal source errors (for example when HDMI cable was disconnected)
--dv-timings \ # Use DV-timings
--drop-same-frames=30 # Save the traffic
π‘ Please note that to use--drop-same-framesfor different browsers you need to use some specific URL/streamparameters (see URL / for details). iykyk π«Ά
You can always view the full list of options with ustreamer --help β¨ Some features may not be available on your platform. To find out which features are enabled, use ustreamer --features π
and bestieβ¦ there's more coming, don't go anywhere π
β¨ OPTIONS β¨
okay bestie, this is the big one. grab a snack, hydrate, stretch, we're going in π
π₯ Capturing options
these are the ones that talk to your actual camera hardware, the moment of truth fr fr
-d /dev/path,--device /dev/pathβ the path to your V4L2 device, i.e. where your camera lives. Default is/dev/video0π-i N,--input Nβ which input channel to use. Default:0.-r WxH,--resolution WxHβ the image resolution you start out with. Default:640x480.-m fmt,--format fmtβ the image format, the whole vibe of your pixels. Available:YUYV,VYVU,UYVY,RGB565,RGB24,JPEG; default isYUYVβ¨-a std,--tv-standard stdβ force a TV standard, like the old-school days. Available:PAL,NTSC,SECAM; default: disabled.-I method,--io-method methodβ set the V4L2 IO method (go peek at the kernel docs if you want the lore). Changing this may boost performance. Or not. no promises π Available:MMAP,USERPTR; default:MMAP.-f N,--desired-fps Nβ your desired FPS. Default: maximum possible, go fast.-z N,--min-frame-size Nβ drop any frames smaller than this limit. Super handy when your device spits out tiny garbage frames. Default:128bytes.-n,--persistentβ suppress those repetitive signal source errors. Default: disabled.-t,--dv-timingsβ enable DV-timings querying and events processing so the resolution can change automatically. Default: disabled.-b N,--buffers Nβ how many buffers to receive data from the device. Each buffer may be processed using an independent thread. Default:2(the number of CPU cores (but not more than 4) + 1).-w N,--workers Nβ the number of worker threads, but never more than buffers. Default:1(the number of CPU cores (but not more than 4)).-q N,--quality Nβ set the quality of JPEG encoding, from1to100(best). Default:80.
Note: If HW encoding is used (JPEG source format selected), this parameter attempts to configure the camera or capture device hardware's internal encoder. It does not re-encode MJPEG to MJPEG to change the quality level for sources that already output MJPEG.
-c type,--encoder typeβ use the specified encoder. Heads up, this can affect the number of workers.CPUβ Software MJPEG encoding (default).HWβ Use pre-encoded MJPEG frames directly from camera hardware.M2M-VIDEOβ GPU-accelerated MJPEG encoding.M2M-IMAGEβ GPU-accelerated JPEG encoding.
-g WxH,...,--glitched-resolutions WxH,...β it doesn't do anything. Still here for compatibility. it's giving haunted heirloom π-k path,--blank pathβ it doesn't do anything. Still here for compatibility.-K sec,--last-as-blank secβ it doesn't do anything. Still here for compatibility.-l,--slowdownβ slow the capturing down to1FPS or less whenever no stream or sink clients are connected. Great for saving CPU. Default: disabled.--device-timeout secβ the timeout for device querying. Default:1.--device-error-delay secβ how long to wait before trying to reconnect to the device after an error (a timeout, for example). Default:1.--m2m-device /dev/pathβ the path to your V4L2 mem-to-mem encoder device. Default: auto-select.
πΈ Image control options
your glow-up menu, we're adjusting the camera's whole aesthetic
--image-defaultβ reset every image setting below back to default. Default: no change.--brightness N, auto, defaultβ set brightness. Default: no change.--contrast N, defaultβ set contrast. Default: no change.--saturation N, defaultβ set saturation. Default: no change.--hue N, auto, defaultβ set hue. Default: no change.--gamma N, defaultβ set gamma. Default: no change.--sharpness N, defaultβ set sharpness. Default: no change.--backlight-compensation N, defaultβ set backlight compensation. Default: no change.--white-balance N, auto, defaultβ set white balance. Default: no change.--gain N, auto, defaultβ set gain. Default: no change.--color-effect N, defaultβ set color effect. Default: no change.--flip-vertical 1, 0, defaultβ set vertical flip. Default: no change.--flip-horizontal 1, 0, defaultβ set horizontal flip. Default: no change.
π HTTP server options
where your stream gets served, the main character entrance π
-s address,--host addressβ listen on this Hostname or IP. Default:127.0.0.1.-p N,--port Nβ bind to this TCP port. Default:8080.-U path,--unix pathβ bind to a UNIX domain socket. Default: disabled.-D,--unix-rmβ try to remove the old unix socket file before binding. Default: disabled.-M mode,--unix-mode modeβ set the UNIX socket file permissions (like777). Default: disabled.-S,--systemdβ bind to the systemd socket for socket activation. Requires theWITH_SYSTEMDfeature. Default: disabled.--user nameβ HTTP basic auth user. Default: disabled.--passwd strβ HTTP basic auth passwd. Default: empty.--static pathβ path to a dir with static files instead of the embedded root index page. Symlinks are not supported, for security reasons. Default: disabled.-e N,--drop-same-frames Nβ don't send identical frames to clients, but never more than the number you specify. It can significantly reduce outgoing traffic, but it will increase CPU load. Don't use this with analog signal sources or webcams, it's useless there. Default: disabled.-R WxH,--fake-resolution WxHβ override the image resolution for the/state. Default: disabled.--tcp-nodelayβ set theTCP_NODELAYflag on the client/streamsocket. Only for TCP sockets. Default: disabled.--allow-origin strβ set theAccess-Control-Allow-Originheader. Default: disabled.--instance-id strβ a short string identifier to be displayed in the/statehandle. It must satisfy regexp^[a-zA-Z0-9./+_-]*$. Default: an empty string.--server-timeout secβ timeout for client connections. Default:10.
πΌοΈ JPEG sink options
with a shared memory sink you can write a stream to a file. go read ustreamer-dump(1) for the deets π«Ά
--jpeg-sink nameβ use the specified shared memory object to sink JPEG frames. The name should end with a suffix.jpegor:jpeg. Default: disabled.--jpeg-sink-mode modeβ set JPEG sink permissions (like777). Default:660.--jpeg-sink-rmβ remove shared memory on stop. Default: disabled.--jpeg-sink-client-ttl secβ client TTL. Default:10.--jpeg-sink-timeout secβ timeout for lock. Default:1.
π¬ H264 sink options
--h264-sink nameβ use the specified shared memory object to sink H264 frames. The name should end with a suffix.h264or:h264. Default: disabled.--h264-sink-mode modeβ set H264 sink permissions (like777). Default:660.--h264-sink-rmβ remove shared memory on stop. Default: disabled.--h264-sink-client-ttl secβ client TTL. Default:10.--h264-sink-timeout secβ timeout for lock. Default:1.--h264-bitrate kbpsβ H264 bitrate in Kbps. Default:5000.--h264-gop Nβ interval between keyframes. Default:30.--h264-m2m-device /dev/pathβ path to the V4L2 mem-to-mem encoder device. Default: auto-select.
π§ RAW sink options
--raw-sink nameβ use the specified shared memory object to sink RAW frames. The name should end with a suffix.rawor:raw. Default: disabled.--raw-sink-mode modeβ set RAW sink permissions (like777). Default:660.--raw-sink-rmβ remove shared memory on stop. Default: disabled.--raw-sink-client-ttl secβ client TTL. Default:10.--raw-sink-timeout secβ timeout for lock. Default:1.
βοΈ Process options
--exit-on-parent-deathβ exit the program if the parent process is dead. Requires theHAS_PDEATHSIGfeature. Default: disabled.--exit-on-no-clientssecβ exit the program if there have been no stream or sink clients or any HTTP requests in the last N seconds. Default:0(disabled). (yes bestie, the manpage really does spell that option name like that, we do not make the rules π)--process-name-prefix strβ set a process name prefix which will be displayed in the process list, likestr: ustreamer --blah-blah-blah. Requires theWITH_SETPROCTITLEfeature. Default: disabled.--notify-parentβ sendSIGUSR2to the parent process when the stream parameters are changed. Checking changes is performed for the online flag and image resolution. Requires theWITH_SETPROCTITLEfeature.
π GPIO options
available only if the WITH_GPIO feature is enabled π
--gpio-device /dev/pathβ path to the GPIO character device. Default:/dev/gpiochip0.--gpio-consumer-prefix strβ consumer prefix for GPIO outputs. Default:ustreamer.--gpio-prog-running pinβ set1on a GPIO pin while Β΅Streamer is running. Default: disabled.--gpio-stream-online pinβ set1while streaming. Default: disabled.--gpio-has-http-clients pinβ set1while the stream has at least one client. Default: disabled.
π Logging options
--log-level Nβ verbosity level of messages from0(info) to3(debug). Heads up, enabling debugging messages can slow the program down. Available levels:0(info),1(performance),2(verbose),3(debug). Default:0.--perfβ enable performance messages (same as--log-level=1). Default: disabled.--verboseβ enable verbose messages and lower (same as--log-level=2). Default: disabled.--debugβ enable debug messages and lower (same as--log-level=3). Default: disabled.--force-log-colorsβ force color logging. Default: colored if stderr is a TTY.--no-log-colorsβ disable color logging. Default: ditto.
π Help options
-h,--helpβ print this text and exit.-v,--versionβ print version and exit.--featuresβ print the list of supported features.
π SEE ALSO
π BUGS
please file any bugs and issues at https://github.com/pikvm/ustreamer/issues β they want to hear from you fr fr
βοΈ AUTHOR
Maxim Devaev <mdevaev@gmail.com>
π HOMEPAGE
βοΈ COPYRIGHT
GNU General Public License v3.0
and that's the whole page bestie π«Ά this one's from November 2020, version 6.12, and it lives under the name USTREAMER(1). slay, go stream something iconic πβ¨
π¦ where this page comes from
- fedora 43: ustreamer 6.12-5.fc43 Β· GPL-3.0-or-later
- fedora 44: ustreamer 6.12-6.fc44 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms