Explorar o código

#1852 encoding to HD format, correct checking for 720p when converting

Alex Trofimov %!s(int64=7) %!d(string=hai) anos
pai
achega
c4416ca54c

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -287,7 +287,7 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
             if($isVideo) {
                 $sVideoUrl = $oStorage->getFileUrlById($a['id']);
                 $aVideoSize = $aTranscodersVideo['mp4_hd']->getVideoSize($sVideoUrl);
-                if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+                if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
                     $sVideoUrlHd = $aTranscodersVideo['mp4_hd']->getFileUrl($a['id']);
             }
 

+ 1 - 1
modules/base/text/classes/BxBaseModTextModule.php

@@ -401,7 +401,7 @@ class BxBaseModTextModule extends BxBaseModGeneralModule implements iBxDolConten
             $aVideoSize = $oTcMp4Hd->getVideoSize($sVideoUrl);
 
             $sVideoUrlHd = '';
-            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
                 $sVideoUrlHd = $oTcMp4Hd->getFileUrl($a['id']);
 
             $aResults[$a['id']] = array(

+ 1 - 1
modules/boonex/albums/classes/BxAlbumsModule.php

@@ -765,7 +765,7 @@ class BxAlbumsModule extends BxBaseModTextModule
             $aVideoSize = $oTcMp4Hd->getVideoSize($sVideoUrl);
 
             $sVideoUrlHd = '';
-            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
                 $sVideoUrlHd = $oTcMp4Hd->getFileUrl($aMedia['file_id']);
 
             $aOutput[$aMedia['id']] = array(

+ 1 - 1
modules/boonex/albums/classes/BxAlbumsTemplate.php

@@ -278,7 +278,7 @@ class BxAlbumsTemplate extends BxBaseModTextTemplate
             $aVideoSize = $aTranscodersVideo['mp4_hd']->getVideoSize($sVideoUrl);
 
             $sVideoUrlHd = '';
-            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
                 $sVideoUrlHd = $aTranscodersVideo['mp4_hd']->getFileUrl($aMediaInfo['file_id']);
 
             $aTmplVarsVideo = array (

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -2124,7 +2124,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
                         $aVideoSize = $oTranscoderMp4Hd->getVideoSize($sVideoUrl);
 
                         $sVideoUrlHd = '';
-                        if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+                        if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
                             $sVideoUrlHd = $oTranscoderMp4Hd->getFileUrl($iVideoId);
 
                         $aResult['content']['videos_attach'][$iVideoId] = array(

+ 1 - 1
modules/boonex/videos/classes/BxVideosModule.php

@@ -125,7 +125,7 @@ class BxVideosModule extends BxBaseModTextModule
         $aVideoSize = $oTcvMp4Hd->getVideoSize($sVideoUrl);
 
         $sVideoUrlHd = '';
-        if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+        if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
             $sVideoUrlHd = $oTcvMp4Hd->getFileUrl($iFile);
 
         return array(

+ 1 - 1
modules/boonex/videos/classes/BxVideosTemplate.php

@@ -104,7 +104,7 @@ class BxVideosTemplate extends BxBaseModTextTemplate
         $aVideoSize = $aTranscodersVideo['mp4_hd']->getVideoSize($sVideoUrl);
 
         $sVideoUrlHd = '';
-        if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] > 720)
+        if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
             $sVideoUrlHd = $aTranscodersVideo['mp4_hd']->getFileUrl($iFile);
 
         return array(