Results 1 to 10 of 10

Thread: Qt - Overlay QGraphicsView over vlc video

  1. #1
    Join Date
    Jun 2013
    Posts
    6
    Qt products
    Platforms
    Windows

    Default Qt - Overlay QGraphicsView over vlc video

    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:

    Point winId pointer to QgraphicsView. Video renders just fine, but it renders on top of the object, so my graphics items are under video layer. => fail
    Create new QGraphics object as child of my main QGraphics object and then render video to this child. Result is the same as above. => fail
    Overlay QWidget with rendered video with my QGraphicsView (same pos and size). I've set transparent background so I can see overlayed widgets but video under this layer just won't render. I stays white but I can hear its playing. => fail

    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....68816&p=228645

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt - Overlay QGraphicsView over vlc video

    Is using VLC for the video a hard requirement?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2013
    Posts
    6
    Qt products
    Platforms
    Windows

    Default Re: Qt - Overlay QGraphicsView over vlc video

    Sorry, but I don't understand your question.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt - Overlay QGraphicsView over vlc video

    I'm asking if you can use a different framework for displaying video.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jun 2013
    Posts
    6
    Qt products
    Platforms
    Windows

    Default Re: Qt - Overlay QGraphicsView over vlc video

    I think we can, but VLC was nice solution because of multiplatform, codes support, etc. What would you suggest? It needs to work at least on Windows and Linux and work with Python.

    I just need to display video and be able to draw on it.
    Last edited by m1lhaus; 28th June 2013 at 10:53.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt - Overlay QGraphicsView over vlc video

    I would suggest to use the multimedia module which is part of Qt.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jun 2013
    Posts
    6
    Qt products
    Platforms
    Windows

    Default Re: Qt - Overlay QGraphicsView over vlc video

    Would I be able to somehow overlay it by QgraphicsView or use it as background for Qgraphicsview and be able to draw things? I need to annotate faces and other things in video by rectangles, circles, etc.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt - Overlay QGraphicsView over vlc video

    Quote Originally Posted by m1lhaus View Post
    Would I be able to somehow overlay it by QgraphicsView or use it as background for Qgraphicsview and be able to draw things?
    Yes.

    http://doc-snapshot.qt-project.org/q...videoitem.html
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Jun 2013
    Posts
    6
    Qt products
    Platforms
    Windows

    Default Re: Qt - Overlay QGraphicsView over vlc video

    Problem is that QGraphicsVideoItem is not available in PySide and PyQt 5.0. But I've found it in PyQt 5.0.1 development snapshot so I can try it.

  10. #10
    Join Date
    Jun 2013
    Posts
    6
    Qt products
    Platforms
    Windows

    Default Re: Qt - Overlay QGraphicsView over vlc video

    Lately, I've used integrated Phonon player. It's easy to add Phonon video widget as QGraphicsItem through QGraphicsProxyWidget. Works like a charm with K-Lite codec pack on Windows background.

Similar Threads

  1. Video and OSD Overlay
    By akhilesh_s in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 12th September 2012, 13:46
  2. Creating a background video with menu overlay
    By Raz0rEdge in forum Qt Programming
    Replies: 0
    Last Post: 21st August 2012, 03:11
  3. Replies: 0
    Last Post: 8th April 2010, 11:08
  4. Simulating Video on QLabel or QGraphicsView
    By forrestfsu in forum Qt Programming
    Replies: 9
    Last Post: 21st March 2007, 10:39

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.