QVideoStream is a lightweight, high-performance video streaming library written in C++ for Qt. It leverages FFmpeg and QSGTextureProvider to deliver real-time video rendering directly in QML. Whether you're streaming from RTSP cameras, reading local files, or capturing webcam input, QVideoStream provides a smooth and efficient solution.
- ✅ Real-time video playback (RTSP/local/webcam)
- 🚀 Hardware (GPU) and software (CPU) decoding
- 🧩 Easy integration with QML via
VideoStreamitem - 🔁 Based on
QQuickFramebufferObjectandQSGTextureProvider - 📦 Minimal dependencies — just Qt and FFmpeg
- Qt 5/6+ with QML/QtQuick support
- FFmpeg (included or linked)
- Support for
QQuickFramebufferObject
qmlRegisterType<VideoRendererItem>("VideoStream", 1, 0, "VideoStream");import QtQuick
import QtQuick.Controls
import VideoStream 1.0
ApplicationWindow {
visible: true
width: 1280
height: 720
VideoStream {
id: player
anchors.fill: parent
url: "rtsp://your_stream_url"
forceCpuMode: false
}
Button {
text: "Play"
onClicked: player.play()
}
Button {
text: "Stop"
anchors.right: parent.right
onClicked: player.stop()
}
}- Clone the repository and add the
qvideostream/sources to your Qt project. - Register
VideoRendererItemin yourmain.cppfile. - Add the
ffmpegbinaries if not already linked dynamically. - Compile and run your Qt application.
VideoDecoder(C++ thread) uses FFmpeg to extract frames.- Decoded RGB frames are emitted as Qt signals.
VideoRendererItemreceives and renders them withQSGSimpleTextureNode.
This project is licensed under the MIT License. See the LICENSE file for details.
