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

No rtsp start with 'new V4l2rstp binary' #388

Closed
Tschipel opened this issue May 29, 2018 · 26 comments
Closed

No rtsp start with 'new V4l2rstp binary' #388

Tschipel opened this issue May 29, 2018 · 26 comments
Labels

Comments

@Tschipel
Copy link

Contents of v4l2rtspserver-master.log

/system/sdcard/bin/v4l2rtspserver-master: can't load library 'libmp3lame.so.0'
2018-05-30 05:10:48.890 ( 2.123s) [main thread ] ImpEncoder.cpp:1180 0| Found Sensor with ID:22
i264e[info]: profile Constrained Baseline, level 3.1
2018-05-30 05:10:49.608 ( 2.841s) [main thread ] ImpEncoder.cpp:123 0| OSD pos 0,0,1279,36
2018-05-30 05:10:49.609 ( 2.843s) [main thread ] ImpEncoder.cpp:123 0| OSD pos 1240,0,1279,39
2018-05-30 05:10:50.637 ( 3.871s) [update_thread ] ImpEncoder.cpp:421 0| Changed OSD
2018-05-30 05:10:50.638 ( 3.871s) [update_thread ] ImpEncoder.cpp:485 0| Changed motion sensitivity=4
2018-05-30 05:10:50.638 ( 3.871s) [update_thread ] ImpEncoder.cpp:648 0| Detection region= ((0,0)-(1279,719))
/system/sdcard/bin/v4l2rtspserver-master: /home/ptkang/work/platform/isvp_20160504_e/proj/sdk-lv3/src/imp/ivs/ivs_move/src/filter.c: 156: Start: Assertion `filter->roi.x >= 0 && filter->roi.y >= 0 && filter->roi.width >= 0 && filter->roi.height >= 0 && filter->roi.x + filter->roi.width <= filter->wholeSize.width &&filter->roi.y + filter->roi.height <= filter->wholeSize.height' failed.

@Tschipel Tschipel changed the title No rtsp start wit 'new V4l2rstp binary' No rtsp start with 'new V4l2rstp binary' May 29, 2018
@hcgonzalezpr
Copy link
Contributor

hcgonzalezpr commented May 29, 2018

On my Wyzecam V2 I get the same error :
/system/sdcard/bin/v4l2rtspserver-master: /home/ptkang/work/platform/isvp_20160504_e/proj/sdk-lv3/src/imp/ivs/ivs_move/src/filter.c: 156: Start: Assertion `filter->roi.x >= 0 && filter->roi.y >= 0 && filter->roi.width >= 0 && filter->roi.height >= 0 && filter->roi.x + filter->roi.width <= filter->wholeSize.width &&filter->roi.y + filter->roi.height <= filter->wholeSize.height' failed.

EDIT: Still same issue with commit : 7953992

@hcgonzalezpr
Copy link
Contributor

Disabling motion detection made it work as suggested in :
EliasKotlyar/Xiaomi-Dafang-Software#21

It seems the current web gui only has for 4 regions while the new code has 16 regions.

@Seraf
Copy link

Seraf commented May 30, 2018

I ran an autoupdate 1 hour ago and it broke completely v4l2rstp :

[root@DAFANG:sdcard]# ./bin/v4l2rtspserver-master 
./bin/v4l2rtspserver-master: can't load library 'libliveMedia.so'

The lib exist in the lib directory...

@EliasKotlyar
Copy link
Owner

Try to run following before starting v4l2rtspserver:

export LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib/

This line has been integrated in the startup-script:
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/firmware_mod/controlscripts/rtsp-h264

@xk4l23
Copy link

xk4l23 commented May 30, 2018

With the new V4l2rstp binary, I get the same error as reported here: EliasKotlyar/Xiaomi-Dafang-Software#21

Disabling Motion Detection does not fix this for me.

@TheGeekShield
Copy link

TheGeekShield commented May 30, 2018

i too am experiencing the same issue on dafang

i copied the latest firmware mod files a few hours ago

2018-05-29 23:20:50.474 ( 3.840s) [update_thread ] ImpEncoder.cpp:648 0| Detection region= ((0,0)-(1279,719))
/system/sdcard/bin/v4l2rtspserver-master: /home_b/xbyu/work/isvp_w/proj/sdk-lv3/src/imp/ivs/ivs_move/src/filter.c: 156: Start: Assertion `filter->roi.x >= 0 && filter->roi.y >= 0 && filter->roi.width >= 0 && filter->roi.height >= 0 && filter->roi.x + filter->roi.width <= filter->wholeSize.width &&filter->roi.y + filter->roi.height <= filter->wholeSize.height' failed.

@nik0
Copy link
Collaborator

nik0 commented May 30, 2018

try this export LD_LIBRARY_PATH=/system/sdcard/lib/:$ LD_LIBRARY_PATH
The best is too add it at the top of run.sh file

EliasKotlyar added a commit that referenced this issue May 30, 2018
@EliasKotlyar
Copy link
Owner

Hello everyone. I have pushed a new version, it should resolve this issues.

@goermezer
Copy link

Thank you! I updated the cam today and immediately lost wifi connection because of LD_LIBRARY_PATH. Now wifi and rtspserver work. But rtspserver crashes, when motion detection is enabled. This is what I get:

2018-05-30 23:08:50.381 ( 3.830s) [update_thread ] ImpEncoder.cpp:485 0| Changed motion sensitivity=3
2018-05-30 23:08:50.381 ( 3.830s) [update_thread ] ImpEncoder.cpp:648 0| Detection region= ((0,0)-(1759,992))
/system/sdcard/bin/v4l2rtspserver-master: /home_c/sxzhang/work_isvp/isvp/proj/sdk-lv3/src/imp/ivs/ivs_move/src/filter.c: 156: Start: Assertion `filter->roi.x >= 0 && filter->roi.y >= 0 && filter->roi.width >= 0 && filter->roi.height >= 0 && filter->roi.x + filter->roi.width <= filter->wholeSize.width &&filter->roi.y + filter->roi.height <= filter->wholeSize.height' failed.

If I
export LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib'
in the shell, then rtspserver doesn`t crash while activating motion detection.

@nik0
Copy link
Collaborator

nik0 commented May 30, 2018

You are right @goermezer
@EliasKotlyar how did you compile the last version of v4l2rtspserver-master ? The previous version was working ...
It should work with the libimp in /system/sdcard/lib

@xk4l23
Copy link

xk4l23 commented May 30, 2018

The new version of v4l2rtspserver only works for me, when I start it from the console after export LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib'

Starting v4l2rtspserver from the web UI still crashes with error
2018-05-30 23:37:22.160 ( 3.817s) [update_thread ] ImpEncoder.cpp:648 0| Detection region= ((0,0)-(1279,719)) /system/sdcard/bin/v4l2rtspserver-master: /home_c/sxzhang/work_isvp/isvp/proj/sdk-lv3/src/imp/ivs/ivs_move/src/filter.c: 156: Start: Assertion filter->roi.x >= 0 && filter->roi.y >= 0 && filter->roi.width >= 0 && filter->roi.height >= 0 && filter->roi.x + filter->roi.width <= filter->wholeSize.width &&filter->roi.y + filter->roi.height <= filter->wholeSize.height' failed.

@EliasKotlyar
Copy link
Owner

Hello @nik0 ,

I have made up a new repository which has all the software included with git submodules(its a cleaner way than the way we did it before:
https://github.com/Dafang-Hacks/Main
Its basically the same code like in dafang-software, but more cleaned up. Please do not use the old repository anymore. If you need to compile something, just create a submodule. I havent migrated everything, because of lack of time, but its a good starting point.

I have made the following change, and was expecting that it will start working again after that:
Dafang-Hacks/Main@50a78c8

@nik0
Copy link
Collaborator

nik0 commented May 30, 2018 via email

@christallire
Copy link

Tried fresh installation
rev a5bb359
still not working for me.

/system/sdcard/bin/v4l2rtspserver-master: /home_c/sxzhang/work_isvp/isvp/proj/sdk-lv3/src/imp/ivs/ivs_move/src/filter.c: 156: Start: Assertion filter->roi.x >= 0 && filter->roi.y >= 0 && filter->roi.width >= 0 && filter->roi.height >= 0 && filter->roi.x + filter->roi.width <= filter->wholeSize.width &&filter->roi.y + filter->roi.height <= filter->wholeSize.height' failed.`

@nik0
Copy link
Collaborator

nik0 commented May 31, 2018

my bad, my PR is not merged yet ... Have a look to #395

@digi-ghost
Copy link

I've just manually added the changes from PR 395 and I'm up and running with no issues now

@nik0
Copy link
Collaborator

nik0 commented May 31, 2018

Now merged, please check ...

@Tschipel
Copy link
Author

Result for XIAOFANG:

Contents of v4l2rtspserver-master.log

1970-01-01 08:00:20.528 ( 0.004s) [main thread ] main.cpp:439 0| Dumping environement variable
1970-01-01 08:00:20.529 ( 0.005s) [main thread ] main.cpp:442 0| USER=root
1970-01-01 08:00:20.529 ( 0.005s) [main thread ] main.cpp:442 0| LD_LIBRARY_PATH=/system/sdcard/lib/:/thirdlib:/system/lib
1970-01-01 08:00:20.530 ( 0.005s) [main thread ] main.cpp:442 0| HOME=/
1970-01-01 08:00:20.530 ( 0.005s) [main thread ] main.cpp:442 0| OLDPWD=/sys/class/gpio
1970-01-01 08:00:20.530 ( 0.006s) [main thread ] main.cpp:442 0| OPENSSL_CONF=/system/sdcard/config/openssl.cnf
1970-01-01 08:00:20.530 ( 0.006s) [main thread ] main.cpp:442 0| TERM=vt102
1970-01-01 08:00:20.531 ( 0.006s) [main thread ] main.cpp:442 0| PATH=/system/bin:/bin:/sbin:/usr/bin:/usr/sbin
1970-01-01 08:00:20.531 ( 0.006s) [main thread ] main.cpp:442 0| SHELL=/bin/sh
1970-01-01 08:00:20.531 ( 0.007s) [main thread ] main.cpp:442 0| PWD=/sys/class/gpio/gpio77
1970-01-01 08:00:20.531 ( 0.007s) [main thread ] main.cpp:442 0| rmem=15644K@0x30B9000
1970-01-01 08:00:20.532 ( 0.007s) [main thread ] main.cpp:445 0| -- end
1970-01-01 08:00:22.825 ( 2.300s) [main thread ] ImpEncoder.cpp:1175 ERR| ##### sensor not found

1970-01-01 08:00:22.828 ( 2.304s) [main thread ] ImpEncoder.cpp:1188 0| Found Sensor with ID:-1
1970-01-01 08:00:22.856 ( 2.332s) [main thread ] ImpEncoder.cpp:1215 ERR| failed to AddSensor
1970-01-01 08:00:22.856 ( 2.332s) [main thread ] ImpEncoder.cpp:837 ERR| IMP_System_Init() failed
2018-06-01 03:10:01.368 ( 0.004s) [main thread ] main.cpp:439 0| Dumping environement variable
2018-06-01 03:10:01.369 ( 0.006s) [main thread ] main.cpp:442 0| USER=root
2018-06-01 03:10:01.370 ( 0.006s) [main thread ] main.cpp:442 0| LD_LIBRARY_PATH=/system/sdcard/lib/:/thirdlib:/system/lib
2018-06-01 03:10:01.370 ( 0.006s) [main thread ] main.cpp:442 0| HOME=/
2018-06-01 03:10:01.370 ( 0.006s) [main thread ] main.cpp:442 0| OLDPWD=/sys/class/gpio
2018-06-01 03:10:01.370 ( 0.007s) [main thread ] main.cpp:442 0| TERM=vt102
2018-06-01 03:10:01.371 ( 0.007s) [main thread ] main.cpp:442 0| PATH=/system/bin:/bin:/sbin:/usr/bin:/usr/sbin
2018-06-01 03:10:01.371 ( 0.007s) [main thread ] main.cpp:442 0| SHELL=/bin/sh
2018-06-01 03:10:01.371 ( 0.007s) [main thread ] main.cpp:442 0| PWD=/sys/class/gpio/gpio77
2018-06-01 03:10:01.371 ( 0.007s) [main thread ] main.cpp:442 0| rmem=15644K@0x30B9000
2018-06-01 03:10:01.372 ( 0.008s) [main thread ] main.cpp:445 0| -- end
2018-06-01 03:10:03.671 ( 2.307s) [main thread ] ImpEncoder.cpp:1175 ERR| ##### sensor not found

2018-06-01 03:10:03.675 ( 2.311s) [main thread ] ImpEncoder.cpp:1188 0| Found Sensor with ID:-1
2018-06-01 03:10:03.702 ( 2.339s) [main thread ] ImpEncoder.cpp:1215 ERR| failed to AddSensor
2018-06-01 03:10:03.703 ( 2.339s) [main thread ] ImpEncoder.cpp:837 ERR| IMP_System_Init() failed

@Tschipel Tschipel reopened this May 31, 2018
@Tschipel
Copy link
Author

Tschipel commented May 31, 2018

Result for DAFANG: rtsp working but...
Contents of v4l2rtspserver-master.log

1970-01-01 08:00:20.014 ( 0.003s) [main thread ] main.cpp:439 0| Dumping environement variable
1970-01-01 08:00:20.015 ( 0.004s) [main thread ] main.cpp:442 0| USER=root
1970-01-01 08:00:20.015 ( 0.004s) [main thread ] main.cpp:442 0| LD_LIBRARY_PATH=/system/sdcard/lib/:/thirdlib:/system/lib
1970-01-01 08:00:20.015 ( 0.005s) [main thread ] main.cpp:442 0| HOME=/
1970-01-01 08:00:20.015 ( 0.005s) [main thread ] main.cpp:442 0| OLDPWD=/sys/class/gpio
1970-01-01 08:00:20.016 ( 0.005s) [main thread ] main.cpp:442 0| TERM=vt102
1970-01-01 08:00:20.016 ( 0.005s) [main thread ] main.cpp:442 0| PATH=/system/bin:/bin:/sbin:/usr/bin:/usr/sbin
1970-01-01 08:00:20.016 ( 0.005s) [main thread ] main.cpp:442 0| SHELL=/bin/sh
1970-01-01 08:00:20.016 ( 0.006s) [main thread ] main.cpp:442 0| PWD=/sys/class/gpio/gpio77
1970-01-01 08:00:20.017 ( 0.006s) [main thread ] main.cpp:442 0| rmem=15644K@0x30B9000
1970-01-01 08:00:20.017 ( 0.006s) [main thread ] main.cpp:445 0| -- end
1970-01-01 08:00:22.136 ( 2.125s) [main thread ] ImpEncoder.cpp:1188 0| Found Sensor with ID:22
i264e[info]: profile Constrained Baseline, level 3.1
1970-01-01 08:00:22.832 ( 2.821s) [main thread ] ImpEncoder.cpp:123 0| OSD pos 0,0,1279,36
1970-01-01 08:00:22.834 ( 2.823s) [main thread ] ImpEncoder.cpp:123 0| OSD pos 1240,0,1279,39
1970-01-01 08:00:23.848 ( 3.838s) [DeviceSource ] DeviceSource.cpp:91 0| begin thread
1970-01-01 08:00:23.854 ( 3.843s) [main thread ] main.cpp:548 0| Create ALSA Source.../dev/dsp
1970-01-01 08:00:23.855 ( 3.844s) [main thread ] ALSACapture.cpp:94 0| Audio In GetPubAttr samplerate : 8000
1970-01-01 08:00:23.855 ( 3.844s) [main thread ] ALSACapture.cpp:95 0| Audio In GetPubAttr bitwidth : 16
1970-01-01 08:00:23.855 ( 3.845s) [main thread ] ALSACapture.cpp:96 0| Audio In GetPubAttr soundmode : 1
1970-01-01 08:00:23.855 ( 3.845s) [main thread ] ALSACapture.cpp:97 0| Audio In GetPubAttr frmNum : 40
1970-01-01 08:00:23.856 ( 3.845s) [main thread ] ALSACapture.cpp:98 0| Audio In GetPubAttr numPerFrm : 1600
1970-01-01 08:00:23.856 ( 3.845s) [main thread ] ALSACapture.cpp:99 0| Audio In GetPubAttr chnCnt : 1
1970-01-01 08:00:23.858 ( 3.847s) [update_thread ] ImpEncoder.cpp:428 0| Changed OSD
1970-01-01 08:00:23.858 ( 3.848s) [update_thread ] ImpEncoder.cpp:492 0| Changed motion sensitivity=4
1970-01-01 08:00:23.859 ( 3.848s) [update_thread ] ImpEncoder.cpp:655 0| Detection region= ((0,0)-(1279,719))
1970-01-01 08:00:23.867 ( 3.856s) [update_thread ] ImpEncoder.cpp:497 0| Changed motion region
1970-01-01 08:00:23.867 ( 3.856s) [update_thread ] ImpEncoder.cpp:505 0| Display motion OSD color=2
1970-01-01 08:00:24.265 ( 4.254s) [main thread ] ALSACapture.cpp:126 0| Audio In GetChnParam usrFrmDepth : 20
1970-01-01 08:00:24.266 ( 4.255s) [main thread ] ALSACapture.cpp:154 0| Audio In GetVol vol : 0
1970-01-01 08:00:24.266 ( 4.255s) [main thread ] ALSACapture.cpp:387 0| disabled highfilter
1970-01-01 08:00:24.456 ( 4.445s) [main thread ] ALSACapture.cpp:406 0| NS Filter disabled
1970-01-01 08:00:24.540 ( 4.529s) [DeviceSource ] DeviceSource.cpp:91 0| begin thread
1970-01-01 08:00:24.551 ( 4.540s) [main thread ] main.cpp:152 0| Play this stream using the URL "rtsp://0.0.0.0:8554/unicast"
2018-06-01 02:40:05.384 (1527791985.373s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:40:05.384 (1527791985.374s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:40:07.428 (1527791987.418s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:40:58.703 (1527792038.694s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:40:58.705 (1527792038.695s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:41:00.736 (1527792040.725s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:42:14.695 (1527792114.684s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:42:14.695 (1527792114.685s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:42:16.732 (1527792116.722s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:42:51.654 (1527792151.643s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:42:51.654 (1527792151.644s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:42:53.688 (1527792153.677s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:44:58.686 (1527792278.676s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:44:58.689 (1527792278.678s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:45:00.725 (1527792280.714s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:46:02.175 (1527792342.164s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:46:02.175 (1527792342.165s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:46:04.275 (1527792344.265s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:48:07.712 (1527792467.701s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:48:07.712 (1527792467.702s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:48:09.763 (1527792469.753s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:48:13.838 (1527792473.827s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:48:13.838 (1527792473.827s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:48:15.882 (1527792475.871s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:48:30.245 (1527792490.234s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:48:30.245 (1527792490.235s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:48:32.278 (1527792492.267s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:54:33.458 (1527792853.447s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:54:33.458 (1527792853.447s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:54:35.493 (1527792855.483s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:55:26.847 (1527792906.837s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:55:26.848 (1527792906.837s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:55:28.928 (1527792908.917s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:56:26.445 (1527792966.434s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:56:26.445 (1527792966.435s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:56:28.509 (1527792968.499s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:56:57.278 (1527792997.268s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:56:57.279 (1527792997.268s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:56:59.321 (1527792999.310s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:57:54.772 (1527793054.761s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:57:54.772 (1527793054.761s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:57:56.834 (1527793056.823s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 02:58:13.316 (1527793073.305s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 02:58:13.316 (1527793073.305s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 02:58:15.378 (1527793075.368s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:00:49.296 (1527793229.286s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:00:49.297 (1527793229.286s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:00:51.357 (1527793231.346s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:00:55.495 (1527793235.485s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:00:55.496 (1527793235.485s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:00:57.564 (1527793237.554s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:01:50.851 (1527793290.840s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:01:50.851 (1527793290.841s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:01:52.894 (1527793292.883s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:02:17.634 (1527793317.623s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:02:17.634 (1527793317.624s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:02:19.736 (1527793319.725s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:05:26.277 (1527793506.267s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:05:26.278 (1527793506.267s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:05:28.350 (1527793508.339s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:05:34.518 (1527793514.507s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:05:34.518 (1527793514.507s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:05:36.586 (1527793516.576s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:05:40.680 (1527793520.669s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:05:40.680 (1527793520.670s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:05:42.745 (1527793522.735s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:05:44.805 (1527793524.794s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:05:44.805 (1527793524.794s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:05:46.872 (1527793526.861s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:07:37.799 (1527793637.788s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:07:37.799 (1527793637.788s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:07:39.838 (1527793639.828s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:07:41.877 (1527793641.866s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:07:41.877 (1527793641.867s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:07:43.943 (1527793643.933s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:08:25.064 (1527793685.054s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:08:25.065 (1527793685.054s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:08:27.124 (1527793687.113s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:08:37.420 (1527793697.410s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:08:37.421 (1527793697.410s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:08:39.459 (1527793699.448s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:08:41.507 (1527793701.496s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:08:41.507 (1527793701.497s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:08:43.580 (1527793703.569s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:08:47.656 (1527793707.646s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:08:47.657 (1527793707.646s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:08:49.698 (1527793709.688s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:08:51.785 (1527793711.774s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:08:51.785 (1527793711.775s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:08:53.815 (1527793713.804s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:08:55.851 (1527793715.841s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:08:55.853 (1527793715.843s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:08:57.910 (1527793717.899s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:09:10.247 (1527793730.236s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:09:10.247 (1527793730.236s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:09:12.339 (1527793732.328s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:09:16.402 (1527793736.391s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:09:16.403 (1527793736.392s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:09:18.520 (1527793738.510s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:10:22.025 (1527793802.015s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot allocate memory
2018-06-01 03:10:22.026 (1527793802.015s) [ivsMoveDetection] ImpEncoder.cpp:755 Detect !!
2018-06-01 03:10:24.104 (1527793804.094s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOff.sh error=Cannot allocate memory
2018-06-01 03:10:28.185 (1527793808.174s) [ivsMoveDetection] ImpEncoder.cpp:543 Fork error with command /system/sdcard/scripts/detectionOn.sh error=Cannot alloca

@nik0
Copy link
Collaborator

nik0 commented May 31, 2018

This is another error, missing some memory
try in lower resolution and try reformat memory partitioning: #178 (comment)

@chris-sung
Copy link

now i'm not getting audio

@chris-sung
Copy link

chris-sung commented Jun 1, 2018

hi, @nik0 I've noticed that default "audio in" volume is set to 0
Is there any way to set that up? both hardware and software.

@nik0
Copy link
Collaborator

nik0 commented Jun 1, 2018

The audio shall be set to -1 at startup, so it uses the default value (I think it is around 50 on 120)
You have a setconf entry to set it up. Use first the HW value. The MIC of the Dafang is not very good ... I noticed that the audio now is the same (bad) quality than the original firmware
My next task is too create some GUI to control the volume, the filters ...

@Tschipel
Copy link
Author

Tschipel commented Jun 2, 2018

For the audio i did not check, but the changed uboot.bin mentioned seems to solve the problems regarding memory.
XIAOMI DAFANG V2L log:
2018-06-02 11:24:09.626 ( 0.003s) [main thread ] main.cpp:439 0| Dumping environement variable
2018-06-02 11:24:09.627 ( 0.004s) [main thread ] main.cpp:442 0| USER=root
2018-06-02 11:24:09.628 ( 0.004s) [main thread ] main.cpp:442 0| LD_LIBRARY_PATH=/system/sdcard/lib/:/thirdlib:/system/lib
2018-06-02 11:24:09.628 ( 0.005s) [main thread ] main.cpp:442 0| HOME=/
2018-06-02 11:24:09.628 ( 0.005s) [main thread ] main.cpp:442 0| OLDPWD=/sys/class/gpio
2018-06-02 11:24:09.628 ( 0.005s) [main thread ] main.cpp:442 0| TERM=vt102
2018-06-02 11:24:09.628 ( 0.005s) [main thread ] main.cpp:442 0| PATH=/system/bin:/bin:/sbin:/usr/bin:/usr/sbin
2018-06-02 11:24:09.629 ( 0.005s) [main thread ] main.cpp:442 0| SHELL=/bin/sh
2018-06-02 11:24:09.629 ( 0.006s) [main thread ] main.cpp:442 0| PWD=/sys/class/gpio/gpio77
2018-06-02 11:24:09.629 ( 0.006s) [main thread ] main.cpp:442 0| rmem=16M@0x7000000
2018-06-02 11:24:09.629 ( 0.006s) [main thread ] main.cpp:445 0| -- end
2018-06-02 11:24:13.311 ( 3.688s) [main thread ] ImpEncoder.cpp:1188 0| Found Sensor with ID:22
i264e[info]: profile Constrained Baseline, level 3.1
2018-06-02 11:24:14.069 ( 4.446s) [main thread ] ImpEncoder.cpp:123 0| OSD pos 0,0,1279,36
2018-06-02 11:24:14.071 ( 4.448s) [main thread ] ImpEncoder.cpp:123 0| OSD pos 1240,0,1279,39
2018-06-02 11:24:15.088 ( 5.465s) [DeviceSource ] DeviceSource.cpp:91 0| begin thread
2018-06-02 11:24:15.092 ( 5.469s) [update_thread ] ImpEncoder.cpp:428 0| Changed OSD
2018-06-02 11:24:15.092 ( 5.469s) [update_thread ] ImpEncoder.cpp:492 0| Changed motion sensitivity=4
2018-06-02 11:24:15.093 ( 5.470s) [update_thread ] ImpEncoder.cpp:655 0| Detection region= ((0,0)-(1279,719))
2018-06-02 11:24:15.094 ( 5.470s) [main thread ] main.cpp:548 0| Create ALSA Source.../dev/dsp
2018-06-02 11:24:15.094 ( 5.471s) [main thread ] ALSACapture.cpp:94 0| Audio In GetPubAttr samplerate : 8000
2018-06-02 11:24:15.094 ( 5.471s) [main thread ] ALSACapture.cpp:95 0| Audio In GetPubAttr bitwidth : 16
2018-06-02 11:24:15.094 ( 5.471s) [main thread ] ALSACapture.cpp:96 0| Audio In GetPubAttr soundmode : 1
2018-06-02 11:24:15.095 ( 5.471s) [main thread ] ALSACapture.cpp:97 0| Audio In GetPubAttr frmNum : 40
2018-06-02 11:24:15.095 ( 5.472s) [main thread ] ALSACapture.cpp:98 0| Audio In GetPubAttr numPerFrm : 1600
2018-06-02 11:24:15.095 ( 5.472s) [main thread ] ALSACapture.cpp:99 0| Audio In GetPubAttr chnCnt : 1
2018-06-02 11:24:15.099 ( 5.476s) [update_thread ] ImpEncoder.cpp:497 0| Changed motion region
2018-06-02 11:24:15.100 ( 5.477s) [update_thread ] ImpEncoder.cpp:505 0| Display motion OSD color=2
2018-06-02 11:24:15.504 ( 5.881s) [main thread ] ALSACapture.cpp:126 0| Audio In GetChnParam usrFrmDepth : 20
2018-06-02 11:24:15.505 ( 5.881s) [main thread ] ALSACapture.cpp:154 0| Audio In GetVol vol : 0
2018-06-02 11:24:15.505 ( 5.882s) [main thread ] ALSACapture.cpp:387 0| disabled highfilter
2018-06-02 11:24:15.640 ( 6.016s) [main thread ] ALSACapture.cpp:406 0| NS Filter disabled
2018-06-02 11:24:15.713 ( 6.090s) [DeviceSource ] DeviceSource.cpp:91 0| begin thread
2018-06-02 11:24:15.723 ( 6.099s) [main thread ] main.cpp:152 0| Play this stream using the URL "rtsp://192.168.6.181:8554/unicast"

Only when changing the resolution to 1920x1080 i get the following entries:
2018-06-02 11:15:46.615 ( 4.502s) [DeviceSource ] DeviceSource.cpp:91 0| begin thread
2018-06-02 11:15:46.623 ( 4.508s) [main thread ] main.cpp:152 0| Play this stream using the URL "rtsp://192.168.6.181:8554/unicast"
2018-06-02 11:15:46.940 ( 4.825s) [DeviceSource ] ImpEncoder.cpp:1109 ERR| Polling stream timeout
2018-06-02 11:15:46.940 ( 4.825s) [DeviceSource ] DeviceSource.cpp:94 ERR| error:Connection timed out
2018-06-02 11:15:46.940 ( 4.825s) [DeviceSource ] DeviceSource.cpp:99 0| end thread
2018-06-02 11:15:46.951 ( 4.836s) [update_thread ] ImpEncoder.cpp:1044 ERR| Polling stream timeout
2018-06-02 11:15:48.954 ( 6.839s) [update_thread ] ImpEncoder.cpp:1044 ERR| Polling stream timeout
2018-06-02 11:15:50.957 ( 8.842s) [update_thread ] ImpEncoder.cpp:1044 ERR| Polling stream timeout
2018-06-02 11:15:52.960 ( 10.845s) [update_thread ] ImpEncoder.cpp:1044 ERR| Polling stream timeout
2018-06-02 11:15:54.962 ( 12.847s) [update_thread ] ImpEncoder.cpp:1044 ERR| Polling stream timeout
2018-06-02 11:15:55.000 ( 12.885s) [ivsMoveDetection] ImpEncoder.cpp:707 ERR| IMP_IVS_PollingResult(0,-1) failed
2018-06-02 11:15:56.965 ( 14.850s) [update_thread ] ImpEncoder.cpp:1044 ERR| Polling stream timeout

@saipsa
Copy link
Contributor

saipsa commented Jul 8, 2018

when trying to v4l2rtspserver-master -h from ssh, it throws

v4l2rtspserver-master: can't load library 'libliveMedia.so'

although the log shows

LD_LIBRARY_PATH=/system/sdcard/lib/:/thirdlib:/system/lib

It works after exporting the path in command line.

@stale
Copy link

stale bot commented May 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 19, 2019
@stale stale bot closed this as completed May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests