As this is my first post, kudos to Phil for a great tool!
I recently started evaluating ZM for a project needing reasonable quality live streaming over consumer broadband internet connections, as well as record, playback and download. I also need compatibilty with browsers on Win and Mac. So .asf live streaming was not acceptable for me since, as far as I can tell, it does not work on a Mac "out of the box."
So I've been trying other live stream formats, but ZM kept trying to load them into WMP no matter what I tried. Looking at the code in zm_html_view_watchfeed.php I found (starting line 96):
Code: Select all
<?php
if ( $mode == "stream" )
{
if ( ZM_VIDEO_STREAM_METHOD == 'mpeg' && ZM_VIDEO_LIVE_FORMAT )
{
$stream_src = getStreamSrc( array( "mode=mpeg", "monitor=".$mid, "s
cale=".$scale, "bitrate=".ZM_WEB_VIDEO_BITRATE, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "for
mat=".ZM_VIDEO_LIVE_FORMAT ) );
if ( isWindows() )
{
?>
<object id="MediaPlayer" width="<?= reScale( $monitor['Width'], $scale ) ?>" height
="<?= reScale( $monitor['Height'], $scale ) ?>"
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Ver
sion=6,0,02,902"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="FileName" value="<?= $stream_src ?>">
<param name="autoStart" value="1">
<param name="showControls" value="0">
<embed type="application/x-mplayer2"
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
src="<?= $stream_src ?>"
name="MediaPlayer"
width="<?= reScale( $monitor['Width'], $scale ) ?>"
height="<?= reScale( $monitor['Height'], $scale ) ?>"
autostart="1"
showcontrols="0">
</embed>
</object>
<?php
}
else
{
?>
<embed type="video/mpeg"
src="<?= $stream_src ?>"
width="<?= reScale( $monitor['Width'], $scale ) ?>"
height="<?= reScale( $monitor['Height'], $scale ) ?>"
autostart="1"
showcontrols="0">
</embed>
Since I'm trying formats compatible out of the box with both Win and Mac, I've focused on Quicktime (.mov, .mp4) and Flash (.swf). And of course I need the browser to load the correct player. So I have changed the above code as follows:
Code: Select all
<?php
if ( $mode == "stream" )
{
if ( ZM_VIDEO_STREAM_METHOD == 'mpeg' && ZM_VIDEO_LIVE_FORMAT )
{
$stream_src = getStreamSrc( array( "mode=mpeg", "monitor=".$mid, "scale=".$scale, "bitrate=".ZM_WEB_VIDEO_BITRATE, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "format=".ZM_VIDEO_LIVE_FORMAT ) );
//MRR Following switch code to match embed type to file types being used
switch ( ZM_VIDEO_LIVE_FORMAT )
{
case "asf" :
print "<embed type=\"video/x-ms-asf\" ";
break;
case "swf" :
print "<embed type=\"application/x-shockwave-flash\" ";
break;
case "mp4" :
print "<embed type=\"video/mp4\" ";
break;
case "mov" :
print "<embed type=\"video/quicktime\" ";
break;
default :
//MRR Note - leaving blank forces browser to determine mime type from suffix of the src attribute
print "<embed ";
break;
}
?>
src="<?= $stream_src ?>"
width="<?= reScale( $monitor['Width'], $scale ) ?>"
height="<?= reScale( $monitor['Height'], $scale ) ?>"
autostart="1"
showcontrols="0">
</embed>
Although Quicktime loads, I have not succeded yet to get live streaming working with .mp4. And with .mov I get this error from zms:
Code: Select all
Unable to determine mime type for 'mov' format, using 'video/mpeg' as default
Thanks again for the fine project.
regards,
Mickey