Skip to content

Commit

Permalink
Fixed video length
Browse files Browse the repository at this point in the history
  • Loading branch information
malodetz committed May 27, 2021
1 parent 4cdf134 commit 9ec69ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ void MainWindow::saveVideo() {
"Can't save to " + fileInfo.fileName());
return;
}
//int framerate = frames * 1000 / time;
QString command = QString("ffmpeg -y -pattern_type glob -i '%1/*.png' -c:v libx264 -r 60 -pix_fmt yuv420p -vf \"crop=trunc(iw/2)*2:trunc(ih/2)*2\" %2").arg(temporaryDir->path(), fileName);
int framerate = frames * 1000 / time;
QString command = QString("ffmpeg -y -pattern_type glob -i '%1/*.png' -c:v libx264 -framerate %2 -pix_fmt yuv420p -vf \"crop=trunc(iw/2)*2:trunc(ih/2)*2\" %3").arg(temporaryDir->path(), QString::number(framerate), fileName);
qDebug() << command;
std::system(command.toStdString().data());
}
Expand Down

0 comments on commit 9ec69ff

Please sign in to comment.