Results 1 to 3 of 3

Thread: Using QT to record a Video Playback

  1. #1
    Join Date
    May 2017
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Using QT to record a Video Playback

    Hi, basically I have a QMediaPlayer that is playing a video file.
    I would like to record the video playing and saved it into another file.

    May I know is there any libraries or classes I can use to fulfill this requirement.
    I asked this question in stackoverflow and 0 person could answer me.

    I hope there is some experts here to guide me to find a solution for this problem.


    Updated:
    So I decided to use the following methods:

    I will use the widget->grab() method to get a list of QPixmap (Video Frames)
    then I will pass them to a QThread for processing.

    However, I realized the widget->grab() method is too slow.

    Qt Code:
    1. QPixmap snapshot = videoPlayerView->grab();
    2. emit passFrames(snapshot);
    To copy to clipboard, switch view to plain text mode 

    My Video that is streaming was lagging when I am grabbing the frames. My FPS is 25 which means I have to grab a frame every 40ms.
    Is there any other way I could obtained the frames or screenshots of my video?

    - I am unable to put the grabbing in a thread as the widget can only be accessed in the main thread.

    Can anyone help or maybe suggest another solution for me?
    Just a direction or something I could try.

    Thanks
    Last edited by Avan; 11th May 2017 at 10:54. Reason: updated contents

  2. #2
    Join Date
    Sep 2010
    Posts
    17
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Using QT to record a Video Playback

    With Linux you can wrap FFMPEG Library or applications ( even its converter utility)
    With Windows you can wrap MediaFoundation or DirectShow Library or applications
    Using a Qt MediaPlayer is not a (good) practical strategy.

  3. #3
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Thanks
    2
    Thanked 43 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Using QT to record a Video Playback

    +100500 to srsr

Similar Threads

  1. Replies: 0
    Last Post: 21st December 2012, 16:56
  2. STB Video Playback
    By akhilesh_s in forum Qt for Embedded and Mobile
    Replies: 6
    Last Post: 19th July 2011, 11:50
  3. Playback video on QT Widget
    By Ratheendrans in forum Qt for Embedded and Mobile
    Replies: 7
    Last Post: 1st June 2010, 13:44
  4. 4.5 + video playback on windows
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2009, 09:58
  5. Video freezes during mpeg video playback using Phonon
    By davejames in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2009, 08:45

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.