From: Gauthier Bouilhol Date: Wed, 29 Feb 2012 17:00:49 +0000 (+0100) Subject: Frame rate selection window added for ffmpeg and BitRateTolerance X-Git-Tag: v1.3.0~80 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ccf08e376bebd9f2a3fd53812f0009a26fef5253;p=clitk.git Frame rate selection window added for ffmpeg and BitRateTolerance forced to a non-zero value --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index d210d11..a8b90bf 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -2781,7 +2781,13 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) mpg->SetInput(image); mpg->SetFileName(fileName.toStdString().c_str()); mpg->SetQuality(2); - mpg->SetRate(5); + bool ok; + int fps = QInputDialog::getInt(this, tr("Number of frames per second"), + tr("FPS:"), 5, 0, 1024, 1, &ok); + if(!ok) + fps = 5; + mpg->SetRate(fps); + mpg->SetBitRateTolerance(round(12*1024*1024/fps+1)); mpg->Start(); vvImage * vvImg = mSlicerManagers[smIndex]->GetImage();