Video conversion

In this recipe, we will create a simple video converter using Qt and FFmpeg, a leading multimedia framework that is free and open source. Although Qt does support playing video files through its widget, it does not support video conversion at the moment. Fear not! You can actually still achieve the same goal by making your program cooperate with another standalone program through the QProcess class provided by Qt.

How to do it…

Let's make a simple video converter with the following steps:

  1. Download FFmpeg (static package) from and extract the contents to C:/FFmpeg/.
  2. Then, open up Qt Creator and create a new Qt Widgets Application project by going to File | New File or Project….
  3. After that, open up

Get Qt5 C++ GUI Programming Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.