What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can live stream a Raspberry Pi camera either directly from rpicam-vid to a compatible player, or through MediaMTX, which can provide browser and RTSP viewing endpoints. Use the direct route for a quick connection to one known client; choose MediaMTX if you want a server-style address or more than one kind of viewer.

Before you start

  • Connect a camera that is compatible with your Raspberry Pi board and camera connector. Compatibility depends on the specific board and module; check the Raspberry Pi camera hardware documentation before buying or connecting a module.
  • Connect the Pi and viewing device to a network that allows them to communicate. Find the Pi’s IP address and replace example addresses and ports in the commands below with values for your setup.
  • Current Raspberry Pi camera command-line instructions use rpicam-vid. The precise available options and behavior can vary with your operating system, camera, and client.

Way 1: Send a direct stream with rpicam-vid

A direct stream sends camera video from the Pi to a receiving device without a separate streaming server. The sender and viewer must use matching addresses, ports, transport, and a media format the player supports.

For a quick UDP stream

  1. On the receiving device, open a player that supports the stream format and UDP input. Raspberry Pi’s camera guide gives an ffplay receive example; use its current instructions for the matching receive command and substitute the Pi’s chosen port as needed.
  2. On the Pi, run rpicam-vid -t 0 -n --inline -o udp://<client-ip>:<port>. Replace <client-ip> with the receiving device’s IP address and <port> with the port configured in the player.
  3. Stop capture with Ctrl+C when you are finished.

This sends unencapsulated H.264 over UDP. Player support for that form is not universal: Raspberry Pi notes that VLC does not handle unencapsulated H.264 streams in the documented UDP example. If the stream does not play, use a documented packaging option such as MPEG-2 Transport Stream rather than assuming the camera or network is faulty. See Raspberry Pi’s camera software streaming instructions for matching sender and receiver examples.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the direct method fits

  • You need a straightforward connection to one known player on your local network.
  • You can configure the receiving player and keep its transport and port aligned with the Pi command.
  • You do not need a browser endpoint or a server to manage viewers.

Way 2: Use MediaMTX for browser or RTSP viewing

MediaMTX runs as a streaming server between the camera and viewers. Raspberry Pi’s Picamera2 manual documents a minimal configuration that uses the Pi camera as a source, then exposes a browser address and an RTSP address for clients.

#1 Best Overall
Arducam 5MP Camera for Raspberry Pi, 1080P HD OV5647 Camera Module V1 for Raspberry Pi5/4/3/3B+, and Other A/B Series
  • High-Definition video camera for Raspberry Pi Model A or B, B+, model 2, Raspberry Pi 3,3 B+, Pi 4, Pi 5(NOT for Pi Zero)
  • 5MPixel sensor with Omnivision OV5647 sensor in a fixed-focus lens. Software auto focus lens: B07SN8GYGD
  • Integral IR filter
  • Still picture resolution: 2592 x 1944; Max video resolution: 1080p
  • Check ASIN: B07RWCGX5K for OV5647 with acrylic case. Other optional accessories: ABS case (B09TNG4V55); Mini tripod case kit (B09TKYXZFG).

Configure the camera source

  1. Install and run MediaMTX on the Raspberry Pi, following its setup instructions for your operating system and version.
  2. In mediamtx.yml, configure a camera path such as cam with source: rpiCamera. The Picamera2 manual’s example also sets rpiCameraBitrate: 10000000, which is an example value, not a universal requirement or performance recommendation.
  3. Start MediaMTX and use the endpoints for the configured path: http://<ip-address>:8889/cam for browser viewing, or rtsp://<ip-address>:8554/cam in an RTSP-compatible player. Replace <ip-address> with the Pi’s address.

Endpoint availability depends on the server configuration and network access to the relevant ports. The Picamera2 manual shows this MediaMTX setup and its viewing addresses in The Picamera2 Library manual.

When MediaMTX fits

  • You want a browser viewing address as well as an RTSP option for media players.
  • You prefer viewers to connect to a server endpoint rather than configure a direct sender-to-client stream.
  • You are comfortable running and configuring an additional server process.

Which method should you choose?

Consideration Direct rpicam-vid stream MediaMTX server
Setup shape The camera process sends video to a client or transport endpoint. A server receives the camera feed and provides viewer-facing endpoints.
Viewer access Depends on transport, packaging, and player support. Can provide browser and RTSP access, depending on configuration.
Best fit A simple stream to a known local-network client. Browser viewing, RTSP clients, or a server-style endpoint.
Main trade-off Fewer components, but sender and player settings must match. More configuration and a separate server process.

These are differences in setup and access, not a measured speed or latency comparison. The actual stream quality, delay, stability, and resource use depend on the board, camera mode, encoding, network, server, and client.

Rank #2
Arducam for Raspberry Pi HQ Camera Module,12.3MP IMX477 Raspberry Pi Camera for Raspberry Pi5/4B/3B+/Zero 2W, Comes with C-CS Adapter and Tripod Mount
  • How to use: Before using this hq camera, please modify the config.txt file by adding dtoverlay=IMX477 (If connect to cam0 port on Pi5, add dtoverlay=IMX477,cam0);
  • For all Raspberry Pi: This Arducam for Raspberry Pi camera is compatible with all Raspberry Pi;
  • What you will get: 1 x Pi hq camera(with a 1/4" tripod adapter), 1 x dust cover, 1 x C-CS adapter, 1 x 15-22pin Pi camera cable, 1 x 15-15pin Pi camera cable;
  • High resolution: This camera module can offer high-resolution images with its 12.3MP IMX477 sensor, the max resolution is 4056*3040 pixels.
  • Wide Application: This RPI camera can be used as a 3D printer camera, or home security monitor and can serve for Artificial Intelligence, like facial recognition, high-speed capturing, and so on.

Fix common streaming problems

The player opens but shows no video

  • Check that the sender’s destination IP and port match the receiving player’s settings.
  • Confirm the client supports the chosen transport and media packaging. If unencapsulated H.264 over UDP fails, try the MPEG-2 Transport Stream approach and matching client examples in Raspberry Pi’s camera software guide.
  • For MediaMTX, confirm that the server is running, the path name matches the URL, and the browser or RTSP client can reach the Pi on the configured port.

The stream pauses or drops data

Raspberry Pi notes that an undersized UDP receive buffer can cause dropped data and visible pauses. Only consider buffer tuning if you observe this symptom. Its guidance says Raspberry Pi OS Bookworm users should add the settings to /etc/sysctl.conf, then reload the settings or reboot; follow the exact values and procedure in the official camera software guide for your system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You are planning to add image processing

For projects that need image processing or additional camera operations, the Picamera2 manual describes using Python scripts with MediaMTX instead of the plain native camera source. That route adds complexity and is separate from the basic live-view configuration above.

Rank #3
Arducam for Raspberry Pi Camera Module V2-8 Megapixel,1080p IMX219 Raspberry Pi 5 Camera
  • What Will You Get: An 8mp Arducam for Raspberry Pi camera V2 with a 15cm original FFC cable for model A and B and a 15cm FPC cable for pi zero & w.
  • Sensor: 8 megapixel IMX219, Max. resolution: 3280 (H) x 2464 (V)
  • Frame Rates: 1080p47, 1640 × 1232p41 and 640 × 480p206
  • Recommended Power Supply: DC 5V, above 1.8A
  • Typical Usage Scenarios: this tiny camera board can be used for monitoring Octoprint 3D Printer, Home security and surveillance, dashcam or other machine vision application. Please search ASIN: B09TNG4V55/B09TKYXZFG to get Arducam for Raspberry Pi Camera ABS Case and Tripod Case Kit.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Other server options

Raspberry Pi also names MistServer and go2rtc alongside MediaMTX as third-party server options. Their suitability depends on the protocols and configuration you need; Raspberry Pi does not identify one server as universally best. For the two basic routes here, MediaMTX is the documented example with both a browser address and an RTSP address.

Quick Recap

Bestseller No. 1
Arducam 5MP Camera for Raspberry Pi, 1080P HD OV5647 Camera Module V1 for Raspberry Pi5/4/3/3B+, and Other A/B Series
Arducam 5MP Camera for Raspberry Pi, 1080P HD OV5647 Camera Module V1 for Raspberry Pi5/4/3/3B+, and Other A/B Series
Integral IR filter; Still picture resolution: 2592 x 1944; Max video resolution: 1080p
$6.99
Bestseller No. 3
Arducam for Raspberry Pi Camera Module V2-8 Megapixel,1080p IMX219 Raspberry Pi 5 Camera
Arducam for Raspberry Pi Camera Module V2-8 Megapixel,1080p IMX219 Raspberry Pi 5 Camera
Sensor: 8 megapixel IMX219, Max. resolution: 3280 (H) x 2464 (V); Frame Rates: 1080p47, 1640 × 1232p41 and 640 × 480p206
$16.99
Bestseller No. 4
Arducam for Raspberry Pi Zero Camera Module, 5MP OV5647 1080P Webcam on Raspbian (Cables in 2 Kinds)
Arducam for Raspberry Pi Zero Camera Module, 5MP OV5647 1080P Webcam on Raspbian (Cables in 2 Kinds)
Specs - 5MP 1080P OV5647, crisp photos, and sharp videos with a decent frame rate
$9.49
Rank #4
Arducam for Raspberry Pi Zero Camera Module, 5MP OV5647 1080P Webcam on Raspbian (Cables in 2 Kinds)
  • Pi compatible - Work natively with all Raspberry Pi models for your new project or drop-in replacement
  • Both cables - 2 cables included so you can switch between the camera connectors for the Pi Zero and Model A&B series
  • Specs - 5MP 1080P OV5647, crisp photos, and sharp videos with a decent frame rate
  • Easy to use – Easy setup with paper instructions to help you activate the camera feature on Raspbian.
  • Application: Small form factor for a tiny home video security system, monitoring 3D printer or other camera projects. Feel free to contact Arducam if you need any help with the product

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.