Index: /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 741)
+++ /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 742)
@@ -122,4 +122,5 @@
   QString createTempFolder();
   QString removeTempFolder();
+  bool saveVideo();
 
 #if QT_VERSION < 0x040000
Index: /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc
===================================================================
--- /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc	(revision 741)
+++ /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc	(revision 742)
@@ -291,5 +291,5 @@
 void G4OpenGLQtMovieDialog::selectSaveFileNameAction()
 {
-  QString nomFich =  QFileDialog::getOpenFileName ( this,
+  QString nomFich =  QFileDialog::getSaveFileName ( this,
                                                     "Select saved file",
                                                     tr("Select saved file ...")); 
Index: /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 741)
+++ /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 742)
@@ -2108,13 +2108,15 @@
     }
     fMovieParametersDialog->setStatus("Stop Recording\n");
+
+    // check parameters if they were modified (Re APPLY them...)
     fMovieParametersDialog->checkAllParameters();
-    if (getEncoderPath() == "") {
-      fMovieParametersDialog->setStatus("No valid encoder found. Frames saved in "+fMovieTempFolderPath);
-    } else if (getSaveFileName() =="") {   // if no saved file
-      if (generateMpegEncoderParameters()) {
-        fMovieParametersDialog->setEncodeButtonEnabled(true);
-        fMovieParametersDialog->setStatus("Parameter file "+fParameterFileName+" generated in "+fMovieTempFolderPath);
-      } else {  // try to encode without dialog
-        fMovieParametersDialog->setStatus("Generation of parameter file failed");
+    if (getEncoderPath() != "") {
+      if (getSaveFileName() != "") {
+        if (generateMpegEncoderParameters()) {
+          fMovieParametersDialog->setEncodeButtonEnabled(true);
+          fMovieParametersDialog->setStatus("Parameter file "+fParameterFileName+" generated in "+fMovieTempFolderPath);
+        } else {  // try to encode without dialog
+          fMovieParametersDialog->setStatus("Generation of parameter file failed");
+        }
       }
     }
@@ -2132,5 +2134,5 @@
         } else  {
           // remove temp folder if it was create
-          QString tmp = removeTempFolder()
+          QString tmp = removeTempFolder();
           if (tmp !="") {
             fMovieParametersDialog->setStatus(tmp);
@@ -2138,5 +2140,5 @@
             return;
           }
-          QString tmp = createTempFolder();
+          tmp = createTempFolder();
           if (tmp != "") {
             fMovieParametersDialog->setStatus("Can't create temp folder. \n"+tmp);
@@ -2354,4 +2356,7 @@
 QString G4OpenGLQtViewer::removeTempFolder() {
 	// remove files in Qt_temp folder
+  if (fMovieTempFolderPath == "") {
+    return "";
+  }
   QDir *d = new QDir(QDir::cleanPath(fMovieTempFolderPath));
   if (!d->exists()) {
@@ -2368,5 +2373,5 @@
       res = false;
       QString file = QDir::fromNativeSeparators(fMovieTempFolderPath+currentFile);
-      error +="Removing file failed : "+file.toStdString()+"\n";
+      error +="Removing file failed : "+file+"\n";
     }
   }
@@ -2433,7 +2438,7 @@
   fprintf (fp,"PATTERN		IBBPBBPBBPBBPBBP\n");
 #if QT_VERSION < 0x040000
-  fprintf (fp,"OUTPUT		%s\n",outputName.ascii());
-#else
-  fprintf (fp,"OUTPUT		%s\n",outputName.toStdString().c_str());
+  fprintf (fp,"OUTPUT		%s\n",getSaveFileName().ascii());
+#else
+  fprintf (fp,"OUTPUT		%s\n",getSaveFileName().toStdString().c_str());
 #endif
   fprintf (fp,"\n");
