Console incorrectly flips width/height when in Modect mode

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
vitus
Posts: 12
Joined: Tue Jul 09, 2019 2:08 am

Console incorrectly flips width/height when in Modect mode

Post by vitus »

I setup a camera as 720x1280 (WxH), rotate right, Modect:

Code: Select all

MariaDB [zm]> select * from Monitors \G
*************************** 1. row ***************************
                    Id: 1
                  Name: cam-front-gate
              ServerId: NULL
             StorageId: 1
                  Type: Ffmpeg
              Function: Modect
               Enabled: 1
        LinkedMonitors: NULL
              Triggers: 
                Device: /dev/video0
               Channel: 0
                Format: 255
        V4LMultiBuffer: NULL
   V4LCapturesPerFrame: 1
              Protocol: http
                Method: rtpUni
                  Host: NULL
                  Port: 80
               SubPath: 
                  Path: rtsp://cam-front-gate:5554
               Options: NULL
                  User: NULL
                  Pass: NULL
                 Width: 720
                Height: 1280
               Colours: 4
               Palette: 0
           Orientation: 90
         Deinterlacing: 0
    DecoderHWAccelName: NULL
  DecoderHWAccelDevice: NULL
             SaveJPEGs: 0
           VideoWriter: 2
           OutputCodec: NULL
       OutputContainer: NULL
     EncoderParameters: # Lines beginning with # are a comment 
# For changing quality, use the crf option
# 1 is best, 51 is worst quality
#crf=23
           RecordAudio: 0
          RTSPDescribe: 0
            Brightness: -1
              Contrast: -1
                   Hue: -1
                Colour: -1
           EventPrefix: Event-
           LabelFormat: %N - %d/%m/%y %H:%M:%S
                LabelX: 0
                LabelY: 0
             LabelSize: 1
      ImageBufferCount: 20
           WarmupCount: 0
         PreEventCount: 0
        PostEventCount: 5
    StreamReplayBuffer: 0
       AlarmFrameCount: 1
         SectionLength: 600
      MinSectionLength: 10
             FrameSkip: 0
       MotionFrameSkip: 0
      AnalysisFPSLimit: NULL
   AnalysisUpdateDelay: 0
                MaxFPS: NULL
           AlarmMaxFPS: NULL
     FPSReportInterval: 100
          RefBlendPerc: 6
     AlarmRefBlendPerc: 6
          Controllable: 0
             ControlId: NULL
         ControlDevice: NULL
        ControlAddress: NULL
       AutoStopTimeout: NULL
           TrackMotion: 0
            TrackDelay: NULL
        ReturnLocation: -1
           ReturnDelay: NULL
           DefaultRate: 100
          DefaultScale: 100
          DefaultCodec: auto
     SignalCheckPoints: 10
     SignalCheckColour: #0000c0
             WebColour: red
                  Exif: 0
              Sequence: 1
           TotalEvents: 0
   TotalEventDiskSpace: 0
            HourEvents: 0
    HourEventDiskSpace: 0
             DayEvents: 0
     DayEventDiskSpace: 0
            WeekEvents: 0
    WeekEventDiskSpace: 0
           MonthEvents: 0
   MonthEventDiskSpace: 0
        ArchivedEvents: NULL
ArchivedEventDiskSpace: NULL
             ZoneCount: 1
               Refresh: NULL
However, when I view the camera in the console, it displays it as 1280x720 (top is top, it's just warped). This is confirmed by the ZMS URL:

Code: Select all

http://....../cgi-bin/nph-zms?scale=100&width=1280px&height=720px&mode=jpeg&maxfps=30&monitor=1&connkey=647979&rand=1568331438
If I change the source back to 'Monitor', then it displays correctly.

Code: Select all

http://....../cgi-bin/nph-zms?scale=100&width=720px&height=1280px&mode=jpeg&maxfps=30&monitor=1&connkey=399160&rand=1568331806
When I change back and forth from Modect to Monitor and back, I don't even visit the source tab, but somehow the width/height are being flipped in the database.

Code: Select all

*************************** 1. row ***************************
                    Id: 1
                  Name: cam-front-gate
              ServerId: NULL
             StorageId: 1
                  Type: Ffmpeg
              Function: Monitor
               Enabled: 1
        LinkedMonitors: NULL
              Triggers: 
                Device: /dev/video0
               Channel: 0
                Format: 255
        V4LMultiBuffer: NULL
   V4LCapturesPerFrame: 1
              Protocol: http
                Method: rtpUni
                  Host: NULL
                  Port: 80
               SubPath: 
                  Path: rtsp://cam-front-gate:5554
               Options: NULL
                  User: NULL
                  Pass: NULL
                 Width: 1280
                Height: 720
               Colours: 4
               Palette: 0
           Orientation: 90
         Deinterlacing: 0
    DecoderHWAccelName: NULL
  DecoderHWAccelDevice: NULL
             SaveJPEGs: 0
           VideoWriter: 2
           OutputCodec: NULL
       OutputContainer: NULL
     EncoderParameters: # Lines beginning with # are a comment 
# For changing quality, use the crf option
# 1 is best, 51 is worst quality
#crf=23
           RecordAudio: 0
          RTSPDescribe: 0
            Brightness: -1
              Contrast: -1
                   Hue: -1
                Colour: -1
           EventPrefix: Event-
           LabelFormat: %N - %d/%m/%y %H:%M:%S
                LabelX: 0
                LabelY: 0
             LabelSize: 1
      ImageBufferCount: 20
           WarmupCount: 0
         PreEventCount: 0
        PostEventCount: 5
    StreamReplayBuffer: 0
       AlarmFrameCount: 1
         SectionLength: 600
      MinSectionLength: 10
             FrameSkip: 0
       MotionFrameSkip: 0
      AnalysisFPSLimit: NULL
   AnalysisUpdateDelay: 0
                MaxFPS: NULL
           AlarmMaxFPS: NULL
     FPSReportInterval: 100
          RefBlendPerc: 6
     AlarmRefBlendPerc: 6
          Controllable: 0
             ControlId: NULL
         ControlDevice: NULL
        ControlAddress: NULL
       AutoStopTimeout: NULL
           TrackMotion: 0
            TrackDelay: NULL
        ReturnLocation: -1
           ReturnDelay: NULL
           DefaultRate: 100
          DefaultScale: 100
          DefaultCodec: auto
     SignalCheckPoints: 10
     SignalCheckColour: #0000c0
             WebColour: red
                  Exif: 0
              Sequence: 1
           TotalEvents: 0
   TotalEventDiskSpace: 0
            HourEvents: 0
    HourEventDiskSpace: 0
             DayEvents: 0
     DayEventDiskSpace: 0
            WeekEvents: 0
    WeekEventDiskSpace: 0
           MonthEvents: 0
   MonthEventDiskSpace: 0
        ArchivedEvents: NULL
ArchivedEventDiskSpace: NULL
             ZoneCount: 1
               Refresh: NULL
Zoneminder Version: commit d1ac88d3018bb29221763effef489fca9f248690
vitus
Posts: 12
Joined: Tue Jul 09, 2019 2:08 am

Re: Console incorrectly flips width/height when in Modect mode

Post by vitus »

I turned off Apache and Zoneminder, then manually set in the database the width = 720, height = 1280, orientation = 90, and the Function = Modect. When I launched Apache and Zoneminder back up, the result was that the Console showed the camera at 1280x720 (warped, top is up). There doesn't appear to be a workaround.
User avatar
iconnor
Posts: 2879
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Console incorrectly flips width/height when in Modect mode

Post by iconnor »

The width and height you enter should be what the camera is sending... not what you want it displayed as.
Post Reply