Empty files with H264 Passthrough

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
trumee
Posts: 24
Joined: Tue Mar 08, 2011 3:33 pm

Empty files with H264 Passthrough

Post by trumee » Fri Oct 12, 2018 11:26 am

Hello,

My Foscam camera's are creating a lot of empty video files after upgrading to 1.32 and making use of H264 Passthrough. Here is an example event,

Image

According to ZM there should be 11 frames, however if you look at the file it is empty,

Code: Select all

#mediainfo 50076-video.mp4 
General
Complete name                            : 50076-video.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 315 Bytes
Track name                               : Zoneminder Security Recording
Writing application                      : Lavf57.83.100
Any idea what could be the issue?

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

Re: Empty files with H264 Passthrough

Post by iconnor » Fri Oct 12, 2018 1:24 pm

There will be errors in your logs. Look there.

trumee
Posts: 24
Joined: Tue Mar 08, 2011 3:33 pm

Re: Empty files with H264 Passthrough

Post by trumee » Fri Oct 12, 2018 10:17 pm

Is it possible to find log for this 50076 event?

The logs in the webui dont go back enough so there are no errors under zmc_m12 and zma_m12.

trumee
Posts: 24
Joined: Tue Mar 08, 2011 3:33 pm

Re: Empty files with H264 Passthrough

Post by trumee » Sat Oct 13, 2018 10:55 am

Here is a log for an empty video event 55029 create at 15:52:52. The previous event 55028 was ok and did have a video.

Code: Select all

10/13/18 15:52:32.284523 zmc_m10[2861].INF-zm_monitor.cpp/2473 [GroundBedRoomHD-2: images:173500 - Capturing at 10.00 fps, capturing bandwidth 92347bytes/sec]
10/13/18 15:52:37.996849 zmc_m10[2861].INF-zm_videostore.cpp/54 [Opening video storage stream /mnt/zm/events/10/2018-10-13/55025/55025-video.mp4 format: mp4]
10/13/18 15:52:40.408183 zmc_m10[2861].INF-zm_ffmpeg_camera.cpp/825 [Deleting videoStore instance]
10/13/18 15:52:40.820839 zmc_m10[2861].INF-zm_videostore.cpp/54 [Opening video storage stream /mnt/zm/events/10/2018-10-13/55027/55027-video.mp4 format: mp4]
10/13/18 15:52:42.416920 zmc_m10[2861].INF-zm_monitor.cpp/2473 [GroundBedRoomHD-2: images:173600 - Capturing at 10.00 fps, capturing bandwidth 135694bytes/sec]
10/13/18 15:52:44.028936 zmc_m10[2861].INF-zm_ffmpeg_camera.cpp/825 [Deleting videoStore instance]
10/13/18 15:52:47.617042 zmc_m10[2861].INF-zm_videostore.cpp/54 [Opening video storage stream /mnt/zm/events/10/2018-10-13/55028/55028-video.mp4 format: mp4]
10/13/18 15:52:51.429233 zmc_m10[2861].INF-zm_ffmpeg_camera.cpp/825 [Deleting videoStore instance]
10/13/18 15:52:52.195007 zmc_m10[2861].INF-zm_monitor.cpp/2473 [GroundBedRoomHD-2: images:173700 - Capturing at 10.00 fps, capturing bandwidth 241706bytes/sec]
10/13/18 15:52:52.305845 zmc_m10[2861].INF-zm_videostore.cpp/54 [Opening video storage stream /mnt/zm/events/10/2018-10-13/55029/55029-video.mp4 format: mp4]
10/13/18 15:52:54.525112 zmc_m10[2861].INF-zm_ffmpeg_camera.cpp/825 [Deleting videoStore instance]
10/13/18 15:53:02.219890 zmc_m10[2861].INF-zm_monitor.cpp/2473 [GroundBedRoomHD-2: images:173800 - Capturing at 10.00 fps, capturing bandwidth 85055bytes/sec]

The zma log is as follows,

Code: Select all

10/13/18 15:52:32.701919 zma_m10[2864].INF-zm_monitor.cpp/1247 [GroundBedRoomHD-2: 173500 - Analysing at 10.00 fps]
10/13/18 15:52:37.921279 zma_m10[2864].INF-zm_monitor.cpp/1544 [GroundBedRoomHD-2: 173552 - Gone into alarm state PreAlarmCount: 0 > AlarmFrameCount:2]
10/13/18 15:52:37.928603 zma_m10[2864].INF-zm_monitor.cpp/1606 [GroundBedRoomHD-2: 173552 - Opening new event 55025, alarm start]
10/13/18 15:52:39.869127 zma_m10[2864].INF-zm_monitor.cpp/1639 [GroundBedRoomHD-2: 173570 - Gone into alert state]
10/13/18 15:52:40.348136 zma_m10[2864].INF-zm_monitor.cpp/1643 [GroundBedRoomHD-2: 173575 - Left alarm state (55025) - 23(18) images]
10/13/18 15:52:40.349003 zma_m10[2864].INF-zm_monitor.cpp/1647 [GroundBedRoomHD-2: 173575 - Closing event 55025, alarm end]
10/13/18 15:52:40.805368 zma_m10[2864].INF-zm_monitor.cpp/1544 [GroundBedRoomHD-2: 173579 - Gone into alarm state PreAlarmCount: 0 > AlarmFrameCount:2]
10/13/18 15:52:40.806905 zma_m10[2864].INF-zm_monitor.cpp/1606 [GroundBedRoomHD-2: 173579 - Opening new event 55027, alarm start]
10/13/18 15:52:42.837295 zma_m10[2864].INF-zm_monitor.cpp/1247 [GroundBedRoomHD-2: 173600 - Analysing at 10.00 fps]
10/13/18 15:52:43.456295 zma_m10[2864].INF-zm_monitor.cpp/1639 [GroundBedRoomHD-2: 173606 - Gone into alert state]
10/13/18 15:52:43.941521 zma_m10[2864].INF-zm_monitor.cpp/1643 [GroundBedRoomHD-2: 173611 - Left alarm state (55027) - 32(27) images]
10/13/18 15:52:43.942166 zma_m10[2864].INF-zm_monitor.cpp/1647 [GroundBedRoomHD-2: 173611 - Closing event 55027, alarm end]
10/13/18 15:52:47.561178 zma_m10[2864].INF-zm_monitor.cpp/1544 [GroundBedRoomHD-2: 173647 - Gone into alarm state PreAlarmCount: 0 > AlarmFrameCount:2]
10/13/18 15:52:47.563103 zma_m10[2864].INF-zm_monitor.cpp/1606 [GroundBedRoomHD-2: 173647 - Opening new event 55028, alarm start]
10/13/18 15:52:48.163467 zma_m10[2864].INF-zm_monitor.cpp/1639 [GroundBedRoomHD-2: 173653 - Gone into alert state]
10/13/18 15:52:48.255657 zma_m10[2864].INF-zm_monitor.cpp/1633 [GroundBedRoomHD-2: 173654 - Gone back into alarm state]
10/13/18 15:52:50.861415 zma_m10[2864].INF-zm_monitor.cpp/1639 [GroundBedRoomHD-2: 173680 - Gone into alert state]
10/13/18 15:52:51.368778 zma_m10[2864].INF-zm_monitor.cpp/1643 [GroundBedRoomHD-2: 173685 - Left alarm state (55028) - 38(32) images]
10/13/18 15:52:51.369881 zma_m10[2864].INF-zm_monitor.cpp/1647 [GroundBedRoomHD-2: 173685 - Closing event 55028, alarm end]
10/13/18 15:52:52.269074 zma_m10[2864].INF-zm_monitor.cpp/1544 [GroundBedRoomHD-2: 173696 - Gone into alarm state PreAlarmCount: 0 > AlarmFrameCount:2]
10/13/18 15:52:52.270882 zma_m10[2864].INF-zm_monitor.cpp/1606 [GroundBedRoomHD-2: 173696 - Opening new event 55029, alarm start]
10/13/18 15:52:52.617564 zma_m10[2864].INF-zm_monitor.cpp/1247 [GroundBedRoomHD-2: 173700 - Analysing at 10.00 fps]
10/13/18 15:52:54.055196 zma_m10[2864].INF-zm_monitor.cpp/1639 [GroundBedRoomHD-2: 173714 - Gone into alert state]
10/13/18 15:52:54.497589 zma_m10[2864].INF-zm_monitor.cpp/1643 [GroundBedRoomHD-2: 173719 - Left alarm state (55029) - 23(18) images]
10/13/18 15:52:54.498385 zma_m10[2864].INF-zm_monitor.cpp/1647 [GroundBedRoomHD-2: 173719 - Closing event 55029, alarm end]
10/13/18 15:53:02.617127 zma_m10[2864].INF-zm_monitor.cpp/1247 [GroundBedRoomHD-2: 173800 - Analysing at 10.00 fps]

There is supposed to be 23 frames in the event 55029,
Image

but the file is empty,

Code: Select all

$ mediainfo 55029-video.mp4 
General
Complete name                            : 55029-video.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 315 Bytes
Track name                               : Zoneminder Security Recording
Writing application                      : Lavf57.83.100
The event prior to 55029 does have a video though,

Code: Select all

$ mediainfo 55028-video.mp4 
General
Complete name                            : 55028-video.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 574 KiB
Duration                                 : 2 s 169 ms
Overall bit rate                         : 2 167 kb/s
Movie name                               : Zoneminder Security Recording
Writing application                      : Lavf57.83.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 2 s 169 ms
Bit rate                                 : 2 163 kb/s
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 11.065 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.636
Stream size                              : 573 KiB (100%)

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

Re: Empty files with H264 Passthrough

Post by iconnor » Sat Oct 13, 2018 3:10 pm

What are your pre and post event frames settings?

24 frames isn't a very long event

Unfortunately the design of this release is flawed, ad the .mp4 writing is done by zmc and the event detection is done by zma and it is possible for zma to open an event and close it without zmc noticing.

I already have code that fixes it, but it will be going in 1.33 in the next couple of weeks.

I would suggest increasing post-event frames to see if you can get the event to last a little longer for zmc to get more frames in.

trumee
Posts: 24
Joined: Tue Mar 08, 2011 3:33 pm

Re: Empty files with H264 Passthrough

Post by trumee » Sat Oct 13, 2018 8:09 pm

I have the default settings of,

Pre Event Image Count 0
Post Event Image Count 5

I will try to increase the Post Event Image count as you suggested.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests