Index: /trunk/include/VBox/settings.h
===================================================================
--- /trunk/include/VBox/settings.h	(revision 46666)
+++ /trunk/include/VBox/settings.h	(revision 46667)
@@ -822,11 +822,11 @@
                         fAccelerate2DVideo;     // requires settings version 1.8 (VirtualBox 3.1)
 
-    uint32_t            ulVideoCaptureHorzRes;  // requires settings version 1.12 (VirtualBox 4.3)
-    uint32_t            ulVideoCaptureVertRes;  // requires settings version 1.12 (VirtualBox 4.3)
-    uint32_t            ulVideoCaptureRate;     // requires settings version 1.12 (VirtualBox 4.3)
-    uint32_t            ulVideoCaptureFps;      // requires settings version 1.12 (VirtualBox 4.3)
-    bool                fVideoCaptureEnabled;   // requires settings version 1.12 (VirtualBox 4.3)
-    uint64_t            u64VideoCaptureScreens; // requires settings version 1.12 (VirtualBox 4.3)
-    com::Utf8Str        strVideoCaptureFile;    // requires settings version 1.12 (VirtualBox 4.3)
+    uint32_t            ulVideoCaptureHorzRes;  // requires settings version 1.14 (VirtualBox 4.3)
+    uint32_t            ulVideoCaptureVertRes;  // requires settings version 1.14 (VirtualBox 4.3)
+    uint32_t            ulVideoCaptureRate;     // requires settings version 1.14 (VirtualBox 4.3)
+    uint32_t            ulVideoCaptureFPS;      // requires settings version 1.14 (VirtualBox 4.3)
+    bool                fVideoCaptureEnabled;   // requires settings version 1.14 (VirtualBox 4.3)
+    uint64_t            u64VideoCaptureScreens; // requires settings version 1.14 (VirtualBox 4.3)
+    com::Utf8Str        strVideoCaptureFile;    // requires settings version 1.14 (VirtualBox 4.3)
 
     FirmwareType_T      firmwareType;           // requires settings version 1.9 (VirtualBox 3.1)
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 46666)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 46667)
@@ -2315,11 +2315,11 @@
         CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureRate)(&Rate), rc);
         ULONG Fps;
-        CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFps)(&Fps), rc);
+        CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFPS)(&Fps), rc);
         Bstr File;
         CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFile)(File.asOutParam()), rc);
         if (details == VMINFO_MACHINEREADABLE)
         {
-            RTPrintf("VideoCaptureEnabled=\"%s\"\n", bActive ? "on" : "off");
-            RTPrintf("VideoCaptureScreens=");
+            RTPrintf("vcpenabled=\"%s\"\n", bActive ? "on" : "off");
+            RTPrintf("vcpscreens=");
             bool fComma = false;
             for (unsigned i = 0; i < screens.size(); i++)
@@ -2330,9 +2330,9 @@
                 }
             RTPrintf("\n");
-            RTPrintf("VideoCaptureWidth=%u\n", (unsigned)Width);
-            RTPrintf("VideoCaptureFile=\"%ls\"\n", File.raw());
-            RTPrintf("VideoCaptureHeight=%u\n", (unsigned)Height);
-            RTPrintf("VideoCaptureRate=%u\n", (unsigned)Rate);
-            RTPrintf("VideoCaptureFps=%u\n", (unsigned)Fps);
+            RTPrintf("vcpfile=\"%ls\"\n", File.raw());
+            RTPrintf("vcpwidth=%u\n", (unsigned)Width);
+            RTPrintf("vcpheight=%u\n", (unsigned)Height);
+            RTPrintf("vcprate=%u\n", (unsigned)Rate);
+            RTPrintf("vcpfps=%u\n", (unsigned)Fps);
         }
         else
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 46666)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 46667)
@@ -2517,5 +2517,5 @@
             case MODIFYVM_VCP_FPS:
             {
-                CHECK_ERROR(machine, COMSETTER(VideoCaptureFps)(ValueUnion.u32));
+                CHECK_ERROR(machine, COMSETTER(VideoCaptureFPS)(ValueUnion.u32));
                 break;
             }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp	(revision 46666)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp	(revision 46667)
@@ -119,5 +119,5 @@
     displayData.m_iVideoCaptureFrameWidth = m_machine.GetVideoCaptureWidth();
     displayData.m_iVideoCaptureFrameHeight = m_machine.GetVideoCaptureHeight();
-    displayData.m_iVideoCaptureFrameRate = m_machine.GetVideoCaptureFps();
+    displayData.m_iVideoCaptureFrameRate = m_machine.GetVideoCaptureFPS();
     displayData.m_iVideoCaptureBitRate = m_machine.GetVideoCaptureRate();
     displayData.m_screens = m_machine.GetVideoCaptureScreens();
@@ -275,5 +275,5 @@
                 m_machine.SetVideoCaptureWidth(displayData.m_iVideoCaptureFrameWidth);
                 m_machine.SetVideoCaptureHeight(displayData.m_iVideoCaptureFrameHeight);
-                m_machine.SetVideoCaptureFps(displayData.m_iVideoCaptureFrameRate);
+                m_machine.SetVideoCaptureFPS(displayData.m_iVideoCaptureFrameRate);
                 m_machine.SetVideoCaptureRate(displayData.m_iVideoCaptureBitRate);
                 m_machine.SetVideoCaptureScreens(displayData.m_screens);
@@ -290,5 +290,5 @@
             m_machine.SetVideoCaptureWidth(displayData.m_iVideoCaptureFrameWidth);
             m_machine.SetVideoCaptureHeight(displayData.m_iVideoCaptureFrameHeight);
-            m_machine.SetVideoCaptureFps(displayData.m_iVideoCaptureFrameRate);
+            m_machine.SetVideoCaptureFPS(displayData.m_iVideoCaptureFrameRate);
             m_machine.SetVideoCaptureRate(displayData.m_iVideoCaptureBitRate);
             m_machine.SetVideoCaptureScreens(displayData.m_screens);
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 46666)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 46667)
@@ -1380,5 +1380,5 @@
     uuid="03DFD6F7-1B78-48A3-8345-C785281E9523"
     wsmap="managed">
-    <attribute name="NetworkName" type="wstring">
+    <attribute name="networkName" type="wstring">
       <desc>
         TBD: the idea, technically we can start any number of the NAT networks,
@@ -4248,5 +4248,5 @@
     </attribute>
 
-    <attribute name="VideoCaptureEnabled" type="boolean" default="false">
+    <attribute name="videoCaptureEnabled" type="boolean" default="false">
       <desc>
         This setting determines whether VirtualBox uses video recording to
@@ -4254,5 +4254,5 @@
     </attribute>
 
-    <attribute name="VideoCaptureScreens" type="boolean" safearray="yes">
+    <attribute name="videoCaptureScreens" type="boolean" safearray="yes">
       <desc>
         This setting determines for which screens video recording is
@@ -4260,13 +4260,18 @@
     </attribute>
 
-    <attribute name="VideoCaptureFile" type="wstring" default="Test.webm">
+    <attribute name="videoCaptureFile" type="wstring">
       <desc>
         This setting determines the filename VirtualBox uses to save
         the recorded content. This setting cannot be changed while video
-        capturing is enabled.
-      </desc>
-    </attribute>
-
-    <attribute name="VideoCaptureWidth" type="unsigned long" default="640">
+        capturing is enabled. 
+        <note>
+          When setting this attribute, the specified path has to be
+          absolute (full path). When reading this attribute, a full path is
+          always returned.
+        </note>
+      </desc>
+    </attribute>
+
+    <attribute name="videoCaptureWidth" type="unsigned long" default="640">
       <desc>
         This setting determines the horizontal resolution of the recorded
@@ -4276,5 +4281,5 @@
     </attribute>
 
-    <attribute name="VideoCaptureHeight" type="unsigned long" default="480">
+    <attribute name="videoCaptureHeight" type="unsigned long" default="480">
       <desc>
         This setting determines the vertical resolution of the recorded
@@ -4284,5 +4289,5 @@
     </attribute>
 
-    <attribute name="VideoCaptureRate" type="unsigned long" default="512">
+    <attribute name="videoCaptureRate" type="unsigned long" default="512">
       <desc>
         This setting determines the bitrate in kilobits per second.
@@ -4293,9 +4298,9 @@
     </attribute>
 
-    <attribute name="VideoCaptureFps" type="unsigned long" default="25">
+    <attribute name="videoCaptureFPS" type="unsigned long" default="25">
       <desc>
         This setting determines the maximum number of frames per second.
         Frames with a higher frequency will be skipped. Reducing this
-        value increses the number of skipped frames but reduces the
+        value increases the number of skipped frames and reduces the
         file size. This setting cannot be changed while video capturing
         is enabled.
@@ -12749,5 +12754,5 @@
       <desc>
         Returns the storage format variant information for this medium
-        as an aaray of the flags described at <link to="MediumVariant" />.
+        as an array of the flags described at <link to="MediumVariant" />.
         Before <link to="#refreshState"/> is called this method returns
         an undefined value.
@@ -20942,5 +20947,5 @@
     >
     <!-- network name is common setting for all event types -->
-    <attribute name="NetworkName" type="wstring" readonly="yes"/>
+    <attribute name="networkName" type="wstring" readonly="yes"/>
   </interface>
   <!-- base class for start/stop events -->
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 46666)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 46667)
@@ -262,6 +262,6 @@
         ULONG               mVideoCaptureHeight;
         ULONG               mVideoCaptureRate;
-        ULONG               mVideoCaptureFps;
-        Bstr                mVideoCaptureFile;
+        ULONG               mVideoCaptureFPS;
+        Utf8Str             mVideoCaptureFile;
         BOOL                mVideoCaptureEnabled;
         BOOL                maVideoCaptureScreens[SchemaDefs::MaxGuestMonitors];
@@ -448,6 +448,6 @@
     STDMETHOD(COMGETTER(VideoCaptureRate))(ULONG *aRate);
     STDMETHOD(COMSETTER(VideoCaptureRate))(ULONG aRate);
-    STDMETHOD(COMGETTER(VideoCaptureFps))(ULONG *aFps);
-    STDMETHOD(COMSETTER(VideoCaptureFps))(ULONG aFps);
+    STDMETHOD(COMGETTER(VideoCaptureFPS))(ULONG *aFPS);
+    STDMETHOD(COMSETTER(VideoCaptureFPS))(ULONG aFPS);
     STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
     STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder);
@@ -753,4 +753,6 @@
     void composeSavedStateFilename(Utf8Str &strStateFilePath);
 
+    void getDefaultVideoCaptureFile(Utf8Str &strFile);
+
     HRESULT launchVMProcess(IInternalSessionControl *aControl,
                             const Utf8Str &strType,
Index: /trunk/src/VBox/Main/src-client/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 46666)
+++ /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 46667)
@@ -31,4 +31,5 @@
 #include <iprt/thread.h>
 #include <iprt/asm.h>
+#include <iprt/time.h>
 #include <iprt/cpp/utils.h>
 
@@ -2716,6 +2717,6 @@
     hrc = pMachine->COMGETTER(VideoCaptureRate)(&ulRate);
     AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
-    ULONG ulFps;
-    hrc = pMachine->COMGETTER(VideoCaptureFps)(&ulFps);
+    ULONG ulFPS;
+    hrc = pMachine->COMGETTER(VideoCaptureFPS)(&ulFPS);
     AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
     BSTR strFile;
@@ -2742,9 +2743,36 @@
         }
         if (RT_SUCCESS(rc))
+        {
             rc = VideoRecStrmInit(mpVideoRecCtx, uScreen,
-                                  pszName, ulWidth, ulHeight, ulRate, ulFps);
+                                  pszName, ulWidth, ulHeight, ulRate, ulFPS);
+            if (rc == VERR_ALREADY_EXISTS)
+            {
+                RTStrFree(pszName);
+                pszName = NULL;
+
+                static RTTIMESPEC ts = { 0 };
+                if (!RTTimeSpecGetNano(&ts))
+                    RTTimeNow(&ts);
+                RTTIME time;
+                RTTimeExplode(&time, &ts);
+                if (mcMonitors > 1)
+                    rc = RTStrAPrintf(&pszName, "%s-%04d-%02u-%02uT%02u-%02u-%02u-%09uZ-%u%s",
+                                      pszAbsPath, time.i32Year, time.u8Month, time.u8MonthDay,
+                                      time.u8Hour, time.u8Minute, time.u8Second, time.u32Nanosecond,
+                                      uScreen+1, pszExt);
+                else
+                    rc = RTStrAPrintf(&pszName, "%s-%04d-%02u-%02uT%02u-%02u-%02u-%09uZ%s",
+                                      pszAbsPath, time.i32Year, time.u8Month, time.u8MonthDay,
+                                      time.u8Hour, time.u8Minute, time.u8Second, time.u32Nanosecond,
+                                      pszExt);
+                if (RT_SUCCESS(rc))
+                    rc = VideoRecStrmInit(mpVideoRecCtx, uScreen,
+                                          pszName, ulWidth, ulHeight, ulRate, ulFPS);
+            }
+        }
+
         if (RT_SUCCESS(rc))
             LogRel(("WebM/VP8 video recording screen #%u with %ux%u @ %u kbps, %u fps to '%s' enabled.\n",
-                   uScreen, ulWidth, ulHeight, ulRate, ulFps, pszName));
+                   uScreen, ulWidth, ulHeight, ulRate, ulFPS, pszName));
         else
             LogRel(("Failed to initialize video recording context #%u (%Rrc)!\n", uScreen, rc));
Index: /trunk/src/VBox/Main/src-client/VideoRec.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/VideoRec.cpp	(revision 46666)
+++ /trunk/src/VBox/Main/src-client/VideoRec.cpp	(revision 46667)
@@ -474,9 +474,12 @@
     AssertReturn(pStrm->pu8RgbBuf, VERR_NO_MEMORY);
 
+    /* Play safe: the file must not exist, overwriting is potentially
+     * hazardous as nothing prevents the user from picking a file name of some
+     * other important file, causing unintentional data loss. */
     int rc = RTFileOpen(&pStrm->Ebml.file, pszFile,
-                        RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
+                        RTFILE_O_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
     if (RT_FAILURE(rc))
     {
-        LogFlow(("Failed to open the video capture output File (%Rrc)\n", rc));
+        LogRel(("Failed to create the video capture output file \"%s\" (%Rrc)\n", pszFile, rc));
         return rc;
     }
@@ -500,5 +503,5 @@
     /* disable multithreading */
     pStrm->VpxConfig.g_threads = 0;
-//    pStrm->VpxConfig.kf_max_dist = 1;
+
     pStrm->uDelay = 1000 / uFps;
 
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 46666)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 46667)
@@ -168,9 +168,8 @@
     mAccelerate2DVideoEnabled = false;
     mMonitorCount = 1;
-    mVideoCaptureFile = "Test.webm";
     mVideoCaptureWidth = 1024;
     mVideoCaptureHeight = 768;
     mVideoCaptureRate = 512;
-    mVideoCaptureFps = 25;
+    mVideoCaptureFPS = 25;
     mVideoCaptureEnabled = false;
     for (unsigned i = 0; i < RT_ELEMENTS(maVideoCaptureScreens); i++)
@@ -1795,5 +1794,12 @@
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    mHWData->mVideoCaptureFile.cloneTo(apFile);
+    if (mHWData->mVideoCaptureFile.isEmpty())
+    {
+        Utf8Str defaultFile;
+        getDefaultVideoCaptureFile(defaultFile);
+        defaultFile.cloneTo(apFile);
+    }
+    else
+        mHWData->mVideoCaptureFile.cloneTo(apFile);
     return S_OK;
 }
@@ -1811,6 +1817,14 @@
         return setError(E_INVALIDARG, tr("Cannot change parameters while capturing is enabled"));
 
-    if (strFile.isEmpty())
-       strFile = "VideoCap.webm";
+    if (!RTPathStartsWithRoot(strFile.c_str()))
+        return setError(E_INVALIDARG, tr("Video capture file name '%s' is not absolute"), strFile.c_str());
+
+    if (!strFile.isEmpty())
+    {
+        Utf8Str defaultFile;
+        getDefaultVideoCaptureFile(defaultFile);
+        if (!RTPathCompare(strFile.c_str(), defaultFile.c_str()))
+            strFile.setNull();
+    }
 
     setModified(IsModified_MachineData);
@@ -1905,5 +1919,5 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(VideoCaptureFps)(ULONG *aFps)
+STDMETHODIMP Machine::COMGETTER(VideoCaptureFPS)(ULONG *aFPS)
 {
     AutoCaller autoCaller(this);
@@ -1911,9 +1925,9 @@
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-     *aFps = mHWData->mVideoCaptureFps;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureFps)(ULONG aFps)
+     *aFPS = mHWData->mVideoCaptureFPS;
+    return S_OK;
+}
+
+STDMETHODIMP Machine::COMSETTER(VideoCaptureFPS)(ULONG aFPS)
 {
     AutoCaller autoCaller(this);
@@ -1928,5 +1942,5 @@
     setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVideoCaptureFps = aFps;
+    mHWData->mVideoCaptureFPS = aFPS;
 
     return S_OK;
@@ -7660,4 +7674,19 @@
                                    time.i32Year, time.u8Month, time.u8MonthDay,
                                    time.u8Hour, time.u8Minute, time.u8Second, time.u32Nanosecond);
+}
+
+/**
+ *  Returns the full path to the default video capture file.
+ */
+void Machine::getDefaultVideoCaptureFile(Utf8Str &strFile)
+{
+    AutoCaller autoCaller(this);
+    AssertComRCReturnVoid(autoCaller.rc());
+
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    strFile = mData->m_strConfigFileFull;       // path/to/machinesfolder/vmname/vmname.vbox
+    strFile.stripExt();                         // path/to/machinesfolder/vmname/vmname
+    strFile.append(".webm");                    // path/to/machinesfolder/vmname/vmname.webm
 }
 
@@ -9047,6 +9076,9 @@
         AssertCompile(RT_ELEMENTS(mHWData->maVideoCaptureScreens) == sizeof(data.u64VideoCaptureScreens) * 8);
         mHWData->mVideoCaptureRate = data.ulVideoCaptureRate;
-        mHWData->mVideoCaptureFps = data.ulVideoCaptureFps;
-        mHWData->mVideoCaptureFile = data.strVideoCaptureFile;
+        mHWData->mVideoCaptureFPS = data.ulVideoCaptureFPS;
+        if (!data.strVideoCaptureFile.isEmpty())
+            calculateFullPath(data.strVideoCaptureFile, mHWData->mVideoCaptureFile);
+        else
+            mHWData->mVideoCaptureFile.setNull();
         mHWData->mFirmwareType = data.firmwareType;
         mHWData->mPointingHIDType = data.pointingHIDType;
@@ -10286,5 +10318,5 @@
         data.ulVideoCaptureVertRes = mHWData->mVideoCaptureHeight;
         data.ulVideoCaptureRate = mHWData->mVideoCaptureRate;
-        data.ulVideoCaptureFps = mHWData->mVideoCaptureFps;
+        data.ulVideoCaptureFPS = mHWData->mVideoCaptureFPS;
         data.fVideoCaptureEnabled  = !!mHWData->mVideoCaptureEnabled;
         for (unsigned i = 0; i < sizeof(data.u64VideoCaptureScreens) * 8; i++)
@@ -10295,5 +10327,6 @@
                 ASMBitClear(&data.u64VideoCaptureScreens, i);
         }
-        data.strVideoCaptureFile = mHWData->mVideoCaptureFile;
+        /* store relative video capture file if possible */
+        copyPathRelativeToMachine(mHWData->mVideoCaptureFile, data.strVideoCaptureFile);
 
         /* VRDEServer settings (optional) */
Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 46666)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 46667)
@@ -1754,8 +1754,8 @@
           ulVideoCaptureVertRes(768),
           ulVideoCaptureRate(512),
-          ulVideoCaptureFps(25),
+          ulVideoCaptureFPS(25),
           fVideoCaptureEnabled(false),
           u64VideoCaptureScreens(UINT64_C(0xffffffffffffffff)),
-          strVideoCaptureFile("Test.webm"),
+          strVideoCaptureFile(""),
           firmwareType(FirmwareType_BIOS),
           pointingHIDType(PointingHIDType_PS2Mouse),
@@ -1832,5 +1832,5 @@
                   && (ulVideoCaptureVertRes     == h.ulVideoCaptureVertRes)
                   && (ulVideoCaptureRate        == h.ulVideoCaptureRate)
-                  && (ulVideoCaptureFps         == h.ulVideoCaptureFps)
+                  && (ulVideoCaptureFPS         == h.ulVideoCaptureFPS)
                   && (firmwareType              == h.firmwareType)
                   && (pointingHIDType           == h.pointingHIDType)
@@ -2731,9 +2731,9 @@
             pelmHwChild->getAttributeValue("enabled",   hw.fVideoCaptureEnabled);
             pelmHwChild->getAttributeValue("screens",   hw.u64VideoCaptureScreens);
-            pelmHwChild->getAttributeValue("file",      hw.strVideoCaptureFile);
+            pelmHwChild->getAttributeValuePath("file",  hw.strVideoCaptureFile);
             pelmHwChild->getAttributeValue("horzRes",   hw.ulVideoCaptureHorzRes);
             pelmHwChild->getAttributeValue("vertRes",   hw.ulVideoCaptureVertRes);
             pelmHwChild->getAttributeValue("rate",      hw.ulVideoCaptureRate);
-            pelmHwChild->getAttributeValue("fps",       hw.ulVideoCaptureFps);
+            pelmHwChild->getAttributeValue("fps",       hw.ulVideoCaptureFPS);
         }
         else if (pelmHwChild->nameEquals("RemoteDisplay"))
@@ -3916,13 +3916,14 @@
     xml::ElementNode *pelmVideoCapture = pelmHardware->createChild("VideoCapture");
 
-    if (m->sv >= SettingsVersion_v1_12)
+    if (m->sv >= SettingsVersion_v1_14)
     {
         pelmVideoCapture->setAttribute("enabled",   hw.fVideoCaptureEnabled);
         pelmVideoCapture->setAttribute("screens",   hw.u64VideoCaptureScreens);
-        pelmVideoCapture->setAttribute("file",      hw.strVideoCaptureFile);
+        if (!hw.strVideoCaptureFile.isEmpty())
+            pelmVideoCapture->setAttributePath("file",  hw.strVideoCaptureFile);
         pelmVideoCapture->setAttribute("horzRes",   hw.ulVideoCaptureHorzRes);
         pelmVideoCapture->setAttribute("vertRes",   hw.ulVideoCaptureVertRes);
         pelmVideoCapture->setAttribute("rate",      hw.ulVideoCaptureRate);
-        pelmVideoCapture->setAttribute("fps",       hw.ulVideoCaptureFps);
+        pelmVideoCapture->setAttribute("fps",       hw.ulVideoCaptureFPS);
     }
 
@@ -5052,9 +5053,10 @@
     {
         // VirtualBox 4.3 adds default frontend setting, graphics controller
-        // setting, explicit long mode setting.
+        // setting, explicit long mode setting and video capturing.
         if (   !hardwareMachine.strDefaultFrontend.isEmpty()
             || hardwareMachine.graphicsControllerType != GraphicsControllerType_VBoxVGA
             || hardwareMachine.enmLongMode != Hardware::LongMode_Legacy
-            || machineUserData.ovIcon.length() > 0)
+            || machineUserData.ovIcon.length() > 0
+            || hardwareMachine.fVideoCaptureEnabled)
             m->sv = SettingsVersion_v1_14;
     }
@@ -5097,14 +5099,7 @@
     if (m->sv < SettingsVersion_v1_12)
     {
-        // 4.1: Emulated USB devices.
-        if (hardwareMachine.fEmulatedUSBCardReader)
-            m->sv = SettingsVersion_v1_12;
-    }
-
-    if (m->sv < SettingsVersion_v1_12)
-    {
-        // VirtualBox 4.1 adds PCI passthrough.
+        // VirtualBox 4.1 adds PCI passthrough and emulated USB Smart Card reader
         if (   hardwareMachine.pciAttachments.size()
-            || hardwareMachine.fVideoCaptureEnabled)
+            || hardwareMachine.fEmulatedUSBCardReader)
             m->sv = SettingsVersion_v1_12;
     }
