Video file generation from Qt application, other than FFmpeg



  • We will not be able to use the FFmpeg library for video file generation from our Qt application. Are there any other tools/products usable with Qt which can do basic generation of video files, given a sequence of QImages or QPixmaps? We don't need audio with the video.


  • Qt Champions 2016

    Hi
    Can I ask why you cannot use FFmpeg ?
    Would animated gif be enough ?



  • @mrjj Re: ... Can I ask why you cannot use FFmpeg? ... Would animated gif be enough?

    It looks like FFmpeg is really NOT an option for commercial applications -- See for example: https://www.ffmpeg.org/legal.html (see especially the "Note that FFmpeg ..." sentence and the last two paragraphs on the page).

    Our current requirement for generating video FILES (e.g. .avi, .mpeg, animated .gif, and/or .mp4) is very general. Just ONE of those video file types would be enough for now. (So, yes, animated gif would be enough).

    BTW, a "Windows Only" solution would work for us. We really need to be squeaky clean on licensing. So we may be willing to pay a reasonable fee for the ability to generate (create) video FILES given a sequence of QImages or QPixmaps. (Or at least with the possibility of getting frame image DATA from either of those Qt classes into the thing).


  • Qt Champions 2016

    @Phil_W
    Hi Thank you for the clarification.
    Not sure if this is too simple but this class
    https://github.com/ginsweater/gif-h/blob/master/gif.h
    can write animated gifs.
    It just compiled and worked and the only issue there will be is the
    format of QImage format vs the format the class expectes.
    It ignores alpha and expects RGB8 so You will need to copy/convert so
    the speed will not be insane during creation.
    Also the size of the gif is pretty big. My 800x600, 25 frames is 16 MB.

    This project also look good.
    https://github.com/kohler/gifsicle
    Seems to permit any use.

    Windows only also using the native API
    http://www.codeproject.com/Articles/4169/A-simple-interface-to-the-Video-for-Windows-API-fo
    BUt will need some conversion code too as it uses dib sections.

    I could not find a good Qt version as all seems to use FFmpeg ;)


  • Moderators

    It's a horrors and nightmares story when it comes to video codecs patenting and licencing. It's easy to get tripped. Even when you believe everything is ok some random company can come out of nowhere and sue you for a possibility (often not substantiated) of some obscure patent infringement.
    It's really a minefield but you could try Google's WebM project and its libvpx encoder library. There's also an external encoder app. The SDK isn't terribly pleasant to use but the codec is pretty good and it gives you at least some peace of mind that a large company backs you up in the legal space. Here are some usage samples.



  • Thanks for all responses, so far. (I'd like to keep this question open, in case anyone has other ideas on other options, and stuff).

    I posed a question about a Qt5-only solution vaguely suggested in a related forum:

    • Getting QImages into QMediaRecoder to create video files (e.g. avi, mp4, or animated gif)? ...

    --


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.