qtmultimedia

I have two webcams, but QCameraInfo::availableCameras returns empty array

▼魔方 西西 提交于 2021-02-10 16:15:23
问题 According to the documentation, QCameraInfo::availableCameras should return list of available cameras. There's no catch to it according to the docs. But still, I have two webcams and the array of available cameras is returned empty. What can I do? Is this even in the scope of programming, or does this mean Qt only supports limited subset of webcams? The OS I'm using right now is Windows 7x64. 回答1: I have this Problem too.Then I read about the example. I found that once you have declared

Force QMediaPlayer to update position accurately for video scrubbing application?

∥☆過路亽.° 提交于 2021-02-07 22:48:19
问题 I am writing an application which will allow the user to scrub through an open video. Developing on Windows 7/8 with Qt 5.3, I have been using QMediaPlayer and QVideoWidget following the qvideowidget example project. The result has been pretty good, except that the QVideoWidget seems only to update during idle time. Still, it's a good start and it's usable. However, when I build on Mac OS 10.10 (again with Qt 5.3), scrubbing behaves as though there were only one frame per second in the video.

Force QMediaPlayer to update position accurately for video scrubbing application?

Deadly 提交于 2021-02-07 22:48:19
问题 I am writing an application which will allow the user to scrub through an open video. Developing on Windows 7/8 with Qt 5.3, I have been using QMediaPlayer and QVideoWidget following the qvideowidget example project. The result has been pretty good, except that the QVideoWidget seems only to update during idle time. Still, it's a good start and it's usable. However, when I build on Mac OS 10.10 (again with Qt 5.3), scrubbing behaves as though there were only one frame per second in the video.

No decoder available for type 'video/x-h264

隐身守侯 提交于 2021-02-07 06:25:09
问题 I am trying to run one of qt sample apps without any modification. It is called player and it is a multimedia widget demonstration. My system is Ubuntu 16.04 64bit. When I try to play a video, I see the following error in the console: No decoder available for type 'video/x-h264 Here is the full error after trying two different videos: Starting /home/aras/Qt5.7.0_Sept2016/Examples/Qt-5.7/multimediawidgets/build-player-Sept2016-Debug/player... Warning: "No decoder available for type 'video/x

How to solve “QML module not found (QtMultimedia)”

风流意气都作罢 提交于 2021-01-29 08:12:44
问题 I'm importing QtMultimedia 5.4 to use a Camera but its raising this error QML module not found (QtMultimedia) . I've tried to echo the $QML_IMPORT_PATH as well as the $QML2_IMPORT_PATH which gave nothing. Thank you for you help. 来源: https://stackoverflow.com/questions/53378451/how-to-solve-qml-module-not-found-qtmultimedia

PyQt QMediaPlayer setPosition rounds the position value

梦想与她 提交于 2021-01-28 09:50:33
问题 I have an app that's designed to help synchronise an experiment video and data signals. The App has a video widget and a slider that can set the temporal position of the video. However, QMediaPlayer will only set the position at 500mSec/1000mSec intervals (in my app 500mSec/in the contrived app 1000mSec) while the video is shot at 50fps implying 20mSec intervals. This makes synchronisation pretty useless. I've added an output of the position before and after the position change. Any help

How to draw QtGraphicsView on Top of QVideoWidget with transparency

你离开我真会死。 提交于 2020-06-23 12:43:12
问题 I am trying to overlay some graphics(QtGraphicsView) on top of video player(QVideoWidget). i have already tried setting QtGraphicsView subclass stylesheets to transparent and background brush and none is working. #self.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(30, 30, 30, 3))) #self.setStyleSheet("background-color:rgba(0,0,0,0)") #self.setStyleSheet("background:rgba(0,0,0,0)") self.setStyleSheet("background:transparent") self.setStyleSheet("background-color:transparent") self.setStyleSheet

Modifing and displaying QVideoFrames obtained in QAbstractVideoSurface

泪湿孤枕 提交于 2020-06-03 16:03:46
问题 I have very a simply application written in QT in which I want to display a movie by using QMediaPlayer , but before I will display any frame I would like to detect on it some objects and mark them by drawing a rectangle over it. I've read in http://doc.qt.io/qt-5/videooverview.html that I can access each frame by subclassing QAbstractVideoSurface and so I dit it. class VideoSurface : public QAbstractVideoSurface { Q_OBJECT bool present(const QVideoFrame &frame) override { if (surfaceFormat()

Modifing and displaying QVideoFrames obtained in QAbstractVideoSurface

前提是你 提交于 2020-06-03 16:02:01
问题 I have very a simply application written in QT in which I want to display a movie by using QMediaPlayer , but before I will display any frame I would like to detect on it some objects and mark them by drawing a rectangle over it. I've read in http://doc.qt.io/qt-5/videooverview.html that I can access each frame by subclassing QAbstractVideoSurface and so I dit it. class VideoSurface : public QAbstractVideoSurface { Q_OBJECT bool present(const QVideoFrame &frame) override { if (surfaceFormat()

QMediaPlayer. How to play video with multiple audio?

会有一股神秘感。 提交于 2020-05-15 08:11:41
问题 There is a video file with two audio tracks: Duration: 01:05:09.12, start: 0.000000, bitrate: 2781 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 1998 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 384 kb/s Playing it with this code: self.player = QMediaPlayer() self.player.setMedia