Reputation: 879
I have some troubles to implement VLC player to my project. I need overlay video with QgraphicsView (basicaly canvas) so I be able to draw things. I've tried to do it this way:
I've read on this forum, that somebody extracts every frame, and sets it as pixmap to an object. I saw the code, but furtunatelly, I don't get it, because I not C++ professional :( I am using Python bindings for Qt (PySide) and for VLC. Please help, it really bothers me :(
http://forum.videolan.org/viewtopic.php?f=32&t=68816&p=228645
Upvotes: 1
Views: 2589
Reputation: 1
i know this question was a while back but i just ran across this while trying to figure it out today and figure i'd put up my solution.
pretty much your 3rd attempt was correct but you have to also make the QGraphicsView you're using transparent because that's the white you're seeing. you just have to make sure the view tracks with your window manually with setGeometry and you're set.
#assuming you're inside a main window that is self
scene = QGraphicsScene()
scene.setBackgroundBrush(QBrush(QColor(255, 0,0,90))) #creates a semitransparent red over VLC
view = QGraphicsView(self)
view.setScene(self.scene)
view.setGeometry(0,0,self.width(),self.height())
self.view.setStyleSheet("background: transparent");
Upvotes: 0
Reputation: 879
Lately, I've used integrated Phonon player. It's posible to add Phonon video widget as GraphicsItem thru QGraphicsProxyWidget. Works like a charm with K-Lite codec pack on Windows background.
Upvotes: 1