diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php
index d2227961a3..08e264ab71 100644
--- a/lib/classes/media/subdef.php
+++ b/lib/classes/media/subdef.php
@@ -746,7 +746,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
return;
}
- if (in_array($this->mime, array('video/mp4'))) {
+ if ($this->app['phraseanet.h264-factory']->isH264Enabled() && in_array($this->mime, array('video/mp4'))) {
if (null !== $url = $this->app['phraseanet.h264']->getUrl($this->get_pathfile())) {
$this->url = $url;
diff --git a/templates/web/common/players/video.html.twig b/templates/web/common/players/video.html.twig
index 8455049456..aaf3af1b5e 100644
--- a/templates/web/common/players/video.html.twig
+++ b/templates/web/common/players/video.html.twig
@@ -6,17 +6,30 @@
{% endmacro %}