Video Export returned with status 12

Forum for questions and support relating to the 1.28.x releases only.
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Video Export returned with status 12

Post 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
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post 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
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post 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
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post 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
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post 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 ?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post 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
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post 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
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post 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?
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post by DasBrot »

When i use tar.gz then the File is empty. no Videofiles in it.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post by knight-of-ni »

Did you generate the video file first, before trying to export?
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post 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 ?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post 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.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post 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.
DasBrot
Posts: 23
Joined: Fri Jun 12, 2015 9:50 am

Re: Video Export returned with status 12

Post 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 ?
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Export returned with status 12

Post 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.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked