an attempt at creating a thumbnailer

This commit is contained in:
Chris Cochrun 2023-02-06 15:01:18 -06:00
parent 246c75c789
commit 6366dc2d88
2 changed files with 15 additions and 0 deletions

View file

@ -18,6 +18,7 @@
#include <QStandardPaths>
#include <QImage>
#include <iostream>
SlideModel::SlideModel(QObject *parent)
: QAbstractListModel(parent) {
@ -639,3 +640,15 @@ void SlideModel::moveRowFromService(const int &fromIndex,
}
}
}
QString SlideModel::thumbnailVideo(QString video) {
std::system("ffmpeg -i Rust\ Tutorial\ Full\ Course.webm -vframes 1 -an -s 576x324 -ss 35 OutputFile.jpg");
QTemporaryFile thumbnail;
if (thumbnail.open()) {
return thumbnail.fileName();
}
}

View file

@ -79,6 +79,8 @@ public:
Q_INVOKABLE QVariantMap getItem(int index) const;
Q_INVOKABLE QVariantList getItems();
Q_INVOKABLE int findSlideIdFromServItm(int index);
Q_INVOKABLE void thumbnailVideo(QString video);
public slots:
Q_INVOKABLE bool select(int id);