Video export does not work (ZM 1.25.0 + Ubuntu 11.04)

Forum for questions and support relating to the 1.25.x releases only.
Locked
rassi
Posts: 5
Joined: Tue Jan 31, 2012 5:57 am

Video export does not work (ZM 1.25.0 + Ubuntu 11.04)

Post by rassi »

Ubuntu 11.04 and ZM v1.25.0 + Foscam FI8905W cameras

Export video files function does not work, error from log:


2012-01-31 07:55:55.768860 web_php 31777 ERR Export Failed includes/functions.php 2322
2012-01-31 07:55:54.059113 web_php 31777 ERR Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12 skins/classic/includes/export_functions.php 1118


Export to .tar says "export succeed", but file is only 45bytes


export_functions.php line 1118 is "Error( "Command '$command' returned with status $status" );"

Code: Select all

//cat zmFileList.txt | zip -q zm_export.zip -@
//-bash: zip: command not found

            exec( $command, $output, $status );
            if ( $status )
            {
                Error( "Command '$command' returned with status $status" );
                if ( $output[0] )
                    Error( "First line of output is '".$output[0]."'" );
                return( false );
            }
        }
		
		



functions.php line 2322 is "Error( $message );"

Code: Select all

		function ajaxError( $message, $code=HTTP_STATUS_OK )
{
    Error( $message );
    if ( function_exists( 'ajaxCleanup' ) )
        ajaxCleanup();
    if ( $code == HTTP_STATUS_OK )
    {
        $response = array( 'result'=>'Error', 'message'=>$message );
        header( "Content-type: text/plain" );
        exit( jsonEncode( $response ) );
    }
    header( "HTTP/1.0 $code $message" );
    exit();
}

I did find some bug report:


3) Scroll to line 255 and look for the following line(error is in red):

$exportFileList = array_merge( $exportFileList, exportFileList( $eid ), $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc );

and edit it to this(remove bracket at the end of $eid and place it after $exportMisc):

$exportFileList = array_merge( $exportFileList, exportFileList( $eid , $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ));



Checked my file and it was Ok (line number didn't match):

Code: Select all

if ( is_array( $eids ) )
        {
            foreach ( $eids as $eid )
            {
                $exportFileList = array_merge( $exportFileList, exportFileList( $eid , $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ) );
            }

        }
I can export image + other files, but not video files.
obagi
Posts: 15
Joined: Sat Aug 22, 2009 5:55 am

Re: Video export does not work (ZM 1.25.0 + Ubuntu 11.04)

Post by obagi »

For export to zip you need to install zip.
If you want to include video you need to generate it first:
http://www.zoneminder.com/wiki/index.ph ... t_as_video
rassi
Posts: 5
Joined: Tue Jan 31, 2012 5:57 am

Re: Video export does not work (ZM 1.25.0 + Ubuntu 11.04)

Post by rassi »

Thanks, that one was easy :)

I did have zip and it didnt give any error after video was created.
Locked