How to process the frame before display in VLC media library - c++

I'm using VLC library to create a simple media player, the program will display instructions above the video. These instructions are varying in position, size and color. I need to process the video frame before it's displayed to add my drawings. How can this be done? How can I have the libvlc show this large text when changing the volume up or down?

Related

WinUI3 & Unoplatform: Drawing brush on image/video surface while playing and save it directly on original file

Hello I am building an image/video editing application (runs on window 11) using Unoplatform.
(Unoplatform internally use WinUI3)
What i want to do is
App can load image/video frame on canvas
Use brush effect on frame surface like drawing pad feature
During playing video, user can add effect on every frame and modified frame saved right away on original file.
During playing video, do computer vision processing to recognize object and add mark on frame
Audio must playable
So my question is,
How can I add an effect to only a specific frame in the original video and save it using Unoplatform(or WinUI3) API?
Is it possible to play video on canvas view and get frame by frame from MediaPlayer?

QT widget How to get RGB Buffer from QCamera

I am porting an video streamer application to QT (from HTML), I just had the webcam working using QT, and now I want to know How can I get the RGB Video buffer from a QT Camera? All the samples I can see is capturing image to a file.
I am using QT Widgets and not QML since its a desktop application.
What I am trying to do is to get the buffer image of the camera, compress it and send to network.
And I want to trigger this manualy since I want to call the capture of next frame when all the compression and sending is done to prevent timing issue.

Can libvlc display multiple videos at the same time in the same window?

When libvlc starts to display video, it launch new window, can I do otherwise and display multiple videos in the same window?
When libvlc starts to display video, it launch new window
That is the default behavior when you have not told libvlc in which window to draw the video. See https://stackoverflow.com/a/65060714/4064749
libvlc currently cannot draw multiple videos in a single window handle. However, you could arrange several windows together and have multiple mediaplayers draw to each of them, creating the illusion that multiple videos are played in the same window.

Drawing items on VLC object

Recently I have tried to do some graphics on the top of VLC video using vlc-qt (which provides a video widget). The approach was trying to draw something on the widget. But it failed duo to the fact that vlc-qt's widget uses an internal widget to render video. (See more details here)
Now I'm trying to do something different. I want to try drawing text (or some rectangles) on the VLC media itself (not the widget). I suppose it's the way how VLC media player renders subtitles (isn't it?)
So the question is this: Having a vlc-qt interface, how can I access underlying vlc object and draw something on it [using libVLC API]?
I'm afraid the only way to do it with libvlc is to use libvlc_video_set_callbacks + libvlc_video_set_format_callbacks. It will decode media stream's frames to memory, which you could use as you wish.

The best way to display video from camera in Qt WebKit bridge

I'm developing an application that loads frames from an ethernet camera and displays these frames in an element within a Qt QWebView.
So I would like to ask, which is the best or the most efficient way to display images in sequence from the camera, so that it would display as a live video for the user.