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

не работает вращение изоражения на 3518ev200 #46

Closed
nitr0man opened this issue May 10, 2022 · 3 comments
Closed

Comments

@nitr0man
Copy link

nitr0man commented May 10, 2022

при включении вращения изображения (90 или 270) видеопотока hls/trsp нет, mjpeg.html - размер картинки повернут, сама картинка - нет (растянута/сжата под новый размер). в консоли majestic сыпет ошибки:

20:52:46 [    main] main@135                      Majestic Lite for HiSilicon, version master+912fa6f, built on 2022-03-08
20:52:46 [app_conf] load_config@345               Using /etc/majestic.yaml as main configuration
20:52:46 [app_conf] parse_app_config@689          app_config.osd_template %Y-%m-%d %H:%M:%S %Z
20:52:46 [watchdog] watchdog_start@101            Detected Hisilicon Watchdog
20:52:46 [watchdog] watchdog_start@121            Watchdog timeout set to 10 seconds
20:52:46 [     sdk] try_sensor_config@3095        Autodetected sensor as 'sc1145_i2c'
20:52:46 [     sdk] find_sensor_config@3049       matched sensor config: sc1145_i2c_720p.ini
20:52:46 [     sdk] start_sdk@246                 Using /etc/sensors/sc1145_i2c_720p.ini sensor configuration file
20:52:46 [     sdk] start_sdk@255                 App was built with MPP version: Hi3518EV200_MPP_V1.0.5.0.B060 Release
20:52:46 [     sdk] start_sdk@258                 Current MPP version: HI_VERSION=Hi3518EV200_MPP_V1.0.5.0 B060 Release
20:52:46 [     n/a]                               hi_logger
20:52:46 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:46 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
...
20:52:47 [     sdk] start_sdk@281                 sensor sc1145
20:52:47 [     sdk] start_sdk@286                   input_mode CMOS_18V, WDR NONE
20:52:47 [     sdk] start_sdk@293                   dev [1280x720]@0x0 30fps, BGGR
20:52:47 [  sensor] try_to_load@19                trying to load /usr/lib/sensors/libsns_sc1145.so
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
...
20:52:47 [     sdk] dump_vb_configuration@2018    VB configuration:
20:52:47 [     sdk] dump_vb_configuration@2028      [0]: 1843200 x 10
20:52:47 [     sdk] dump_vb_configuration@2028      [2]: 346368 x 1
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
...
20:52:47 [     sdk] init_sensor@2221              Sensor driver loaded
20:52:47 [    puts]                               linear mode
20:52:47 [    puts]                               =========================================================
20:52:47 [    puts]                               ==SC1145 sensor 720P30fps(Parallel port) init success! ==
20:52:47 [    puts]                               =========================================================
20:52:47 [     sdk] log_venc_chn@1136             H.264 720x1280 30fps 2000Kbit  90 GOP
20:52:47 [     sdk] create_vpss_chn@889             new venc: 0   vpss_grp: 0,   vpss_chn: 0
20:52:47 [     sdk] log_venc_chn@1136             H.264 576x704 15fps 512Kbit  15 GOP
20:52:47 [     sdk] create_vpss_chn@889             new venc: 1   vpss_grp: 0,   vpss_chn: 1
20:52:47 [     sdk] init_chn@1171                 JPEG snapshot snapshot venc_chn 2  1280x720
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [     osd] init_osd@92                   OSD initialized
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [image_tu] start_image_params_tuning@63  Image tuning task started
20:52:47 [     sdk] start_sdk@392                 HiSilicon SDK started
20:52:47 [   httpd] new_http_server@346           HTTP server started on :::80
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    rtsp] rtsp_init@30                  RTSP server started on port 554
20:52:47 [   netip] netip_start@2013              NETIP server started on port 34567
20:52:47 [    gpio] set_gpio@25                   set_gpio(65, 0)
20:52:47 [    gpio] set_gpio@25                   set_gpio(64, 0)
20:52:47 [   night] dn_start@220                  Starting monitor for light sensor
20:52:47 [    gpio] set_gpio@25                   set_gpio(65, 1)
20:52:47 [    gpio] set_gpio@25                   set_gpio(64, 0)
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:47 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    gpio] set_gpio@25                   set_gpio(65, 0)
20:52:48 [    gpio] set_gpio@25                   set_gpio(64, 1)
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    gpio] set_gpio@25                   set_gpio(65, 0)
20:52:48 [    gpio] set_gpio@25                   set_gpio(64, 0)
20:52:48 [   night] set_night_mode@117            Change mode to NIGHT
20:52:48 [    gpio] set_gpio@25                   set_gpio(65, 1)
20:52:48 [    gpio] set_gpio@25                   set_gpio(64, 0)
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    gpio] set_gpio@25                   set_gpio(65, 0)
20:52:48 [    gpio] set_gpio@25                   set_gpio(64, 0)
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [  client] RtspClient_before@414         RTSP OPTIONS rtsp://172.31.99.12:554/1 CSeq=1 from 172.31.99.2:45560
20:52:48 [  client] RtspClient_before@414         RTSP DESCRIBE rtsp://172.31.99.12:554/1 CSeq=2 from 172.31.99.2:45560
20:52:48 [     nal] NalCodec_describe@110         RTSP chn 0 sps_len 0
20:52:48 [     nal] NalCodec_describe@113         RTSP chn 0 pps_len 0
20:52:48 [     nal] NalCodec_describe@119         RTSP chn 0 profile_level_id 000000
20:52:48 [  client] RtspClient_before@414         RTSP SETUP rtsp://172.31.99.12:554/1/video CSeq=3 from 172.31.99.2:45560
20:52:48 [  client] RtspClient_setup@328          TCP RTSP SETUP done, stream_id=0 from 172.31.99.2:45560
20:52:48 [  client] RtspClient_before@414         RTSP PLAY rtsp://172.31.99.12:554/1 CSeq=4 from 172.31.99.2:45560
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [  client] RtspClient_before@414         RTSP OPTIONS rtsp://172.31.99.12:554/0 CSeq=1 from 172.31.99.2:45562
20:52:48 [  client] RtspClient_before@414         RTSP DESCRIBE rtsp://172.31.99.12:554/0 CSeq=2 from 172.31.99.2:45562
20:52:48 [     nal] NalCodec_describe@110         RTSP chn 0 sps_len 0
20:52:48 [     nal] NalCodec_describe@113         RTSP chn 0 pps_len 0
20:52:48 [     nal] NalCodec_describe@119         RTSP chn 0 profile_level_id 000000
20:52:48 [  client] RtspClient_before@414         RTSP SETUP rtsp://172.31.99.12:554/0/video CSeq=3 from 172.31.99.2:45562
20:52:48 [  client] RtspClient_setup@328          TCP RTSP SETUP done, stream_id=0 from 172.31.99.2:45562
20:52:48 [  client] RtspClient_before@414         RTSP PLAY rtsp://172.31.99.12:554/0 CSeq=4 from 172.31.99.2:45562
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:48 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:49 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:49 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:49 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:49 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 
20:52:49 [     sdk] venc_read@814                 Timeout get any data from venc channel 0
20:52:49 [     sdk] venc_read@834                 NOTE: Current frame is NULL!
20:52:49 [    venc] VencCheckVpssSendInfo@1027    [  venc] Venc 0 : Sendinfo pic info err. 

загруженные модули ядра:

Module                  Size  Used by    Tainted: P  
wdt                     4147  0 
hi_mipi                22988  0 
pwm                     1840  0 
sensor_i2c              1792  0 
hi3518e_ive           192049  0 
hi3518e_jpege          46910  0 
hi3518e_h264e         163968  0 
hi3518e_chnl           30512  0 
hi3518e_venc          220133  2 hi3518e_jpege,hi3518e_h264e
hi3518e_rc             70552  0 
hi3518e_vpss          243231  0 
hi3518e_viu           246239  1 hi3518e_vpss
hi3518e_isp           112421  3 sensor_i2c,hi3518e_vpss,hi3518e_viu
hi3518e_vgs           125656  0 
hi3518e_region         65048  0 
hi3518e_tde           113380  1 hi3518e_region
hi3518e_sys            88874  3 hi3518e_venc,hi3518e_vpss,hi3518e_viu
hi3518e_base           51435 13 hi3518e_ive,hi3518e_jpege,hi3518e_h264e,hi3518e_chnl,hi3518e_venc,hi3518e_rc,hi3518e_vpss,hi3518e_viu,hi3518e_isp,hi3518e_vgs,hi3518e_region,hi3518e_tde,hi3518e_sys
hi_media                5917 11 hi_mipi,hi3518e_ive,hi3518e_jpege,hi3518e_h264e,hi3518e_vpss,hi3518e_viu,hi3518e_isp,hi3518e_vgs,hi3518e_tde,hi3518e_sys,hi3518e_base
mmz                    19902  8 hi3518e_ive,hi3518e_jpege,hi3518e_h264e,hi3518e_viu,hi3518e_isp,hi3518e_tde,hi3518e_sys,hi3518e_base
sys_config              5172  0 
bridge                105312  0 
stp                     1355  1 bridge
llc                     3224  2 bridge,stp
8188eu               1027043  0 
cfg80211              233887  1 8188eu

majestic 2.2.05.07-lite, билд мастер ветки с небольшими правками (убраны модули аудиокодека, добавлен wifi + hostapd) https://github.com/nitr0man/firmware/tree/16d006e7addf86e3d78e40e9348014264e825cbe

плата juan 18EV200_V205P

majestic.yaml:

system:
  logLevel: TRACE
  updateChannel: stable
  buffer: 1024
  webPort: 80
isp:
  blkCnt: 10
  exposure: auto
  slowShutter: high
  antiFlicker: 50Hz
  memMode: normal
  rawMode: fast
  drc: 800
image:
  mirror: false
  flip: false
  rotate: 90
  contrast: auto
  hue: 50
  saturation: 50
  luminance: auto
osd:
  enabled: true
  font: /usr/share/fonts/truetype/UbuntuMono-Regular.ttf
  template: "%Y-%m-%d %H:%M:%S %Z"
  posX: 2
  posY: 2
nightMode:
  enabled: true
  irSensorPin: 62
  irCutPin1: 65
  irCutPin2: 64
  pinSwitchDelayUs: 150
  nightAPI: false
  irSensorPinInvert: true
records:
  enabled: false
  path: /mnt/mmc/%Y/%m/%d/%H.mp4
  maxUsage: 95
video0:
  enabled: true
  codec: h264
  gopMode: smart
  rcMode: avbr
  bitrate: 2000
  gopSize: 3
video1:
  enabled: true
  codec: h264
  gopMode: smart
  fps: 15
  rcMode: avbr
  gopSize: 1
  bitrate: 512
jpeg:
  enabled: true
  toProgressive: false
mjpeg:
  size: 640x360
  fps: 5
  bitrate: 1024
audio:
  enabled: false
  volume: auto
  srate: 8000
  codec: mp3
  outputEnabled: false
rtsp:
  enabled: true
  port: 554
hls:
  enabled: true
youtube:
  enabled: false
motionDetect:
  enabled: true
  profile: outdoor
  visualize: true
  debug: false
ipeye:
  enabled: false
netip:
  enabled: true
  user: admin
  password: 6V0Y4HLF
  port: 34567
  snapshots: true
  ignore_set_time: false
  ignore: false
onvif:
  enabled: true
raw:
  mode: slow
  enabled: false
watchdog:
  enabled: true
  timeout: 10
cloud:
  enabled: false
@widgetii
Copy link
Member

По логам на предоставленной камере:

08:50:08 [     viu] VIU_DRV_FuncPreFilter@4916    [   viu] Can't support rotate op when vi_vpss online.
08:50:08 [     hal] HiSi_HAL_SetVIRotate@990      Cannot set rotate state for VI chn 0
08:50:08 [     hal] HiSi_HAL_SetVIRotate@990      ERR_VI_NOT_SUPPORT: The operation is not supported

В скрипте /usr/bin/load_hisilicon необходимо поменять b_arg_online=1 на b_arg_online=0, для того, чтобы перевести систему из online в offline режим

@flyrouter
Copy link
Member

flyrouter commented Dec 16, 2022

Переоткрыт тикет, так как поворот на 180 градусов и зеркалирование на камере работают при b_arg_online=0
а вот поворот на 90 и 270 градусов - нет, ошибки приложены.
Пациент - многострадальная HS303 v2 на HI3518EV200 и OV9732

Majestic Lite for HiSilicon, version HEAD+31b582d, built on 2022-12-16

image:
  mirror: false
  flip: false
  rotate: 90
19:07:46  <       majestic> [   night] set_night_mode@124            Change mode to NIGHT
19:07:46  <       majestic> [    gpio] set_gpio@25                   set_gpio(2, 1)
19:07:46  <       majestic> [    gpio] set_gpio@25                   set_gpio(56, 1)
19:07:52  <       majestic> [     sdk] init_chn@1280                 JPEG snapshot snapshot venc_chn 1  720x1280
19:07:52  <       majestic> [     sdk] start_jpeg@1362                 jpeg_enc took 240KB of MMZ [225]
19:07:52  <       majestic> [    jpeg] sdk_take_jpeg@84              take jpeg venc_chn(1)   720x1280  q:50
19:07:52  <      hi_logger> [   jpege] JpegeCheckChnAttr@1264        [ jpege] PicHeight(1280) err! should be [32,8192]!
19:07:52  <      hi_logger> [   jpege] JPEGE_SetChnAttr@892          [ jpege] JPEGE_SetChnAttr: Chn Attr Invalid!
19:07:52  <      hi_logger> [    venc] VencSetChnAttr@10070          [  venc] Venc 1 set venc attr err. 
19:07:52  <       majestic> [    jpeg] sdk_take_jpeg@146             Cannot set VENC chn 1 attr
19:07:52  <       majestic> [    jpeg] sdk_take_jpeg@146             ERR_VENC_ILLEGAL_PARAM: The parameter is invalid
19:07:52  <       majestic> [  on_jpg] on_jpeg_data_cb@71            Empty data has been returned for JPEG request
^C
19:08:02  <       majestic> [     log] printf@268                    Interrupt signal received
19:08:02  <       majestic> [    gpio] set_gpio@25                   set_gpio(2, 0)
19:08:02  <       majestic> [   audio] deinit_audio_in@537           audio system is deinitialized


@Melckor
Copy link

Melckor commented Dec 16, 2022

тесты показывают
не работает выдача снапшота http://ip:port/image.jpg при включённой ротации 90 или 270 градусов.
при ротации 90 или 270 градусов OSD [%T %f %d-%m-%Y] не вмещается в экран и
270
уходит вправо
90

не работает на отображение пункт http://ip:port/cgi-bin/preview.cgi

превью

@widgetii widgetii reopened this Dec 30, 2022
@skilurius skilurius closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants