I am new to Qt and would like to ask advice. I want to stream the video from an Axis A8105-E IP camera. The same RTSP stream URL works in VLC and with OpenCV. However, using the QMediaPlayer only a few frames of the video displays and then the video freezes, but audio is still coming through. An exception is thrown when debugging (in EVR!MFCreateVideoSampleAllocator). So I can access the camera, but I think there are some incompatible settings between the camera and codec used, causing the video to fail?
Windows 10 64-bit application
Qt 5.13.0 using Kit Desktop MSVC2017 64 bit
Codecs installed at the moment: K-lite codec pack Full (recommended installation)
MainWindow::MainWindow(QWidget *parent) :
setWindowTitle("RTSP test Axis camera");
QVideoWidget *_vw1 = new QVideoWidget;
QMediaPlayer *_player1 = new QMediaPlayer;
QGridLayout *layout = new QGridLayout;
QWidget *win = new QWidget();
_player1->setMedia(QUrl("rtsp://username:password@XXX.XXX.XXX.XXX/axis-media/media.amp?videocodec=h264&resolution=640x480")); //XXX = ip address
Can you please provide any guidance/recommendations based on experience where Axis cameras have been integrated with Qt on Windows? I am happy to try a different codec if you can recommend any known to work.
Thank you for your help!