Results 1 to 2 of 2

Thread: Qt Screencast

  1. #1
    Join Date
    Nov 2007
    Posts
    16
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Qt Screencast

    Hello,

    I was wondering if anyone has any ideas of how to record and playback a screencast from within Qt. At this point sound is *not* a must. I would like it to be a Qt only solution, and thus cross-platform. I should mention I do not need it to record other programs except Qt ones. In other words, I would like to add a module to my program that records and plays screencasts of that program and not other programs. Thanks!

    Josh

  2. #2
    Join Date
    Jun 2009
    Posts
    6
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt Screencast

    If you want to produce an actual video (avi / mpeg / flash / etc.), I don't think you can have a Qt only solution, because Qt doesn't have any video encoding capabilities (at least none that I'm aware of). Phonon is part of Qt, but it is only for playback of multimedia content.

    Independent open source cross-platform tools and libraries for video encoding do exist however.

    Qt on it's own can help you collect the image data itself though: you could set up a QTimer that periodically grabs a screenshot using QPixmap::grabWindow or QPixmap::grabWidget.

    To then get a video from this image sequence, you might:



    Once you have a proper video file, you can use Phonon for playback in your Qt application.

    If the whole video encoding part seems too much of a hassle, and all you want is to replay the screencast within you Qt app, then maybe you can get away with just storing the image sequence as png's or similar (as mentioned under the first bullet point above), and then at a later time "replay" them by implementing your own primitive image sequence player (e.g., reimplement QWidget::paintEvent to draw the current image, with a QTimer to consecutively mark the next image as current, and some kind of framework running in the background to continuously load the next few pictures into memory while releasing old memory).
    However, note that this is just an idea - I don't know if you will achieve good playback performance with this approach, and at least the space usage on disk will be really large (for longer screencasts).
    It would be 100% Qt though... ;-)

    I hope I could be of some help

    auryce74

  3. The following 2 users say thank you to auryce74 for this useful post:

    gboelter (11th December 2009), jgrauman (14th June 2009)

Similar Threads

  1. Qt Creator screencast
    By jdarnold in forum Qt Tools
    Replies: 0
    Last Post: 11th June 2009, 15:43

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.