Qt Video Replayer¶
Authors: Holoscan Team (NVIDIA)
Supported platforms: x86_64, aarch64
Last modified: March 18, 2025
Language: C++
Latest version: 1.0.0
Minimum Holoscan SDK version: 0.6.0
Tested Holoscan SDK versions: 0.6.0
Contribution metric: Level 1 - Highly Reliable
This application demonstrates how to integrate Holoscan with a Qt application. It support displaying the video frames output by a Holoscan operator and changing operator properties using Qt UI elements.
flowchart LR
subgraph Holoscan application
A[(VideoFile)] --> VideostreamReplayerOp
VideostreamReplayerOp --> FormatConverterOp
FormatConverterOp --> NppFilterOp
NppFilterOp --> QtVideoOp
end
subgraph Qt Window
QtVideoOp <-.-> QtHoloscanVideo
end
The application uses the VideostreamReplayerOp to read from a file on disk, the FormatConverterOp to convert the frames from RGB to RGBA, the NppFilterOp to apply a filter to the frame and the QtVideoOp operator to display the video stream in a Qt window.
The QtHoloscanApp class, which extends the holoscan::Application
class, is used to expose parameters of Holoscan operators as Qt properties.
For example the application uses a QML Checkbox is used the set the realtime
property of the VideostreamReplayerOp
operator.
CheckBox {
id: realtime
text: "Use Video Framerate"
checked: holoscanApp.realtime
onCheckedChanged: {
holoscanApp.realtime = checked;
}
}
The QtHoloscanVideo is a QQuickItem which can be use in the QML file. Multiple QtHoloscanVideo
items can be placed in a Qt window.
import QtHoloscanVideo
Item {
QtHoloscanVideo {
objectName: "video"
}
}
Run Instructions¶
This application requires Qt. For simplicity a DockerFile is available. To generate the container run:
./dev_container build --docker_file ./applications/qt_video_replayer/Dockerfile
The application can then be built by launching this container and using the provided run
script.
./dev_container launch
./run build qt_video_replayer
Once the application is build it can be launched with the run
script.
./run launch qt_video_replayer