Converting videos
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 supports playing video files through its widget, it does not currently support video conversion. Fear not! You can 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:
- Download
FFmpeg
(a static package) from http://ffmpeg.zeranoe.com/builds and extract the contents to your preferred location – for example,C:/FFmpeg/
. - Open Qt Creator and create a new Qt Widgets Application project by going to File | New Project....
- Open
mainwindow.ui
– we’re going to work on the program’s user interface. Its UI is very similar to the previous example, except that we add an extra text-edit widget to the canvas, just...