diff --git a/src/multimedia/qmediaopenglhelper_p.h b/src/multimedia/qmediaopenglhelper_p.h
index 0dbd79d475d295a7c7a48aa7231641e49494257b..bb445b693b9c354e75794eae28cd48e9061c54cb 100644
--- a/src/multimedia/qmediaopenglhelper_p.h
+++ b/src/multimedia/qmediaopenglhelper_p.h
@@ -47,7 +47,7 @@
 
 #include <QtGui/QOpenGLContext>
 
-#if defined(Q_OS_WIN) && (defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC))
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && (defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC))
 #include <EGL/egl.h>
 #endif
 
diff --git a/src/multimedia/qtmultimediaquicktools_headers/qsgvideonode_p.h b/src/multimedia/qtmultimediaquicktools_headers/qsgvideonode_p.h
index c064f8ed8ea87d7e9071c319522bae96ff1a2f77..8be77ff0794731bca6fd11cb40a723a88a5a0e8e 100644
--- a/src/multimedia/qtmultimediaquicktools_headers/qsgvideonode_p.h
+++ b/src/multimedia/qtmultimediaquicktools_headers/qsgvideonode_p.h
@@ -43,8 +43,6 @@
 
 QT_BEGIN_NAMESPACE
 
-const QLatin1String QSGVideoNodeFactoryPluginKey("sgvideonodes");
-
 class Q_MULTIMEDIAQUICK_EXPORT QSGVideoNode : public QSGGeometryNode
 {
 public:
diff --git a/src/plugins/android/videonode/android_videonode.json b/src/plugins/android/videonode/android_videonode.json
index 08bb12c3fe40beb41e9637e69f8a5dcd8ae22717..9b359ebace3e3bb791fa58defcc22519dbe94e7e 100644
--- a/src/plugins/android/videonode/android_videonode.json
+++ b/src/plugins/android/videonode/android_videonode.json
@@ -1,3 +1,3 @@
 {
-    "Keys": ["sgvideonodes"]
+    "Keys": ["android"]
 }
diff --git a/src/plugins/videonode/egl/egl.json b/src/plugins/videonode/egl/egl.json
index 08bb12c3fe40beb41e9637e69f8a5dcd8ae22717..54a0519f5fc4d508424137244d740931a6ce6508 100644
--- a/src/plugins/videonode/egl/egl.json
+++ b/src/plugins/videonode/egl/egl.json
@@ -1,3 +1,3 @@
 {
-    "Keys": ["sgvideonodes"]
+    "Keys": ["egl"]
 }
diff --git a/src/plugins/videonode/imx6/imx6.json b/src/plugins/videonode/imx6/imx6.json
index 08bb12c3fe40beb41e9637e69f8a5dcd8ae22717..2a7fc50ccdcc5a8d0e51ef4d1a36a63efe35a61f 100644
--- a/src/plugins/videonode/imx6/imx6.json
+++ b/src/plugins/videonode/imx6/imx6.json
@@ -1,3 +1,3 @@
 {
-    "Keys": ["sgvideonodes"]
+    "Keys": ["imx6"]
 }
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
index 3b07e28c2ee1b509eb24e8f1de7bce3eb7ed9ca5..608aae5d1f82756fbba6e1b58a68dc3d1088365a 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
@@ -55,10 +55,21 @@ QDeclarativeVideoRendererBackend::QDeclarativeVideoRendererBackend(QDeclarativeV
     QObject::connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
                      q, SLOT(_q_updateNativeSize()), Qt::QueuedConnection);
 
-    foreach (QObject *instance, videoNodeFactoryLoader()->instances(QSGVideoNodeFactoryPluginKey)) {
+    // Prioritize the plugin requested by the environment
+    QString requestedVideoNode = QString::fromLatin1(qgetenv("QT_VIDEONODE"));
+
+    foreach (const QString &key, videoNodeFactoryLoader()->keys()) {
+        QObject *instance = videoNodeFactoryLoader()->instance(key);
         QSGVideoNodeFactoryInterface* plugin = qobject_cast<QSGVideoNodeFactoryInterface*>(instance);
-        if (plugin)
-            m_videoNodeFactories.append(plugin);
+        if (plugin) {
+            if (key == requestedVideoNode)
+                m_videoNodeFactories.prepend(plugin);
+            else
+                m_videoNodeFactories.append(plugin);
+#ifdef DEBUG_VIDEOITEM
+            qDebug() << "found videonode plugin" << key << plugin;
+#endif
+        }
     }
 
     // Append existing node factories as fallback if we have no plugins
@@ -224,8 +235,12 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,
         if (!videoNode) {
             foreach (QSGVideoNodeFactoryInterface* factory, m_videoNodeFactories) {
                 videoNode = factory->createNode(m_surface->surfaceFormat());
-                if (videoNode)
+                if (videoNode) {
+#ifdef DEBUG_VIDEOITEM
+                    qDebug() << "using video node from factory" << factory;
+#endif
                     break;
+                }
             }
         }
     }