Closed SomebodySysop closed 3 years ago
While I am still curious about the answer to this, I decided to do an end-around and simply transcode the rtsp stream to mjpeg, which the ContaCam nvr reads without issue and high efficiency.
Basically installed vlc onto a linux server running on my home network and used the rtsp to mjpeg vlc transcode command described in this post: https://www.reddit.com/r/selfhosted/comments/i5ug0t/how_to_restream_a_rtsp_live_video_in_a_way_that/g0smrkn?utm_source=share&utm_medium=web2x&context=3
And, BTW, the issue really must be with ContaCam because vlc is reading the same v4l2rtspserver rtsp stream.
No stutter, no drops. Clear, clean 1920 x 1080 stream. Problem effectively solved.
This is an issue tracking system only. If you have general questions or are a newbie, please ask for help in our chat channel.
To make sure your issue can be resolved as quickly as possible please state your
exact camera hardware: Xiaomi Xiaofang 1S
the Xiaomi-Dafang-Hacks commitid (from
git log
) you are experiencing the issue with: Latest updated. Also in Info section, it says Firmware date: nullDescription
I have my camera directly wired to my network via USB to Ethernet connection. Response via ssh and web portal is very good. However, rtsp is only stable when camera uses "FixedQP". When I use "VBR" or any other method, connection is dropped constantly and consistently.
Can anyone tell me why that is? I have been using dafang-hacks on wyze and xiomi xiaofang cameras for 3 years now, and I would say the camera behaves as if it is on a bad wifi connection. I have had much better vbr reception with older firmware (2 years).
What did you do to debug the issue
I am using ContaCam nvr. rtsp connection is pretty stable with fixedqp format. Once I change it to vbr, with no other changes, connection immediately becomes unstable, dropping constantly.
The rtsp connection also appears to be fairly stable, even in vbr format, on VLC.
Evidence
Not really sure which logs are relevant here.
Please add snippets from the logfiles in:
/system/sdcard/log/startup.log
/var/log/*
dmesg [19180.043297] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [19180.050492] i2c i2c-0: --I2C txabrt: [19180.054244] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [19180.060833] error: sensor_read,172 ret = -5 [19180.065140] sensor_read: addr=0x4 value = 0x0 [19180.069715] err sensor read addr = 0x4, value = 0x0 [19180.134884] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [19180.142001] i2c i2c-0: --I2C txabrt: [19180.145688] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [19180.152263] error: sensor_read,172 ret = -5 [19180.156572] sensor_read: addr=0xa value = 0x0 [19180.161260] err sensor read addr = 0xa, value = 0x0 [19180.226404] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [19180.233564] i2c i2c-0: --I2C txabrt: [19180.237252] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [19180.243832] error: sensor_read,172 ret = -5 [19180.248141] sensor_read: addr=0x0 value = 0x0 [19180.252839] err sensor read addr = 0x0, value = 0x0 [19180.318080] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [19180.325191] i2c i2c-0: --I2C txabrt: [19180.328881] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [19180.335456] error: sensor_read,172 ret = -5 [19180.339763] sensor_read: addr=0x300a value = 0x0 [19180.344623] err sensor read addr = 0x300a, value = 0x0 [19180.410386] sensor_read: addr=0xa value = 0xf [19180.415458] sensor_read: addr=0xb value = 0x23 [19180.480288] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [19180.487500] i2c i2c-0: --I2C txabrt: [19180.491219] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [19180.497777] error: sensor_read,172 ret = -5 [19180.502102] sensor_read: addr=0x31f3 value = 0x0 [19180.506946] err sensor read addr = 0x31f3, value = 0x0 [19180.572350] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [19180.579442] i2c i2c-0: --I2C txabrt: [19180.583150] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [19180.589708] error: sensor_read,172 ret = -5 [19180.594121] sensor_read: addr=0x3008 value = 0x0 [19180.598968] err sensor read addr = 0x3008, value = 0x0 [19180.604287] info: failed sensor find [19180.608377] misc sinfo_release [19180.615150] set sensor gpio as PA-low-10bit [19180.619475] probe ok ------->jxf23 [19180.772893] -----jxf23_detect: 529 ret = 0, v = 0x0f [19180.773320] -----jxf23_detect: 537 ret = 0, v = 0x23 [19180.773338] jxf23 0-0040: jxf23 chip found @ 0x40 (i2c0) [19180.778814] tx_isp: Registered sensor subdevice jxf23 0-0040 [19180.784742] do not support ctrl->cmd ====1 [19180.784764] do not support ctrl->cmd ====0 [19180.788460] do not support ctrl->cmd ====1 [19181.062921] do not support ctrl->cmd ====1 [19181.063808] jxf23 stream on [19181.099558] ###### image_tuning_v4l2_open 4219 ####### [19181.143881] &&& chan1 scaler.max_width = 1920 max_height = 1080 min_width = 128 min_height = 128 &&&
logcat I/OSD ( 2520): IMP_OSD_SetPoolSize:409600 I/Encoder ( 2520): IMP_Encoder_SetPoolSize:1048576 D/IMP-ISP ( 2520):
~~ IMP_ISP_Open[267]~~~ I/NCU ( 2520): NCU Debug mode:0 E/NCU ( 2520): open /etc/sensor/jxf23_nd.bin failed: No such file or directory D/System ( 2520): IMP_System_Init SDK Version:3.12.0-6f2a7d4 built: Mar 20 2018 18:53:49 D/System ( 2520): system_init() D/System ( 2520): Calling DSystem D/System ( 2520): Calling FrameSource D/System ( 2520): [ignored]read /proc/cpuinfo ret is NULL D/System ( 2520): Calling IVS D/System ( 2520): Calling OSD I/Alloc Manager( 2520): MEM Alloc Method is kmalloc D/KMEM Method( 2520): CMD Line Rmem Size:16019456, Addr:0x030b9000 D/KMEM Method( 2520): alloc->mem_alloc.method = kmalloc D/KMEM Method( 2520): alloc->mem_alloc.vaddr = 0x756e1000 D/KMEM Method( 2520): alloc->mem_alloc.paddr = 0x030b9000 D/KMEM Method( 2520): alloc->mem_alloc.length = 16019456 I/Alloc Manager( 2520): MEM Manager Method is continuous D/System ( 2520): Calling Encoder I/Encoder ( 2520): IMP Alloc BS Buf size:1048576 D/Encoder ( 2520): ispmem Size:8388608, Addr:0x028b9000 I/Encoder ( 2520): bank-0 paddr=028b9000 vaddr=74ee1000 size=7172608 I/Encoder ( 2520): bank-1 paddr=02f90200 vaddr=755b8200 size=1216000 D/System ( 2520): Calling Decoder D/System ( 2520): Calling FB D/Encoder ( 2520): channel-1 buffer malloc size=1386624 addr=0x72573008 D/Encoder ( 2520): channel-0 buffer malloc size=4159872 addr=0x72029008 I/Encoder ( 2520): chn-0 NCU Info vaddr=74ee1000 paddr=028b9000 size=460800 backv=74f51800 backp=02929800 outv=75032800 outp=02a0a800 total_size=2304000 D/System ( 2520): system_bind(): bind DST-OSD-0(4.0.0) to SRC-Framesource-0(0.0.0) D/System ( 2520): system_bind(): bind DST-Encoder-0(1.0.0) to SRC-OSD-0(4.0.0) D/System ( 2520): system_bind(): bind DST-Encoder-0(1.0.0) to SRC-Framesource-0(0.0.0) D/System ( 2520): system_bind(): bind DST-IVS-0(3.0.0) to SRC-Framesource-0(0.0.0) I/Framesource( 2520): [chn0]: width = 1280 height = 720 E/VBM ( 2520): VBMCreatePool()-0: w=1280 h=720 f=842094158 E/VBM ( 2520): VBMCreatePool()-0: pool->config.fmt.fmt.pix.sizeimage=1382400 sizeimage=1382400 E/VBM ( 2520): VBMCreatePool()-0: sizeimage=1382400 I/VBM ( 2520): PoolId:0, frame=0x8b3018, frame->priv=0x8b3040, frame[0].virAddr=75b34000, frame[0].phyAddr=350c000 I/VBM ( 2520): PoolId:0, frame=0x8b3048, frame->priv=0x8b3070, frame[1].virAddr=75c85800, frame[1].phyAddr=365d800 I/Encoder ( 2520): framePriv->i_fps_num=25, framePriv->i_fps_den=1Contribute Back
If your issue was resolved, please consider contributing back to the project by creating a pull request to improve the code or documentation in order to avoid that this issue arises again for other people.