Video not recorded

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
joster69
Posts: 3
Joined: Wed Jan 09, 2019 10:30 pm

Video not recorded

Post by joster69 » Wed Jan 09, 2019 10:35 pm

Hello!

I have installed Zonminder as a plugin in Freenas but I have ran into a problem. There is no video recorded. Tested two different cameras and I can see the live stream from both but there were no video recorded. I checked the logfile and found this:

019-01-09 18:39:49.940345 web_php[31416].ERR-includes/Event.php/415 [Capture file does not exist at /var/db/zoneminder/events/1/2019-01-09/5/00259-capture.jpg]
2019-01-09 18:39:49.907363 web_php[46463].FAT-views/image.php/187 [Can't create frame capture images from video because there is no video file for this event at /var/db/zoneminder/events/1/2019-01-09/5/]
2019-01-09 18:39:49.905991 web_php[31416].ERR-includes/Event.php/407 [Can't create frame images from video because there is no video file for event 5 at /var/db/zoneminder/events/1/2019-01-09/5]
2019-01-09 18:39:49.828904 web_php[46463].ERR-includes/Event.php/415 [Capture file does not exist at /var/db/zoneminder/events/1/2019-01-09/5/00258-capture.jpg]
2019-01-09 18:39:49.804668 web_php[31416].FAT-views/image.php/187 [Can't create frame capture images from video because there is no video file for this event at /var/db/zoneminder/events/1/2019-01-09/5/]

Can someone point me in the right direction so this can be solved?

/Johan

User avatar
iconnor
Posts: 656
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Video not recorded

Post by iconnor » Thu Jan 10, 2019 3:52 pm

Is this in h264 passthrough mode? Check zmc logs.
Otherwise check zma logs.
In each monitor, are you saving jpg frames?

joster69
Posts: 3
Joined: Wed Jan 09, 2019 10:30 pm

Re: Video not recorded

Post by joster69 » Tue Jan 15, 2019 8:00 pm

No. This is "X264 Encode" mode.
Managed to have frames saved but still no video.

When I open an event and try to watch the recorded video, nothing happens when i push the "play" button. If I download a .mp4 file it is empty.

/Johan

montagdude
Posts: 53
Joined: Fri Nov 10, 2017 6:05 pm

Re: Video not recorded

Post by montagdude » Mon Jan 21, 2019 6:29 pm

Similar issue here. I am running ZoneMinder on Slackware. I just upgraded from 1.30.4 to 1.32.3. I have compiled it with ffmpeg, x264, and mp4v2 support. Everything seems to work fine with frames as it did in the previous version, including exporting the video after the fact, but if I try to get it to record video, I get these three errors every time:

Code: Select all

2019-01-21 13:17:55	zma_m1		18978	ERR	Failed opening video stream	zm_event.cpp	215
2019-01-21 13:17:55	zma_m1		18978	ERR	Failed creating mp4 file:	zm_video.cpp	179
2019-01-21 13:17:55	zma_m1		18978	ERR	Invalid file path
As far as I can tell from the code, this is failing for me because the file path supplied to VideoWriter is empty, but I don't know why that would happen. I can dig more, but if anyone can help, that would be appreciated.

montagdude
Posts: 53
Joined: Fri Nov 10, 2017 6:05 pm

Re: Video not recorded

Post by montagdude » Tue Jan 22, 2019 4:22 am

I got the video working. I had to add the following patch. Apparently staticConfig.video_file_format was not getting set properly for me, and I have no idea why, since it seems to be working everywhere else. Should I file as an issue on Github?

Code: Select all

--- src/zm_event.cpp    2019-01-21 23:17:19.881961455 -0500
+++ src/zm_event.cpp.new        2019-01-21 23:17:38.452315254 -0500
@@ -196,7 +196,7 @@

   if ( monitor->GetOptVideoWriter() != 0 ) {
     snprintf(video_name, sizeof(video_name), "%" PRIu64 "-%s", id, "video.mp4");
-    snprintf(video_file, sizeof(video_file), staticConfig.video_file_format, path, video_name);
+    snprintf(video_file, sizeof(video_file), "%s/%s", path, video_name);
     Debug(1,"Writing video file to %s", video_file );

     /* X264 MP4 video writer */

siconic
Posts: 7
Joined: Mon Jan 07, 2019 3:21 pm

Re: Video not recorded

Post by siconic » Fri Feb 08, 2019 12:53 pm

I am having the empty .mp4 files issue in freenas as well. Where did you find that patch, and what file are you adding that too and its location?

User avatar
iconnor
Posts: 656
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Video not recorded

Post by iconnor » Fri Feb 08, 2019 4:21 pm

I really don't see how that patch could have any effect, as the value of staticConfig.video_file_format is '%s/%s'

Or at least it is supposed to be. I don't see how it could be anything else. Somehow though it would have to be in order for the code to give the errors you have posted.

montagdude
Posts: 53
Joined: Fri Nov 10, 2017 6:05 pm

Re: Video not recorded

Post by montagdude » Mon Feb 11, 2019 5:01 pm

iconnor wrote:
Fri Feb 08, 2019 4:21 pm
I really don't see how that patch could have any effect, as the value of staticConfig.video_file_format is '%s/%s'

Or at least it is supposed to be. I don't see how it could be anything else. Somehow though it would have to be in order for the code to give the errors you have posted.
I don't understand it either. I added debug statements to print out the values of the various variables in that line of code, and everything came back fine except for staticConfig.video_file_format, which I believe was empty if I am remembering correctly. That is why in the patch I just hardcoded what it was supposed to be. All I could deduce was that it was some compiler quirk. I am running GCC 5.5.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests