Hello then,
Spgm-vid can't play mpeg or mpg movies as it is now. Is there a way to use these movie-files with spgm-vid as well...?
Hope someone can help me, have a lot of mpeg-clips which I'd like to put online.
Thnx, Greetz
Peetz
Quote from: PeetzHello then,
Spgm-vid can't play mpeg or mpg movies as it is now. Is there a way to use these movie-files with spgm-vid as well...?
I will investigate this.
Although, if I remember back to when I was writing SPGM-Vid, I was having problems mpeg movies. It might have been my sample movie. I'll try and get this working now.
That would be great!! :D Looking forward to your results!
Quote from: PeetzHello then,
Spgm-vid can't play mpeg or mpg movies as it is now. Is there a way to use these movie-files with spgm-vid as well...?
Hope someone can help me, have a lot of mpeg-clips which I'd like to put online.
Thnx, Greetz
Peetz
Actually it is possible to mod the code a bit to have it play mpeg & mpg
in spgm-vid.php
around line 480:
// If there isn't a thumbnail, set the default for the Video Type
if (! $validated) {
if ( ($arrVideoInfo[2] == 'asf' or $arrVideoInfo[2] == 'riff') ) {
$strThumbnailPath = $cfg['theme']['MPVideoTHB'];
} elseif ( $arrVideoInfo[2] == 'mpg' or $arrVideoInfo[2] == 'mpeg') {
$strThumbnailPath = $cfg['theme']['MPVideoTHB'];
} elseif ( $arrVideoInfo[2] == 'real' ) {
$strThumbnailPath = $cfg['theme']['RPVideoTHB'];
} elseif ( $arrVideoInfo[2] == 'swf' ) {
$strThumbnailPath = $cfg['theme']['SWVideoTHB'];
} elseif ( $arrVideoInfo[2] == 'quicktime' ) {
$strThumbnailPath = $cfg['theme']['QTVideoTHB'];
}
}
return $strThumbnailPath;
}
also find
// Shockwave Player
and before it add:
//Moded by Tearstar for playing of Mpeg and mpg files
//Tearstar's email tear_star@yahoo.com
} elseif ( ($arrVideoDim[2] == 'mpg' or $arrVideoDim[2] == 'mpeg' ) ) {
print ' <object id="MediaPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="'.$arrVideoDim[0].'" height="'.($arrVideoDim[1]+64).'">'."\n";
print ' <param name="url" value="'.$strVideoURL.'" />'."\n";
print ' <param name="AutoStart" value="true" />'."\n";
print ' <param name="EnableTracker" value="false" />'."\n";
print ' <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="'.$strVideoURL.'" width="'.$arrVideoDim[0].'" height="'.($arrVideoDim[1]+44).'" autostart="1" showcontrols="1">'."\n";
print ' </object>'."\n";
find
if ( ($arrVideoDim[2] == 'asf' or $arrVideoDim[2] == 'riff') ) {
print '<a href="http://www.microsoft.com/windows/windowsmedia/player/download/">'.$cfg['theme']['MPVideoImage'].'</a>';
after it add
} elseif ( $arrVideoDim[2] == 'mpg' or $arrVideoDim[2] == 'mpeg') {
print '<a href="http://www.microsoft.com/windows/windowsmedia/player/download/">'.$cfg['theme']['MPVideoImage'].'</a>';
lastly open
spgm-vid.lib.php
at line 56
$cfg['global']['supportedVidExtensions']and make it
//extensions for mpeg and mpg added by Tearstar
//email tear_star@yahoo.com for help
$cfg['global']['supportedVidExtensions'] = array('.asf', '.wmv', '.avi', '.mov', '.qt', '.rm', '.swf', '.mpg', '.mpeg'); // supported video file extensions
You can see it working here
http://tearstar.sytes.net/Video
also notice the video gallery has no refrence to picture gallery
that is located here
http://tearstar.sytes.net/Pictures
any other questions I will be glad to help.
On a side note I tried to just add
or $arrVideoDim[2] == 'mpeg' or $arrVideoDim[2] == 'mpg' into the same lines that called for the 'riff' and 'asf' formats, but it didn't seem to work, so I did it the above way.
Quote from: TearstarOn a side note I tried to just add
or $arrVideoDim[2] == 'mpeg' or $arrVideoDim[2] == 'mpg' into the same lines that called for the 'riff' and 'asf' formats, but it didn't seem to work, so I did it the above way.
Did you try this?
($arrVideoDim[2] == 'asf' || $arrVideoDim[2] == 'riff' || $arrVideoDim[2] == 'mpeg')Also, I believe "getid3" returns "mpeg" for both "mpeg" and "mpg" so "$arrVideoDim[2] == 'mpg'" shouldn't be required. I could be wrong, I haven't had time to test this.