Unsolved How to record video in windows using Qt?
-
@Ramiz There are signals for state/status changes you should connect to them to see whether anything is happening.
-
I am new to QT and what I did I create a button and on that button I write the camera recording code and image capturing code.Image capturing is working fine but recording is not.
Also I write the connect function that you told me on button click.
Did I do it right? -
@Ramiz Should be fine. Are your slots called? Recording video depends on availability of codecs, are you on Windows, MacOS or Linux?
-
I am on windows 10 and Yes My slots are called.
My camera works when slots are called also when I clicked on stop record it ask me where you want to save the file in mp4.
After giving a directory to save I couldn't find the file as well but I can see the file in my Quick access. -
@Ramiz So it actually recorded something? Can you open these files?
And in your slots you should print out the state/status to see what happens. -
The size of these files are 0 bytes and they are not opening.Whenever I tried to open any of these files, get an error cant open file.
-
@Ramiz Do you get QMediaRecorder::RecordingState or or QMediaRecorder::RecordingStatus or anything else?
-
No I didn't get QMediaRecorder::RecordingState or or QMediaRecorder::RecordingStatus
-
I don't think video recording with QT is possible on Windows, see: http://doc.qt.io/qt-5/qtmultimedia-windows.html
Also, check the return value of
mCamera->isCaptureModeSupported(QCamera::CaptureVideo);
. -
It means I cannot control an IP camera through QT on windows?
-
Hi,
Depending on the camera type and how it is seen by the system, you may have to write a small QCamera backend but it's doable.