Video creation problem on debian sarge - pl

Support and queries relating to all previous versions of ZoneMinder
Locked
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Video creation problem on debian sarge - pl

Post 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 );
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Thank you for this :)
Regards,
Corey
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

OK thanks for adding my fix. Would be useful for me.
Locked