Page 1 of 1

Video Export Generation Failed! (v1.24.2)

Posted: Sun Jul 26, 2009 12:35 pm
by marcus2001
Hi all,

As ZoneMinder seems to be a great piece of free and Open Source software, I'm very intersting for using it in order to survey my shop.

Here is my configuration:
- EEEbox + Xubuntu 9.04
- Two D-Link DCS 910 (they work with software named motion)
- ZoneMinder v1.23.3 installed thanks to Synaptic package manager

I've set up following settings in /etc/sysctl.conf file:
- kernel.shmall=134217728
- kernel.shmmax=134217728
(and reboot).

Here is the configuration of one of my webcams:

Code: Select all

-GENERAL
--NAME: CAM-CAISSE
-- Source Type: Remote
-- Function: Monitor
-- Enabled: checked
-- Max FPS: 15.00
-- Reference Image Blend: 7

-SOURCE
-- Remote Host Name: 192.168.1.20 (authentication is disabled)
-- Remote Host Port: 80
-- Remote Host Path: /VIDEO.CGI?
-- Remote Image Colours: 24bits
-- Capture Width: 640
-- Capture Height: 480
-- Preserver Aspect Ration: not checked
-- Orientation: Normal
All other settings are set up to default values.

Here an extract of the logs:

Code: Select all

Jul 26 14:29:54 cam-server zmpkg[22880]: INF [Command: start] 
Jul 26 14:29:55 cam-server zmdc[22893]: INF [Server starting at 09/07/26 14:29:55] 
Jul 26 14:29:58 cam-server zmdc[22893]: INF ['zmc -m 3' starting at 09/07/26 14:29:58, pid = 22915] 
Jul 26 14:29:58 cam-server zmdc[22915]: INF ['zmc -m 3' started at 09/07/26 14:29:58] 
Jul 26 14:29:58 cam-server zmc_m3[22915]: INF [Debug Level = 0, Debug Log = <none>]
Jul 26 14:29:58 cam-server zmc_m3[22915]: INF [Starting Capture]
Jul 26 14:29:59 cam-server zmdc[22893]: INF ['zmfilter.pl' starting at 09/07/26 14:29:59, pid = 22917] 
Jul 26 14:29:59 cam-server zmdc[22917]: INF ['zmfilter.pl' started at 09/07/26 14:29:59] 
Jul 26 14:29:59 cam-server zmdc[22893]: INF ['zmaudit.pl -c' starting at 09/07/26 14:29:59, pid = 22919] 
Jul 26 14:29:59 cam-server zmdc[22919]: INF ['zmaudit.pl -c' started at 09/07/26 14:29:59] 
Jul 26 14:30:00 cam-server zmfilter[22917]: INF [Scanning for events] 
Jul 26 14:30:00 cam-server zmdc[22893]: INF ['zmwatch.pl' starting at 09/07/26 14:30:00, pid = 22921] 
Jul 26 14:30:00 cam-server zmdc[22921]: INF ['zmwatch.pl' started at 09/07/26 14:30:00] 
Jul 26 14:30:01 cam-server zmwatch[22921]: INF [Watchdog starting] 
Jul 26 14:30:01 cam-server zmwatch[22921]: INF [Watchdog pausing for 30 seconds] 
Jul 26 14:30:01 cam-server zmdc[22893]: INF ['zmupdate.pl -c' starting at 09/07/26 14:30:01, pid = 22923] 
Jul 26 14:30:01 cam-server zmdc[22923]: INF ['zmupdate.pl -c' started at 09/07/26 14:30:01] 
Jul 26 14:30:36 cam-server zms[23115]: INF [Debug Level = 0, Debug Log = <none>]
I see no error in the log but when I try to visualize camera video output I only see a black screen!! I've tried with IE, Firefox and Opera... same problem!

Any advise would be very appreciated. Thanks :)

Marcus.

EDIT: Could a moderator move this thread in the right forum please ?

Posted: Sun Jul 26, 2009 3:29 pm
by marcus2001
Hi again,

I've decided to try ZoneMinder version 1.24.2 from sources. I've removed ZoneMinder package thanks to Synaptic and successfully installed ZoneMinder v1.24.2 from sources.

My webcams are well detected, as a prove here an extact of the TCP stream captured with Wireshark:

Code: Select all

GET /VIDEO.CGI? HTTP/1.1
User-Agent: ZoneMinder/1.24.2
Host: 192.168.1.20
Connection: Keep-Alive

HTTP/1.0 200 OK
Server: Camera Web Server/1.0
Auther: Steven Wu
MIME-version: 1.0
Cache-Control: no-cache
Content-Type: multipart/x-mixed-replace;boundary=--video boundary--

--video boundary--Content-length: 34804
Content-type: image/jpeg

...................................................
..W.......!1.AQa."2.q...#BRb...3r..$CS..4.........%
&'(5678DEFGHTUVWXcdefghstuvwx......................
....................................................
..............................W....!..1A."Qa.2q..#B3R

[........very long raw data]
I've set up them in Modect mode. Events are well generated and I can extract them as jpeg but all video extract fail saying Video generation failed.

How can I fiw this problem ? What should I check ? What am I doing wrong ? Thanks in avdance for you help.

Marcus.

Edit:

Extract from ffmep log:

Code: Select all

$ cat /var/www/zm/events/1/20/ffmpeg.log
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Apr 10 2009 23:18:41, gcc: 4.3.3

Seems stream 0 codec frame rate differs from container frame rate: 4.23 (423/100) -> 16.92 (203/12)
Input #0, image2, from '%03d-capture.jpg':
  Duration: 00:00:04.96, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: mjpeg, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], 16.92 tbr, 4.23 tbn, 4.23 tbc
Output #0, avi, to 'Event-20-r1-s1.avi':
    Stream #0.0: Video: 0x0000, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0

Posted: Sun Jul 26, 2009 5:38 pm
by marcus2001
Hi one more time,

I've found why I could not see video camera output: that was a CGI directive missing in the virtualhost set up in Apache configuration. I discovered it by checking error.log file of Apache.

Here the configuration I use:

Code: Select all

ServerName cam-recoder
<VirtualHost>
   ServerAdmin webmaster@localhost
   DocumentRoot /var/www/zm
   <Directory>
      Options FollowSymLinks
      AllowOverride None
   </Directory>
   <Directory>
      php_flag register_globals off
      Options Indexes FollowSymLinks
      <IfModule>
         DirectoryIndex index.php
      </IfModule>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
   </Directory>
   ScriptAlias /cgi-bin/ /var/www/cgi-bin/
   <Directory>
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
   </Directory>
   ErrorLog /var/log/apache2/error.log
   # Possible values include: debug, info, notice, warn, error, crit,
   # alert, emerg.
   LogLevel warn
   CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Now I can see my to webcam streams :lol: Note that I use JPEG mode. For unknown reason (to me :shock:) MPEG mode doesn't work.

Last problem: video export generation.

--> Here error.log extract:

Code: Select all

[Sun Jul 26 19:33:17 2009] [error] [client 127.0.1.1] Video Generation Failed, referer: http://cam-server/index.php?view=video&eid=35&generated=0
[Sun Jul 26 19:33:17 2009] [error] [client 127.0.1.1] array (\n  0 => \n  array (\n    'file' => '/var/www/zm/ajax/event.php',\n    'line' => 35,\n    'function' => 'ajaxError',\n    'args' => \n    array (\n      0 => 'Video Generation Failed',\n    ),\n  ),\n  1 => \n  array (\n    'file' => '/var/www/zm/index.php',\n    'line' => 116,\n    'args' => \n    array (\n      0 => '/var/www/zm/ajax/event.php',\n    ),\n    'function' => 'require_once',\n  ),\n), referer: http://cam-server/index.php?view=video&eid=35&generated=0
--> extract of zm-video.log:

Code: Select all

07/26/09 19:33:17.792132 zmvideo[4915].INF [Creating video file Event-35-r1-s1.avi for event 35]
07/26/09 19:33:17.844937 zmvideo[4915].ERR [Unable to generate video, check /var/www/zm/events/3/35/ffmpeg.log for details]
--> extract of /var/www/zm/events/3/35/ffmpeg.log

Code: Select all

FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Apr 10 2009 23:18:41, gcc: 4.3.3

Seems stream 0 codec frame rate differs from container frame rate: 3.07 (307/100) -> 58.33 (175/3)
Input #0, image2, from '%03d-capture.jpg':
  Duration: 00:00:14.65, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: mjpeg, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], 58.33 tbr, 3.07 tbn, 3.07 tbc
Output #0, avi, to 'Event-35-r1-s1.avi':
    Stream #0.0: Video: 0x0000, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0
Have you an idea how I could fix this problem ? Thanks !!

Marcus.

Posted: Sun Aug 02, 2009 7:00 am
by kingofkya
is ffmpeg compiled by you or is it a distro package

Posted: Sat Aug 08, 2009 9:13 pm
by btrotter
Was this ever fixed? I am having the same problem and was hoping you discovered the problem.

Posted: Sat Aug 22, 2009 6:38 am
by obagi
marcus2001 wrote: Note that I use JPEG mode. For unknown reason (to me :shock:) MPEG mode doesn't work.
You can use mjpeg with remote host path /MJPEG.CGI, if you uncheck ZM_NETCAM_REGEXPS under Options/Network

Posted: Mon Aug 24, 2009 8:40 pm
by cordel
Seems stream 0 codec frame rate differs from container frame rate: 3.07 (307/100) -> 58.33 (175/3)
Input #0, image2, from '%03d-capture.jpg':
Duration: 00:00:14.65, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], 58.33 tbr, 3.07 tbn, 3.07 tbc
Output #0, avi, to 'Event-35-r1-s1.avi':
Stream #0.0: Video: 0x0000, yuvj420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0
Some where it seems that your defined output container is not properly defined. check and make sure your options in ZoneMinder are set correctly in FFMPEG_FORMATS and that you are selecting a format. Otherwise you will need to trace down why it's putting in 0x0000.

Posted: Thu Sep 24, 2009 5:47 am
by promethiusan
I get this same error no matter what output format I select for video generation. I am running 1.24.2 and FFMPEG_FORMATS is set to the installation default: mpg mpeg wmv asf avi* mov swf 3gp**

I have tried ffmpeg SVN-r19480 and r20006. Am I missing something?

I posted my full ffmpeg.log file in this thread:

http://www.zoneminder.com/forums/viewtopic.php?t=14525

Posted: Tue Feb 01, 2011 10:18 pm
by insippo
anybody fix this problem ?

Posted: Sat Feb 05, 2011 8:09 am
by mastertheknife
Hi,

All those suffering from ffmpeg failing to generate a video, please try ffmpeg 0.6 or newer, although this might be break compatibility with old versions of ZM. If that happens, use ZM from SVN.

mastertheknife.

Posted: Sat Feb 05, 2011 10:15 am
by insippo
i have FFmpeg version r11872+debian_0.svn20080206-18+lenny1, Copyright (c) 2000-2008 Fabrice Bellard, et al.