hi35xx / hi35xx-buildroot

buildroot for hisilicon hi35xx series
Other
143 stars 95 forks source link

hi3518ev200 and sensor ar0130; live-streamer #13

Open walnut-engineering opened 5 years ago

walnut-engineering commented 5 years ago

Hello, I compiled using hi3518v200_defconfig and am able to boot using the generated rootfs and kernel on a meshare camera I have. Generally everything appears to work except for I cannot get a rtsp stream going.

dmesg_latest.log

/proc/umap/vb and /proc/umap/h264e not showing any streams..

walnut-engineering commented 5 years ago

cat /proc/umap/vb

[VB] Version: [Hi3518EV200_MPP_V1.0.4.1 B030 Release], Build Time[Jul  3 2017, 17:50:38]

-----VB PUB CONFIG-------------------------------------------------------------
Max Count of Pools:          0

-----VB SUPPLEMENT ATTR--------------------------------------------------------
Supplement Config:     0
Supplement Size:      48

cat /proc/umap/h264e

[H264E] Version: [Hi3518EV200_MPP_V1.0.4.1 B030 Release], Build Time[Jul  3 2017, 17:50:46]

-----MODULE PARAM--------------------------------------------------------------
      OnePack  H264eVBSource    H264eRcnEqualRef    H264eMiniBufMode
            0              1                   0                   0
-----CHN ATTR------------------------------------------------------------------
     ID    MaxWidth   MaxHeight   Width    Height   profile   C2GEn   BufSize   ByFrame   MaxStrCnt

-----PICTURE INFO--------------------------------------------------------------
     ID     EncdStart   EncdSucceed        Lost        Disc        Skip       Pskip      Recode      RlsStr     UnrdStr

-----STREAM BUFFER-------------------------------------------------------------
     ID     Base        RdTail      RdHead      WrTail      WrHead      DataLen     BufFree     

-----RefParam INFO--------------------------------------------------------------
     ID    EnPred        Base     Enhance bVirtualIEnable  VirtualIInterval VirtualIQpDelta GetVbFail

-----ROI INFO------------------------------------------------------------------
     ID     Index    bAbsQp    Qp     Width    Height    StartX    StartY   BgSrcFr   BgTarFr

-----Syntax INFO1---------------------------------------------------------------
     ID SlcspltEn   Slcmode   Slcsize   IntraRefresh  enIslice    RefreshLine   QpOfIDR

-----Inter & Intra prediction INFO---------------------------------------------
     ID   profile  HWsize  VWsize  P16x16   P16x8   P8x16    P8x8   MvExt  I16x16    Inxn    Ipcm

-----Syntax INFO2--------------------------------------------------------------
     ID   Profile   EntrpyI   EntrpyP  Itrans  Ptrans QMatrix   POC   DblkIdc   Alpha    Beta
walnut-engineering commented 5 years ago

Getting closer!

I start live-streamer with the command

live-streamer -S ar0130 -B

Next I connect to the rtsp stream via the URL rtsp://192.168.1.240/0 in VLC and get the following output on the camera:

linear mode
hi_i2c_wait_txfifo_notfull->241:
abort! last int_raw_status: 0x750!

hi_i2c_abortprocess->87:
tx_abrt_src is 1.

< the 4 lines above repeats a bunch >

Aptina AR0130 sensor 720P30fps init success!

full log: live-streamer.log

@xuhuashan do you have any ideas of what this error means?

After that I do see some stream info in /proc/umap/h264e:

cat /proc/umap/h264e

[H264E] Version: [Hi3518EV200_MPP_V1.0.4.1 B030 Release], Build Time[Jul  3 2017, 17:50:46]

-----MODULE PARAM--------------------------------------------------------------
      OnePack  H264eVBSource    H264eRcnEqualRef    H264eMiniBufMode
            0              1                   1                   1
-----CHN ATTR------------------------------------------------------------------
     ID    MaxWidth   MaxHeight   Width    Height   profile   C2GEn   BufSize   ByFrame   MaxStrCnt
      0      1280       720       1280       720        hp       N   1843200         N           4

However VLC and mplayer is unable to connect, not sure how to debug further...

I will keep digging..

BigNerd95 commented 4 years ago

Same problem here, did you solve the problem?

walnut-engineering commented 4 years ago

Nope, never figured it out. I did get a hold of Watson (@xuhuashan) via email and the feedback I got was:

the arguments of the live-streamer of is not enough, you must add the pipeline via -pipe argument, and rtsp stream via -stream PATH:[,] for example:

live-streamer -pipe "isp0:sensor=ar0130|videv0|vichn0-0|vpgrp0|vpchn0-0" -pipe "vpchn0-0|vechn0:encoding=H264,br=2048" -stream "0:vechn0"

you can add more rtsp streams via -stream argument, and more pipeline via -pipe argument.

hope this can help you.

Trying that command line seems to start the server, but upon connecting I got a lot of i2c errors; see attached. Watson took a look at the log and said:

live-streamer.log

From the log, your i2c is not working properly. You can check it by following the steps below.

  1. Check if the i2c hardware is correct. If you have an oscilloscope, you can view the waveforms of scl and sda pin.
  2. Check if the scl/sda pin multiplexing of i2c is configured correctly.
  3. Check that the i2c clock is configured correctly.
  4. Check if the i2c address in the driver is the same as the actual address of the cmos sensor.

I'm sure its not a hardware issue (its an off the shelf camera that works with the stock firmware) ; so perhaps an i2c config issue; but not sure where to look.

If you have any clues for me that would be awesome!

walnut-engineering commented 4 years ago

Hello,

Did you see my reply on GitHub? I would love to solve this problem!

Thanks!

On Sat, Feb 22, 2020, 1:09 AM Lorenzo Santina notifications@github.com wrote:

Same problem here, did you solve the problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hi35xx/hi35xx-buildroot/issues/13?email_source=notifications&email_token=AAS4OAQDJONLVB3B6A6SIA3REDTUVA5CNFSM4G45YXX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMU3GPI#issuecomment-589935421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS4OATWZMJUGXHCT2VU2M3REDTUVANCNFSM4G45YXXQ .

dndprojects commented 3 years ago

Hi can someone pls send me compiled live-streamer, I'm not able to compile it. I'm missing some packages.

Thanks

walnut-engineering commented 3 years ago

Not sure it will work as I think it depends on some kernel modules - build is a bit old but give it a try. live-streamer.zip