Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default ONVIF 'Maximum FPS' causes video glitches #1350

Closed
jburgess777 opened this issue Mar 19, 2016 · 1 comment · Fixed by #1364
Closed

Default ONVIF 'Maximum FPS' causes video glitches #1350

jburgess777 opened this issue Mar 19, 2016 · 1 comment · Fixed by #1364
Labels

Comments

@jburgess777
Copy link
Contributor

After setting up my ONVIF Netvis TH661 camera using the default settings I found that SD video occasionally glitched, triggering frequent alarms. When using HD I would only ever get the top 1/4 of the frame, the rest would be a smear.

The 'Maximum FPS' defaults are set to match the camera frame rate. Once I cleared this field everything worked much better. I think that when an ONVIF camera is detected it should leave the 'Maximum FPS' blank, or set it to something higher than the camera FPS.

When the maximum FPS is too low the zmc process calls nanosleep() to slow itself down. This then causes the receive queue (netstat Recv-Q) of the UDP sockets to fill and drop data (/proc/net/udp drops):

$ sudo netstat -alnp | grep zmc
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp       83      0 192.168.1.104:59683     192.168.1.246:554       ESTABLISHED 4915/zmc
udp   111872      0 0.0.0.0:34448           0.0.0.0:*                           4915/zmc
udp        0      0 0.0.0.0:34449           0.0.0.0:*                           4915/zmc
udp   131328      0 0.0.0.0:34450           0.0.0.0:*                           4915/zmc
udp        0      0 0.0.0.0:34451           0.0.0.0:*                           4915/zmc

$ cat /proc/net/udp                                                                                                                                
   sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode ref pointer drops                                                                          
   8: 00000000:8690 00000000:0000 07 00000000:0001DB00 00:00000000 00000000    48        0 1050936 2 ffff8800b9fc6400 13932                                                                  
   9: 00000000:8691 00000000:0000 07 00000000:00000000 00:00000000 00000000    48        0 1050937 2 ffff8800b9fc7400 0                                                                      
  10: 00000000:8692 00000000:0000 07 00000000:00009F00 00:00000000 00000000    48        0 1050938 2 ffff8800b9fc7000 1677                                                                   
  11: 00000000:8693 00000000:0000 07 00000000:00000000 00:00000000 00000000    48        0 1050939 2 ffff8800b9fc7c00 0                                                                      
@knight-of-ni
Copy link
Member

Yes, this is a known issue with the MAX FPS fields, as indicated by the newly added help text.
We need to change the Onvif code so it does not populate either of those fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants