[proxy]
Normal MPEG=-f mpegts -acodec libmp3lame -ac 2 -ab 128k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -vb 400k;ts
+[screengrab]
+X246 mute=-vcodec libx264 -preset fast -threads 0;mkv
+X246 with audio=-f alsa -i pulse -acodec pcm_s16le -vcodec libx264 -preset fast -threads 0;mkv
+
[video4linux]
Normal MPEG=f=mpeg acodec=mp2 ab=128k ar=48000 vcodec=mpeg2video minrate=0 vb=4000k;mpg
setWindowTitle(i18n("Manage Encoding Profiles"));
profile_type->addItem(i18n("Proxy clips"), 0);
profile_type->addItem(i18n("Video4Linux capture"), 1);
- profile_type->addItem(i18n("Decklink capture"), 2);
+ profile_type->addItem(i18n("Screen capture"), 2);
+ profile_type->addItem(i18n("Decklink capture"), 3);
button_add->setIcon(KIcon("list-add"));
button_edit->setIcon(KIcon("document-edit"));
case 1:
group = "video4linux";
break;
+ case 2:
+ group = "screengrab";
+ break;
default:
- case 2:
+ case 3:
group = "decklink";
break;
}
<label>default v4l encoding profile.</label>
<default>0</default>
</entry>
-
- <entry name="rmd_capture_audio" type="Bool">
- <label>capture audio.</label>
- <default>true</default>
+
+ <entry name="grab_profile" type="UInt">
+ <label>default screen grab encoding profile.</label>
+ <default>0</default>
</entry>
-
- <entry name="rmd_use_jack" type="Bool">
- <label>use ffmpeg oss audio capture instead of external program.</label>
- <default>false</default>
+
+ <entry name="grab_parameters" type="String">
+ <label>Default video4linux format.</label>
+ <default></default>
</entry>
-
- <entry name="rmd_jackports" type="String">
- <label>name of the jack ports (space separated).</label>
- <default>system:capture_1</default>
+
+ <entry name="grab_extension" type="String">
+ <label>Default screen grab file extension.</label>
+ <default></default>
</entry>
- <entry name="rmd_capture_type" type="UInt">
+ <entry name="grab_capture_type" type="UInt">
<label>capture type.</label>
<default>0</default>
</entry>
- <entry name="rmd_follow_mouse" type="Bool">
+ <entry name="grab_follow_mouse" type="Bool">
<label>follow mouse in region capture.</label>
<default>false</default>
</entry>
- <entry name="rmd_offsetx" type="Int">
+ <entry name="grab_offsetx" type="Int">
<label>x offset for video capture.</label>
- <default>1</default>
+ <default>0</default>
</entry>
- <entry name="rmd_offsety" type="Int">
+ <entry name="grab_offsety" type="Int">
<label>y offset for video capture.</label>
- <default>1</default>
+ <default>0</default>
</entry>
- <entry name="rmd_width" type="Int">
+ <entry name="grab_width" type="Int">
<label>default width for video capture.</label>
<default>1280</default>
</entry>
- <entry name="rmd_height" type="Int">
+ <entry name="grab_height" type="Int">
<label>default height for video capture.</label>
<default>720</default>
</entry>
- <entry name="rmd_audio_channels" type="Int">
- <label>number of audio channels.</label>
- <default>1</default>
- </entry>
-
- <entry name="rmd_fps" type="Double">
+ <entry name="grab_fps" type="Double">
<label>fps for video rec.</label>
<default>15.0</default>
</entry>
-
- <entry name="rmd_bitrate" type="Int">
- <label>bitrate for video capture.</label>
- <default>2000000</default>
- </entry>
-
- <entry name="rmd_quality" type="Int">
- <label>quality for video capture.</label>
- <default>63</default>
- </entry>
- <entry name="rmd_fullshots" type="Bool">
- <label>Capture full shots.</label>
- <default>false</default>
- </entry>
-
- <entry name="rmd_alsadevicename" type="String">
- <label>Name of alsa device for capture.</label>
- <default></default>
- </entry>
-
- <entry name="rmd_alsa_device" type="UInt">
- <label>Audio device for rmd capture.</label>
- <default></default>
- </entry>
-
- <entry name="rmd_path" type="String">
- <label>Path for the recordmydesktop binary.</label>
- <default></default>
- </entry>
-
- <entry name="rmd_audio_freq" type="UInt">
- <label>Audio frequency used for sound recording.</label>
- <default>0</default>
- </entry>
-
- <entry name="rmd_freq" type="String">
- <label>Audio frequency used for sound recording.</label>
- <default>48000</default>
- </entry>
-
- <entry name="rmd_alsa_buffer" type="Int">
- <label>Buffer for alsa audio rec.</label>
- <default>0</default>
- </entry>
-
- <entry name="rmd_jack_buffer" type="Double">
- <label>Buffer for jack audio rec.</label>
- <default>0.0</default>
- </entry>
-
- <entry name="rmd_hide_frame" type="Bool">
+ <entry name="grab_hide_frame" type="Bool">
<label>Hide frame around capture zone.</label>
- <default>false</default>
+ <default>true</default>
</entry>
- <entry name="rmd_hide_mouse" type="Bool">
+ <entry name="grab_hide_mouse" type="Bool">
<label>Hide mouse cursor.</label>
<default>false</default>
</entry>
m_configTranscode.profile_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
- connect(m_configCapture.kcfg_rmd_capture_audio, SIGNAL(clicked(bool)), m_configCapture.audio_group, SLOT(setVisible(bool)));
-
- m_configCapture.audio_group->setVisible(KdenliveSettings::rmd_capture_audio());
-
connect(m_configEnv.kp_image, SIGNAL(clicked()), this, SLOT(slotEditImageApplication()));
connect(m_configEnv.kp_audio, SIGNAL(clicked()), this, SLOT(slotEditAudioApplication()));
connect(m_configEnv.kp_player, SIGNAL(clicked()), this, SLOT(slotEditVideoApplication()));
connect(m_configSdl.kcfg_audio_driver, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCheckAlsaDriver()));
initDevices();
connect(m_configProject.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
- connect(m_configCapture.kcfg_rmd_capture_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateRmdRegionStatus()));
+ connect(m_configCapture.kcfg_grab_capture_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateGrabRegionStatus()));
- slotUpdateRmdRegionStatus();
+ slotUpdateGrabRegionStatus();
loadTranscodeProfiles();
connect(m_configCapture.kcfg_decklink_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDecklinkProfile()));
connect(m_configCapture.decklink_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.decklink_parameters, SLOT(setVisible(bool)));
- // v4l profile
+ // ffmpeg profile
m_configCapture.v4l_showprofileinfo->setIcon(KIcon("help-about"));
m_configCapture.v4l_manageprofile->setIcon(KIcon("configure"));
m_configCapture.v4l_parameters->setVisible(false);
connect(m_configCapture.v4l_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
connect(m_configCapture.kcfg_v4l_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateV4lProfile()));
connect(m_configCapture.v4l_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.v4l_parameters, SLOT(setVisible(bool)));
+
+ // screen grab profile
+ m_configCapture.grab_showprofileinfo->setIcon(KIcon("help-about"));
+ m_configCapture.grab_manageprofile->setIcon(KIcon("configure"));
+ m_configCapture.grab_parameters->setVisible(false);
+ m_configCapture.grab_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
+ m_configCapture.grab_parameters->setPlainText(KdenliveSettings::grab_parameters());
+ connect(m_configCapture.grab_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
+ connect(m_configCapture.kcfg_grab_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateGrabProfile()));
+ connect(m_configCapture.grab_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.grab_parameters, SLOT(setVisible(bool)));
// proxy profile stuff
m_configProject.proxy_showprofileinfo->setIcon(KIcon("help-about"));
slotUpdateProxyProfile(-1);
slotUpdateV4lProfile(-1);
+ slotUpdateGrabProfile(-1);
slotUpdateDecklinkProfile(-1);
Render::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice);
}
m_configCapture.dvgrab_info->setText(i18n("dvgrab version %1 at %2", dvgrabVersion, KdenliveSettings::dvgrab_path()));
} else m_configCapture.dvgrab_info->setText(i18n("<strong><em>dvgrab</em> utility not found, please install it for firewire capture</strong>"));
-
- if (KdenliveSettings::rmd_path().isEmpty() || !QFile::exists(KdenliveSettings::rmd_path())) {
- QString rmdpath = KStandardDirs::findExe("recordmydesktop");
- KdenliveSettings::setRmd_path(rmdpath);
- }
- if (KdenliveSettings::rmd_path().isEmpty())
- m_configCapture.rmd_info->setText(i18n("<strong><em>Recordmydesktop</em> utility not found, please install it for screen grabs</strong>"));
- else
- m_configCapture.rmd_info->setText(i18n("Recordmydesktop found at: %1", KdenliveSettings::rmd_path()));
}
KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
-void KdenliveSettingsDialog::slotUpdateRmdRegionStatus()
+void KdenliveSettingsDialog::slotUpdateGrabRegionStatus()
{
- m_configCapture.region_group->setHidden(m_configCapture.kcfg_rmd_capture_type->currentIndex() != 1);
+ m_configCapture.region_group->setHidden(m_configCapture.kcfg_grab_capture_type->currentIndex() != 1);
}
void KdenliveSettingsDialog::slotEnableCaptureFolder()
// Fill the list of audio playback / recording devices
m_configSdl.kcfg_audio_device->addItem(i18n("Default"), QString());
- m_configCapture.kcfg_rmd_alsa_device->addItem(i18n("Default"), QString());
m_configCapture.kcfg_v4l_alsadevice->addItem(i18n("Default"), "default");
if (!KStandardDirs::findExe("aplay").isEmpty()) {
m_readProcess.setOutputChannelMode(KProcess::OnlyStdoutChannel);
}
if (line.contains("capture")) {
deviceId = line.section(':', 0, 0);
- m_configCapture.kcfg_rmd_alsa_device->addItem(line.section(':', 1, 1).simplified(), "plughw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
m_configCapture.kcfg_v4l_alsadevice->addItem(line.section(':', 1, 1).simplified(), "hw:" + QString::number(deviceId.section('-', 0, 0).toInt()) + ',' + QString::number(deviceId.section('-', 1, 1).toInt()));
}
line = stream.readLine();
KdenliveSettings::setAudio_device(ix);
}
- if (!KdenliveSettings::rmd_alsadevicename().isEmpty()) {
- // Select correct alsa device
- int ix = m_configCapture.kcfg_rmd_alsa_device->findData(KdenliveSettings::rmd_alsadevicename());
- m_configCapture.kcfg_rmd_alsa_device->setCurrentIndex(ix);
- KdenliveSettings::setRmd_alsa_device(ix);
- }
-
if (!KdenliveSettings::v4l_alsadevicename().isEmpty()) {
// Select correct alsa device
int ix = m_configCapture.kcfg_v4l_alsadevice->findData(KdenliveSettings::v4l_alsadevicename());
QString card = data.section(':', 0, 0).section(' ', -1);
QString device = data.section(':', 1, 1).section(' ', -1);
m_configSdl.kcfg_audio_device->addItem(data.section(':', -1).simplified(), "plughw:" + card + ',' + device);
- m_configCapture.kcfg_rmd_alsa_device->addItem(data.section(':', -1).simplified(), "plughw:" + card + ',' + device);
m_configCapture.kcfg_v4l_alsadevice->addItem(data.section(':', -1).simplified(), "hw:" + card + ',' + device);
}
}
}
// Check encoding profiles
+ // FFmpeg
QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
if (!data.isEmpty() && (data.section(';', 0, 0) != KdenliveSettings::v4l_parameters() || data.section(';', 1, 1) != KdenliveSettings::v4l_extension())) {
KdenliveSettings::setV4l_parameters(data.section(';', 0, 0));
KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
}
+ // screengrab
+ data = m_configCapture.kcfg_grab_profile->itemData(m_configCapture.kcfg_grab_profile->currentIndex()).toString();
+ if (!data.isEmpty() && (data.section(';', 0, 0) != KdenliveSettings::grab_parameters() || data.section(';', 1, 1) != KdenliveSettings::grab_extension())) {
+ KdenliveSettings::setGrab_parameters(data.section(';', 0, 0));
+ KdenliveSettings::setGrab_extension(data.section(';', 1, 1));
+ }
+
+ // decklink
data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
if (!data.isEmpty() && (data.section(';', 0, 0) != KdenliveSettings::decklink_parameters() || data.section(';', 1, 1) != KdenliveSettings::decklink_extension())) {
KdenliveSettings::setDecklink_parameters(data.section(';', 0, 0));
KdenliveSettings::setDecklink_extension(data.section(';', 1, 1));
}
+ // proxies
data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
if (!data.isEmpty() && (data.section(';', 0, 0) != KdenliveSettings::proxyparams() || data.section(';', 1, 1) != KdenliveSettings::proxyextension())) {
KdenliveSettings::setProxyparams(data.section(';', 0, 0));
if (updateCapturePath) emit updateCaptureFolder();
- QString value = m_configCapture.kcfg_rmd_alsa_device->itemData(m_configCapture.kcfg_rmd_alsa_device->currentIndex()).toString();
- if (value != KdenliveSettings::rmd_alsadevicename()) {
- KdenliveSettings::setRmd_alsadevicename(value);
- }
-
- value = m_configCapture.kcfg_v4l_alsadevice->itemData(m_configCapture.kcfg_v4l_alsadevice->currentIndex()).toString();
+ QString value = m_configCapture.kcfg_v4l_alsadevice->itemData(m_configCapture.kcfg_v4l_alsadevice->currentIndex()).toString();
if (value != KdenliveSettings::v4l_alsadevicename()) {
KdenliveSettings::setV4l_alsadevicename(value);
}
- value = m_configCapture.kcfg_rmd_audio_freq->itemText(m_configCapture.kcfg_rmd_audio_freq->currentIndex());
- kDebug() << "// AUDIO FREQ VALUE: " << value << ", CURRENT: " << KdenliveSettings::rmd_freq() << ", IX: " << m_configCapture.kcfg_rmd_audio_freq->currentIndex();
- if (value != KdenliveSettings::rmd_freq()) {
- kDebug() << "// SETTING AUDIO FREQ TO: " << value;
- KdenliveSettings::setRmd_freq(value);
- }
-
if (m_configSdl.kcfg_external_display->isChecked() != KdenliveSettings::external_display()) {
KdenliveSettings::setExternal_display(m_configSdl.kcfg_external_display->isChecked());
resetProfile = true;
{
int type = 0;
if (currentPage() == m_page4) {
- if (m_configCapture.tabWidget->currentIndex() == 1) type = 1;
- else if (m_configCapture.tabWidget->currentIndex() == 3) type = 2;
+ type = m_configCapture.tabWidget->currentIndex();
}
QPointer<EncodingProfilesDialog> d = new EncodingProfilesDialog(type);
d->exec();
}
m_configCapture.kcfg_v4l_profile->blockSignals(false);
if (!currentItem.isEmpty()) m_configCapture.kcfg_v4l_profile->setCurrentIndex(m_configCapture.kcfg_v4l_profile->findText(currentItem));
+
+ // Load Screen Grab profiles
+ m_configCapture.kcfg_grab_profile->blockSignals(true);
+ currentItem = m_configCapture.kcfg_grab_profile->currentText();
+ m_configCapture.kcfg_grab_profile->clear();
+ KConfigGroup group2(&conf, "screengrab");
+ values = group2.entryMap();
+ QMapIterator<QString, QString> j(values);
+ while (j.hasNext()) {
+ j.next();
+ if (!j.key().isEmpty()) m_configCapture.kcfg_grab_profile->addItem(j.key(), j.value());
+ }
+ m_configCapture.kcfg_grab_profile->blockSignals(false);
+ if (!currentItem.isEmpty()) m_configCapture.kcfg_grab_profile->setCurrentIndex(m_configCapture.kcfg_grab_profile->findText(currentItem));
// Load Decklink profiles
m_configCapture.kcfg_decklink_profile->blockSignals(true);
currentItem = m_configCapture.kcfg_decklink_profile->currentText();
m_configCapture.kcfg_decklink_profile->clear();
- KConfigGroup group2(&conf, "decklink");
- values = group2.entryMap();
- QMapIterator<QString, QString> j(values);
- while (j.hasNext()) {
- j.next();
- if (!j.key().isEmpty()) m_configCapture.kcfg_decklink_profile->addItem(j.key(), j.value());
+ KConfigGroup group3(&conf, "decklink");
+ values = group3.entryMap();
+ QMapIterator<QString, QString> k(values);
+ while (k.hasNext()) {
+ k.next();
+ if (!k.key().isEmpty()) m_configCapture.kcfg_decklink_profile->addItem(k.key(), k.value());
}
m_configCapture.kcfg_decklink_profile->blockSignals(false);
if (!currentItem.isEmpty()) m_configCapture.kcfg_decklink_profile->setCurrentIndex(m_configCapture.kcfg_decklink_profile->findText(currentItem));
m_configProject.kcfg_proxy_profile->blockSignals(true);
currentItem = m_configProject.kcfg_proxy_profile->currentText();
m_configProject.kcfg_proxy_profile->clear();
- KConfigGroup group3(&conf, "proxy");
- values = group3.entryMap();
- QMapIterator<QString, QString> k(values);
- while (k.hasNext()) {
- k.next();
- if (!k.key().isEmpty()) m_configProject.kcfg_proxy_profile->addItem(k.key(), k.value());
+ KConfigGroup group4(&conf, "proxy");
+ values = group4.entryMap();
+ QMapIterator<QString, QString> l(values);
+ while (l.hasNext()) {
+ l.next();
+ if (!l.key().isEmpty()) m_configProject.kcfg_proxy_profile->addItem(l.key(), l.value());
}
if (!currentItem.isEmpty()) m_configProject.kcfg_proxy_profile->setCurrentIndex(m_configProject.kcfg_proxy_profile->findText(currentItem));
m_configProject.kcfg_proxy_profile->blockSignals(false);
//
}
+void KdenliveSettingsDialog::slotUpdateGrabProfile(int ix)
+{
+ if (ix == -1) ix = KdenliveSettings::grab_profile();
+ else ix = m_configCapture.kcfg_grab_profile->currentIndex();
+ QString data = m_configCapture.kcfg_grab_profile->itemData(ix).toString();
+ if (data.isEmpty()) return;
+ m_configCapture.grab_parameters->setPlainText(data.section(';', 0, 0));
+ //
+}
+
void KdenliveSettingsDialog::slotUpdateProxyProfile(int ix)
{
if (ix == -1) ix = KdenliveSettings::v4l_profile();
void slotEditAudioApplication();
void slotEditVideoApplication();
void slotReadAudioDevices();
- void slotUpdateRmdRegionStatus();
+ void slotUpdateGrabRegionStatus();
void slotCheckAlsaDriver();
void slotAddTranscode();
void slotDeleteTranscode();
void slotUpdateDecklinkProfile(int ix = 0);
void slotUpdateProxyProfile(int ix = 0);
void slotUpdateV4lProfile(int ix = 0);
+ void slotUpdateGrabProfile(int ix = 0);
void slotEditVideo4LinuxProfile();
void slotReloadBlackMagic();
KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
}
}
+ if (KdenliveSettings::grab_parameters().isEmpty() || KdenliveSettings::grab_extension().isEmpty()) {
+ KConfigGroup group(&conf, "screengrab");
+ QMap< QString, QString > values = group.entryMap();
+ QMapIterator<QString, QString> i(values);
+ if (i.hasNext()) {
+ i.next();
+ QString data = i.value();
+ KdenliveSettings::setGrab_parameters(data.section(';', 0, 0));
+ KdenliveSettings::setGrab_extension(data.section(';', 1, 1));
+ }
+ }
if (KdenliveSettings::decklink_parameters().isEmpty() || KdenliveSettings::decklink_extension().isEmpty()) {
KConfigGroup group(&conf, "decklink");
QMap< QString, QString > values = group.entryMap();
QObject(),
clipType(cType),
jobType(type),
- m_jobStatus(NOJOB),
replaceClip(false),
+ m_jobStatus(NOJOB),
m_clipId(id),
m_addClipToProject(false),
m_jobProcess(NULL)
#include <QToolButton>
#include <QFile>
#include <QDir>
+#include <QDesktopWidget>
RecMonitor::RecMonitor(Kdenlive::MONITORID name, MonitorManager *manager, QWidget *parent) :
void RecMonitor::stop()
{
// Special case: when recording audio only, do not stop so that we can do voiceover.
- if (device_selector->currentIndex() == VIDEO4LINUX && !rec_video->isChecked()) return;
+ if (device_selector->currentIndex() == SCREENGRAB || (device_selector->currentIndex() == VIDEO4LINUX && !rec_video->isChecked())) return;
slotStopCapture();
}
m_fwdAction->setEnabled(false);
m_stopAction->setEnabled(false);
m_playAction->setEnabled(false);
- 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()) video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("ffmpeg or avconv not found,\n please install it for screen grabs")));
+ else KdenliveSettings::setFfmpegpath(exepath);
+ }
+ if (!KdenliveSettings::ffmpegpath().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)));
//video_frame->setText(i18n("Press record button\nto start screen capture"));
break;
case VIDEO4LINUX:
break;
case SCREENGRAB:
m_captureProcess->write("q\n", 3);
- m_captureProcess->terminate();
- video_frame->setText(i18n("Encoding captured video..."));
+ //m_captureProcess->terminate();
+ //video_frame->setText(i18n("Encoding captured video..."));
QTimer::singleShot(1000, m_captureProcess, SLOT(kill()));
break;
case VIDEO4LINUX:
m_logger.clear();
m_recAction->setChecked(true);
QString extension = "mpg";
- if (device_selector->currentIndex() == SCREENGRAB) extension = "ogv"; //KdenliveSettings::screengrabextension();
+ if (device_selector->currentIndex() == SCREENGRAB) {
+ extension = KdenliveSettings::grab_extension();
+ }
else if (device_selector->currentIndex() == VIDEO4LINUX) {
// TODO: when recording audio only, allow configuration?
if (!rec_video->isChecked()) extension = "wav";
QString args;
QString playlist;
QString v4lparameters;
+ QStringList grabParameters;
MltVideoProfile profile;
bool showPreview;
bool isXml;
+ QString captureSize;
+ QRect screenSize = QApplication::desktop()->screenGeometry();
QString capturename = KdenliveSettings::dvgrabfilename();
if (capturename.isEmpty()) capturename = "capture";
break;
case SCREENGRAB:
- switch (KdenliveSettings::rmd_capture_type()) {
- case 0:
- // Full screen capture, nothing special to do
- break;
- default:
+ m_captureArgs << "-f" << "x11grab";
+ if (KdenliveSettings::grab_follow_mouse()) m_captureArgs << "-follow_mouse" << "centered";
+ if (!KdenliveSettings::grab_hide_frame()) m_captureArgs << "-show_region" << "1";
+ if (KdenliveSettings::grab_capture_type() == 0) {
+ // Full screen capture
+ captureSize = ":0.0";
+ m_captureArgs << "-s" << QString::number(screenSize.width()) + "x" + QString::number(screenSize.height());
+ } else {
// Region capture
- m_captureArgs << "--width" << QString::number(KdenliveSettings::rmd_width()) << "--height" << QString::number(KdenliveSettings::rmd_height());
- if (!KdenliveSettings::rmd_follow_mouse()) {
- m_captureArgs << "-x" << QString::number(KdenliveSettings::rmd_offsetx()) << "-y" << QString::number(KdenliveSettings::rmd_offsety());
- } else {
- m_captureArgs << "--follow-mouse";
- if (KdenliveSettings::rmd_hide_frame()) m_captureArgs << "--no-frame";
- }
- break;
+ m_captureArgs << "-s" << QString::number(KdenliveSettings::grab_width()) + "x" + QString::number(KdenliveSettings::grab_height());
+ captureSize = ":" + QString::number(KdenliveSettings::grab_offsetx()) + "." + QString::number(KdenliveSettings::grab_offsetx());
}
- if (KdenliveSettings::rmd_hide_mouse()) m_captureArgs << "--no-cursor";
+ // fps
+ m_captureArgs << "-r" << QString::number(KdenliveSettings::grab_fps());
+ if (KdenliveSettings::grab_hide_mouse()) captureSize.append("+nomouse");
+ m_captureArgs << "-i" << captureSize;
+ grabParameters = KdenliveSettings::grab_parameters().simplified().split(" ");
+ m_captureArgs << grabParameters;
+ m_captureArgs << path;
+
m_isCapturing = true;
- if (KdenliveSettings::rmd_capture_audio()) {
+ /*if (KdenliveSettings::rmd_capture_audio()) {
m_captureArgs << "--freq" << KdenliveSettings::rmd_freq();
m_captureArgs << "--channels" << QString::number(KdenliveSettings::rmd_audio_channels());
if (KdenliveSettings::rmd_use_jack()) {
if (KdenliveSettings::rmd_alsa_buffer() > 0)
m_captureArgs << "--buffer-size" << QString::number(KdenliveSettings::rmd_alsa_buffer());
}
- } else m_captureArgs << "--no-sound";
-
- if (KdenliveSettings::rmd_fullshots()) m_captureArgs << "--full-shots";
- m_captureArgs << "--v_bitrate" << QString::number(KdenliveSettings::rmd_bitrate());
- m_captureArgs << "--v_quality" << QString::number(KdenliveSettings::rmd_quality());
- m_captureArgs << "--workdir" << KdenliveSettings::currenttmpfolder();
- m_captureArgs << "--fps" << QString::number(KdenliveSettings::rmd_fps()) << "-o" << m_captureFile.path();
- m_captureProcess->start(KdenliveSettings::rmd_path(), m_captureArgs);
- kDebug() << "// RecordMyDesktop params: " << m_captureArgs;
+ } else m_captureArgs << "--no-sound";*/
+
+ m_captureProcess->start(KdenliveSettings::ffmpegpath(), m_captureArgs);
+ //kDebug() << "// Screen grab params: " << m_captureArgs;
break;
default:
break;
<rect>
<x>0</x>
<y>0</y>
- <width>405</width>
+ <width>413</width>
<height>492</height>
</rect>
</property>
</size>
</property>
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Screen Grab</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
- <item row="0" column="0" colspan="3">
- <widget class="QLabel" name="rmd_info">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
+ <item row="5" column="3">
+ <widget class="QToolButton" name="grab_manageprofile">
<property name="text">
- <string/>
+ <string>...</string>
</property>
</widget>
</item>
- <item row="1" column="0" colspan="3">
- <widget class="QCheckBox" name="kcfg_rmd_capture_audio">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_18">
<property name="text">
- <string>Capture audio</string>
+ <string>Frame rate</string>
</property>
</widget>
</item>
- <item row="2" column="0" colspan="3">
- <widget class="QFrame" name="audio_group">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <item row="2" column="1">
+ <widget class="KDoubleNumInput" name="kcfg_grab_fps">
+ <property name="minimum">
+ <double>1.000000000000000</double>
</property>
- <layout class="QGridLayout" name="gridLayout_4">
- <item row="0" column="0" colspan="5">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Audio channels</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntSpinBox" name="kcfg_rmd_audio_channels"/>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label_22">
- <property name="text">
- <string>Audio frequency</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KComboBox" name="kcfg_rmd_audio_freq">
- <item>
- <property name="text">
- <string>48000</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>41000</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>32000</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>22500</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>11250</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <widget class="QRadioButton" name="radioButton_2">
- <property name="text">
- <string>ALSA</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="2">
- <widget class="KComboBox" name="kcfg_rmd_alsa_device">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLabel" name="label_17">
- <property name="text">
- <string>Buffer</string>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="KIntSpinBox" name="kcfg_rmd_alsa_buffer">
- <property name="maximum">
- <number>999</number>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QRadioButton" name="kcfg_rmd_use_jack">
- <property name="text">
- <string>Jack</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Ports:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="KLineEdit" name="kcfg_rmd_jackports">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLabel" name="label_21">
- <property name="text">
- <string>Buffer</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4">
- <widget class="KDoubleNumInput" name="kcfg_rmd_jack_buffer"/>
- </item>
- </layout>
</widget>
</item>
- <item row="3" column="0" colspan="3">
- <widget class="KComboBox" name="kcfg_rmd_capture_type">
+ <item row="9" column="0" colspan="3">
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>383</width>
+ <height>160</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="0" colspan="5">
+ <widget class="KComboBox" name="kcfg_grab_capture_type">
<item>
<property name="text">
<string>Full screen capture</string>
</item>
</widget>
</item>
- <item row="4" column="0" colspan="3">
+ <item row="1" column="0" colspan="5">
<widget class="QFrame" name="region_group">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<item row="0" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QCheckBox" name="kcfg_rmd_follow_mouse">
+ <widget class="QCheckBox" name="kcfg_grab_follow_mouse">
<property name="text">
<string>Follow mouse</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="kcfg_rmd_hide_frame">
+ <widget class="QCheckBox" name="kcfg_grab_hide_frame">
<property name="text">
<string>Hide frame</string>
</property>
</widget>
</item>
- <item>
- <widget class="QCheckBox" name="kcfg_rmd_hide_mouse">
- <property name="text">
- <string>Hide cursor</string>
- </property>
- </widget>
- </item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
</widget>
</item>
<item row="1" column="1">
- <widget class="KIntSpinBox" name="kcfg_rmd_offsetx">
+ <widget class="KIntSpinBox" name="kcfg_grab_offsetx">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
</widget>
</item>
<item row="1" column="2">
- <widget class="KIntSpinBox" name="kcfg_rmd_offsety">
+ <widget class="KIntSpinBox" name="kcfg_grab_offsety">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
</widget>
</item>
<item row="2" column="1">
- <widget class="KIntSpinBox" name="kcfg_rmd_width">
+ <widget class="KIntSpinBox" name="kcfg_grab_width">
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item row="2" column="2">
- <widget class="KIntSpinBox" name="kcfg_rmd_height">
+ <widget class="KIntSpinBox" name="kcfg_grab_height">
<property name="minimum">
<number>1</number>
</property>
</layout>
</widget>
</item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_18">
- <property name="text">
- <string>Frame rate</string>
+ <item row="6" column="0" colspan="5">
+ <widget class="QPlainTextEdit" name="grab_parameters">
+ <property name="readOnly">
+ <bool>true</bool>
</property>
</widget>
</item>
- <item row="5" column="1">
- <widget class="KDoubleNumInput" name="kcfg_rmd_fps">
- <property name="minimum">
- <double>1.000000000000000</double>
+ <item row="5" column="1" colspan="2">
+ <widget class="KComboBox" name="kcfg_grab_profile">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
- <item row="5" column="2" rowspan="3">
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>237</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label_13">
+ <item row="5" column="4">
+ <widget class="QToolButton" name="grab_showprofileinfo">
<property name="text">
- <string>Bit rate</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="KIntNumInput" name="kcfg_rmd_bitrate">
- <property name="minimum">
- <number>45000</number>
- </property>
- <property name="maximum">
- <number>2000000</number>
+ <string>...</string>
</property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="label_15">
- <property name="text">
- <string>Quality</string>
+ <property name="checkable">
+ <bool>true</bool>
</property>
</widget>
</item>
- <item row="7" column="1">
- <widget class="KIntNumInput" name="kcfg_rmd_quality">
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="maximum">
- <number>63</number>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_screengrab">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- </item>
- <item row="8" column="0" colspan="3">
- <widget class="QCheckBox" name="kcfg_rmd_fullshots">
<property name="text">
- <string>Full shots</string>
+ <string>Encoding profile</string>
</property>
</widget>
</item>
- <item row="9" column="0" colspan="3">
- <spacer name="verticalSpacer_3">
+ <item row="2" column="2" colspan="3">
+ <spacer name="horizontalSpacer_2">
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>383</width>
- <height>160</height>
+ <width>237</width>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
+ <item row="3" column="0" colspan="5">
+ <widget class="QCheckBox" name="kcfg_grab_hide_mouse">
+ <property name="text">
+ <string>Hide cursor</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<extends>QSpinBox</extends>
<header>knuminput.h</header>
</customwidget>
- <customwidget>
- <class>KIntNumInput</class>
- <extends>QWidget</extends>
- <header>knuminput.h</header>
- </customwidget>
</customwidgets>
<tabstops>
<tabstop>kcfg_defaultcapture</tabstop>
<tabstop>kcfg_firewireformat</tabstop>
<tabstop>kcfg_firewireautosplit</tabstop>
<tabstop>kcfg_firewiretimestamp</tabstop>
- <tabstop>kcfg_rmd_capture_audio</tabstop>
- <tabstop>radioButton_2</tabstop>
- <tabstop>kcfg_rmd_alsa_device</tabstop>
- <tabstop>kcfg_rmd_alsa_buffer</tabstop>
- <tabstop>kcfg_rmd_use_jack</tabstop>
- <tabstop>kcfg_rmd_jackports</tabstop>
- <tabstop>kcfg_rmd_capture_type</tabstop>
- <tabstop>kcfg_rmd_follow_mouse</tabstop>
- <tabstop>kcfg_rmd_hide_frame</tabstop>
- <tabstop>kcfg_rmd_offsetx</tabstop>
- <tabstop>kcfg_rmd_offsety</tabstop>
- <tabstop>kcfg_rmd_width</tabstop>
- <tabstop>kcfg_rmd_height</tabstop>
- <tabstop>kcfg_rmd_fullshots</tabstop>
+ <tabstop>kcfg_grab_capture_type</tabstop>
+ <tabstop>kcfg_grab_follow_mouse</tabstop>
+ <tabstop>kcfg_grab_hide_frame</tabstop>
+ <tabstop>kcfg_grab_offsetx</tabstop>
+ <tabstop>kcfg_grab_offsety</tabstop>
+ <tabstop>kcfg_grab_width</tabstop>
+ <tabstop>kcfg_grab_height</tabstop>
</tabstops>
<resources/>
<connections/>
m_check.programList->setIconSize(QSize(24, 24));
QTreeWidgetItem *item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("FFmpeg & ffplay"));
- item->setData(1, Qt::UserRole, i18n("Required for webcam capture"));
+ item->setData(1, Qt::UserRole, i18n("Required for proxy clips, transcoding and screen capture"));
item->setSizeHint(0, itemSize);
QString exepath = KStandardDirs::findExe("ffmpeg");
QString playpath = KStandardDirs::findExe("ffplay");
if (!playpath.isEmpty()) KdenliveSettings::setFfplaypath(playpath);
#ifndef Q_WS_MAC
- item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("recordmydesktop"));
- item->setData(1, Qt::UserRole, i18n("Required for screen capture"));
- item->setSizeHint(0, itemSize);
- if (KStandardDirs::findExe("recordmydesktop").isEmpty()) item->setIcon(0, m_badIcon);
- else item->setIcon(0, m_okIcon);
-
item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("dvgrab"));
item->setData(1, Qt::UserRole, i18n("Required for firewire capture"));
item->setSizeHint(0, itemSize);