Video creation problem on debian sarge - pl
Posted: Sat Mar 25, 2006 9:47 pm
There is a problem in creating video files.
This patch changes %.2f to%.2F in sprintf this will make it work on every localized system - there will be always "." instead of ",". "," makes ffmpeg to end with an error instead of making video file.
Please consider changing this in next release. It would make zm more compatible.
--- /root/ZoneMinder-1.22.0/web/zm_funcs.php 2006-01-17 22:11:49.000000000 +0100
+++ /var/www/zm_funcs.php 2006-03-25 23:47:19.868363880 +0100
@@ -1016,7 +1016,7 @@
function createVideo( $event, $format, $rate, $scale, $overwrite=false )
{
- $command = ZM_PATH_BIN."/zmvideo.pl -e ".$event['Id']." -f ".$format." -r ".sprintf( "%.2f", ($rate/RATE_BASE) )." -s ".sprintf( "%.2f", ($scale/SCALE_BASE) );
+ $command = ZM_PATH_BIN."/zmvideo.pl -e ".$event['Id']." -f ".$format." -r ".sprintf( "%.2F", ($rate/RATE_BASE) )." -s ".sprintf( "%.2F", ($scale/SCALE_BASE) );
if ( $overwrite )
$command .= " -o";
$result = exec( $command, $output, $status );
This patch changes %.2f to%.2F in sprintf this will make it work on every localized system - there will be always "." instead of ",". "," makes ffmpeg to end with an error instead of making video file.
Please consider changing this in next release. It would make zm more compatible.
--- /root/ZoneMinder-1.22.0/web/zm_funcs.php 2006-01-17 22:11:49.000000000 +0100
+++ /var/www/zm_funcs.php 2006-03-25 23:47:19.868363880 +0100
@@ -1016,7 +1016,7 @@
function createVideo( $event, $format, $rate, $scale, $overwrite=false )
{
- $command = ZM_PATH_BIN."/zmvideo.pl -e ".$event['Id']." -f ".$format." -r ".sprintf( "%.2f", ($rate/RATE_BASE) )." -s ".sprintf( "%.2f", ($scale/SCALE_BASE) );
+ $command = ZM_PATH_BIN."/zmvideo.pl -e ".$event['Id']." -f ".$format." -r ".sprintf( "%.2F", ($rate/RATE_BASE) )." -s ".sprintf( "%.2F", ($scale/SCALE_BASE) );
if ( $overwrite )
$command .= " -o";
$result = exec( $command, $output, $status );