JpegRtspCamera
Sample RTSP server streaming MJPEG video from PC camera
Install / Use
/learn @petergaal/JpegRtspCameraREADME
JpegRtspCamera - RTSP server streaming MJPEG video from PC camera
###A server side demo project, using live555 and OpenCV library.
This project was originally written in 2015, making a basic framework for an intelligent camera running on Linux, developed and debugged first in Visual Studio 2013, then transferred to Linux. Haven't tested the Linux version yet but will test it later and make build files also for Linux. At least I updated the project files to Visual Studio 2015 and verified if everything works.
It is quite hard to start with any similar project as there are very few resources on the internet about it. So I decided to make this project available on GitHub to help other developers with quick start on a similar project.
You will need to download OpenCV library, preferably 2.4.13 and unpack it. The installer is available here. On my installation I unpacked it into folder "D:\OpenCV2.4.13" so if you will unpack somewhere else you'll need to update the project settings in Visual Studio (include and library paths). The project should work with any 2.4 OpenCV version, at least I used it with 2.4.9, 2.4.10 and 2.4.10 in the past without problems. I am not sure if it will work with OpenCV 3.0.X version or newer, but you can try and tell me.
OpenCV is used here as an image processing library. It's possible to use something else in your project for grabbing a video stream, some USB (or other) cameras will support jpeg and H.264 directly so maybe you can grab it using DirectShow (on Windows) or V4L2 (on Linux). Here the goal of the project is different, you can grab a raw image, do some manipulation (transformation, put a text or logo, etc.) on it with OpenCV, then compress with image encoder and send this out to the RTSP part. But if you need just to broadcast image directly without modification then DirectShow/V4L2 is a good option which will save you CPU time.
Other library used here is live555, known library for RTSP. Live555 is also used in VLC. You don't need to download as this is part of the project directly with source code.
After installing OpenCV you can compile the project and everything should work. Make sure you have a working camera device on your system, otherwise the program will fail. The program takes on parameter where you specify the frame rate (in units of frames per second).
JpegRtspCamera.exe <fps>
Currently the resolution for video is 640x480 but you can change it to something else (at least from the values which are supported by the camera or library).If the frames are too big make sure you will allocate bigger buffer in the source code (CameraJPEGDeviceSource.cpp, MAX_SIZE, currently 256kB).
Testing
Run the program with desired frame rate. After starting it will print the current RTSP url, for example:
rtsp://192.168.1.1/jpeg
. You can open this URL in VLC, using Media, Open Network Stream... from the main menu. Enter url, press play. You can open more VLC clients, I tested it with 5 player session and it worked without problem.
Related Skills
qqbot-channel
348.0kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.2k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
348.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
Design
Campus Second-Hand Trading Platform \- General Design Document (v5.0 \- React Architecture \- Complete Final Version)1\. System Overall Design 1.1. Project Overview This project aims t
