From ccf08e376bebd9f2a3fd53812f0009a26fef5253 Mon Sep 17 00:00:00 2001 From: Gauthier Bouilhol Date: Wed, 29 Feb 2012 18:00:49 +0100 Subject: [PATCH] Frame rate selection window added for ffmpeg and BitRateTolerance forced to a non-zero value --- vv/vvMainWindow.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); -- 2.47.1