Page 1 of 2

Video Export returned with status 12

Posted: Thu Jul 16, 2015 8:23 am
by DasBrot
i have an Error if i try to export Videofiles (zip)

Log:

Code: Select all

Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12
the only thing that i found with google is

Code: Select all

case 12: return 'Failure to create temporary file';


When i try to export tar compressed There is no error but the export file is empty.

What is going wrong ?

its an Ubuntu 14.04.2 LTS
Zoneminder 1.28.1 (Isaac Connor)
Bernd

Re: Video Export returned with status 12

Posted: Fri Jul 17, 2015 5:54 pm
by knight-of-ni
Try executing this from the command line and then repeat the export:

Code: Select all

sudo chown www-data:www-data /var/cache/zoneminder/images
sudo chown www-data:www-data /var/cache/zoneminder/temp

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 12:10 pm
by DasBrot
Sorry but
Same Error : Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12
/usr/share/zoneminder/skins/classic/includes/export_functions.php

and :
Export Failed
/usr/share/zoneminder/includes/functions.php
any hint ?
Bernd

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 12:47 pm
by knight-of-ni
Verify the temp folder exists and is owned by www-data:
ls -ld /var/cache/zoneminder/temp
Next verify a symlink exists that ties that folder into your webroot:
ls -ld /usr/share/zoneminder/temp

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 12:52 pm
by DasBrot
This is the Output :

Code: Select all

root@video:~# ls -ld /var/cache/zoneminder/images
drwxr-xr-x 2 www-data www-data 4096 Jul 20 14:04 /var/cache/zoneminder/images
root@video:~# ls -ld /usr/share/zoneminder/temp
lrwxrwxrwx 1 root root 26 Mai 11 22:58 /usr/share/zoneminder/temp -> /var/cache/zoneminder/temp
temp is owned by root ?

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 1:40 pm
by knight-of-ni
I made a typo in my previous post. It should be:
ls -ld /var/cache/zoneminder/temp
Also, take a look at what is inside the temp folder:
ls -lh /var/cache/zoneminder/temp

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 1:46 pm
by DasBrot
Ok, then the Output is :

ls -ld /var/cache/zoneminder/temp
drwxr-xr-x 2 www-data www-data 4096 Jul 16 14:03 /var/cache/zoneminder/temp
root@video:~# ls -lh /var/cache/zoneminder/temp
insgesamt 4,0K
-rw-r--r-- 1 www-data www-data 45 Jul 16 14:03 zmExport.tar.gz
-rw-r--r-- 1 www-data www-data 0 Jul 20 14:06 zmFileList.txt

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 1:53 pm
by knight-of-ni
Well, it looks like using .tar.gz is working.

Not sure why using zip format is is not. Do you have the zip tool installed on your system?

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 2:25 pm
by DasBrot
When i use tar.gz then the File is empty. no Videofiles in it.

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 2:33 pm
by knight-of-ni
Did you generate the video file first, before trying to export?

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 3:12 pm
by DasBrot
Generate ?
I Mark the Events with the Checkbox on the right site (Motion detection) and click Export. Than i chose export Videofiles if present, chose the Compressor and click Export. The wrong way ?

Re: Video Export returned with status 12

Posted: Mon Jul 20, 2015 3:35 pm
by knight-of-ni
That is why the option is shown as:
Export Video Files (if present)
Rather than:
Export Video Files
You have to generate the video first. Before you click "Export", click "Video" and generate a video. Only then can you export it.

This is what is causing the error.

Re: Video Export returned with status 12

Posted: Tue Jul 21, 2015 8:23 am
by DasBrot
i only have
Export Event Details
Export Frame Details
Export Image Files
Export Video Files (if present)
Export Other Files (if present)
Export File format.

There is no Option "Video" in this Window or in the events Window.

Re: Video Export returned with status 12

Posted: Tue Jul 21, 2015 9:15 am
by DasBrot
Ok i Found a Option OPT_FFMPEG
Now i have the Video Option.

New Error is :
Unable to generate video, check /usr/share/zoneminder/events/10/15/07/16/14/22/11/ffmpeg.log for details
perhaps the path to ffmpeg is wrong.

log says
sh: 1: /usr/bin/ffmpeg: not found
so i must find the right path.

Ok .....

Ther is no ffmpeg in ubuntu 14.04 ... and i cannot install it ...

i used this guide to install ffmpeg and now create is posible.

But in very poor quality The life view is much better. And only one Video not the sequence
can i fix the quality ? JPEG_FILE_QUALITY is at 100....
Can i create more than one Event in a single File ?

Re: Video Export returned with status 12

Posted: Tue Jul 21, 2015 12:03 pm
by knight-of-ni
Ubuntu doesn't ship with ffmpeg. It ships with avconv because some clown decided to fork the ffmpeg project and do their own thing.
Change /usr/bin/ffmpeg to /usr/bin/avconv

You should have that on your system, but if you don't:

Code: Select all

sudo apt-get install libav-tools
I use these parameters for FFMPEG_OUTPUT_OPTIONS:
"-r 23.976 -qscale 1"

It should help the video quality of the export.