Page 1 of 1

Video creation problem on debian sarge - pl

Posted: Sat Mar 25, 2006 9:47 pm
by maciekc
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 );

Posted: Sun Mar 26, 2006 2:35 am
by cordel
Thank you for this :)
Regards,
Corey

Posted: Mon Mar 27, 2006 10:14 am
by zoneminder
I have added this fix into 1.22.1, though %F is only supported for php 4.3.10 and later so the fix will only function for systems that meet this critierion.

Posted: Mon Mar 27, 2006 9:09 pm
by maciekc
OK thanks for adding my fix. Would be useful for me.