Use FFmpeg to stream your webcam on Ubuntu with RTMP

7 February 2021

Use FFmpeg to stream your webcam on Ubuntu with RTMP

You could always use OBS from any GUI for Ubuntu to stream the live feed of your webcam. But what if you didn't install Ubuntu with a GUI? But even more important, why use OBS that uses a lot of resources when you can use this simple command to stream your webcam using a lot less resources? In any case, here's a simple command that streams your /dev/video0 device (usually your webcam) to an RTMp server running on the same host.

ffmpeg -f v4l2 -framerate 25 -video_size 1280x720 -i /dev/video0 -threads 0 -f flv "rtmp://127.0.0.1/stream/webcam"
Table of Contents

Leave a Reply

Your email address will not be published. Required fields are marked *

Similar Content

23 January 2021
Introduction to the new how-to article in the Knowledge Base.

I wrote a new guide on setting up your own live-stream server. Mostly due to your requests. I took the opportunity to simplify and shorten the guide a bit. If you follow this guide step by step, and use your brain a tiny bit, you'll be fine. This guide has so far been tested on […]

× Read More ×
19 June 2025
Choosing the live-stream host that suits your needs

Discover how to choose the right live-stream host for your organization. Compare popular platforms like DaCast, Wowza, Vimeo, Kick, ReStream and IBM.

× Read More ×
Copyright © 2025. 
All rights reserved.