- if (KdenliveSettings::rmd_path().isEmpty()) {
- QString rmdpath = KStandardDirs::findExe("recordmydesktop");
- if (rmdpath.isEmpty()) video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("Recordmydesktop utility not found,\n please install it for screen grabs")));
- else KdenliveSettings::setRmd_path(rmdpath);
- }
- if (!KdenliveSettings::rmd_path().isEmpty()) video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", m_capturePath)));
+ if (KdenliveSettings::ffmpegpath().isEmpty()) {
+ QString exepath = KStandardDirs::findExe("ffmpeg");
+ if (exepath.isEmpty()) {
+ // Check for libav version
+ exepath = KStandardDirs::findExe("avconv");
+ }
+ if (exepath.isEmpty()) showWarningMessage(i18n("ffmpeg or avconv not found,\n please install it for screen grabs"));
+ else KdenliveSettings::setFfmpegpath(exepath);
+ }
+ if (!KdenliveSettings::ffmpegpath().isEmpty()) {
+ if (!Render::checkX11Grab()) {
+ // FFmpeg does not support screen grab
+ showWarningMessage(i18n("Your FFmpeg / Libav installation\n does not support screen grab"));
+ m_recAction->setEnabled(false);
+ }
+ else video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", m_capturePath)));
+ }