Code Monkey home page Code Monkey logo

main's People

Contributors

daviey avatar eliaskotlyar avatar ixisandyr avatar jmtatsch avatar nik0 avatar puddly avatar robomario avatar sian-lee-sa avatar sundarnagarajan avatar themactep avatar tim-devel avatar xdissent avatar yannik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

main's Issues

uclibc doesn't support /etc/TZ correctly for Israel standard time

uclibc is responsible for parsing the timezone file. According to GNU's libc documentation:

Israel Standard Time (IST) and Israel Daylight Time (IDT) are 2 hours ahead of the prime meridian in winter, springing forward an hour on March’s fourth Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March 23), and falling back on October’s last Sunday at 02:00.
IST-2IDT,M3.4.4/26,M10.5.0

Unfortunately, when entering the above string into /etc/TZ, the value is not recognized and reverted to UTC. The moment the value of 26 is changed to a value lower than 24, the string is accepted.

This seems to be a bug in uclibc's parsing of the above string.

I sent a mail to uclibc's mailing list. It seems to me that this is also the issue with the following comment on OpenWRT's bugtracker

jxq03p sensor and h265 support?

Is it possible jxq03p sensor (which using in (Xiaomi smart camera standard edition 2k) support?

https://www.mi.com/global/product/mi-camera-2k-magnetic-mount/
Product name: Mi Camera 2K (Magnetic Mount)
Product model: MJSXJ03HL

[   10.504511] info: success sensor find : jxq03p
[   10.509106] name : i2c1 nr : 1
[   10.512277] misc sinfo_release
[   10.599865] probe ok ------->jxq03p
[   10.654697] -----jxq03p_detect: 589 ret = 0, v = 0x08
[   10.660433] -----jxq03p_detect: 597 ret = 0, v = 0x43
[   10.665838] jxq03p chip found @ 0x40 (i2c0)
[   10.670200] sensor driver version H20200930b

Building v4l2rtspserver-master fails

Hi @nik0,
I'm trying to build the rtsp server like this:

cd v4l2rtspserver-master
./compile.sh

This fails with the following error:


-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
V4L2WRAPPER_LIBRARY

How should this be fixed?

Download failed

There was an error when I downloaded the source code, what is the reason and how to solve it?

$ git clone --recurse-submodules https://github.com/Dafang-Hacks/Main.git        
Cloning into 'Main'...                                                          
remote: Enumerating objects: 79, done.                                           
remote: Counting objects: 100% (79/79), done.                                    
remote: Compressing objects: 100% (55/55), done.                                 
fatal: the remote end hung up unexpectedlyiB | 7.00 KiB/s                     
fatal: early EOF                                                                
fatal: index-pack failed

Change number of video buffers to two

In this patch, geekman lowers the number of video buffers per channel to two. Supposedly, the iCamera stock binary is doing the same. According to geekman, this reduces the memory usage and therefore enables 1080p even on 64MB cameras.

Has anyone (@nik0) tried this? Other thoughts on the topic?

ImpEncoder.cpp compile error

Building on Ubuntu:

% uname -a
Linux nuc10 5.4.0-62-generic #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
% more /etc/debian_version
bullseye/sid

Compiling ImpEncoder.cpp via ./compile.sh results in:

/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../toolchain/bin/mips-linux-gnu-g++   -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/v4l2wrapper/inc -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../live555/liveMedia/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../v4l2rtspserver-tools -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/filter -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/groupsock/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/UsageEnvironment/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/BasicUsageEnvironment/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../_install/include -I/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/freetype2/freetype2/include  -std=c++11 -Wall -O3 -g   -o CMakeFiles/v4l2rtspserver-master.dir/src/ImpEncoder.cpp.o -c /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/ImpEncoder.cpp
In file included from /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/HTTPServer.cpp:27:0:
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h: In constructor 'HTTPServer::HTTPClientConnection::HTTPClientConnection(RTSPServer&, int, sockaddr_in)':
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h:126:138: error: no matching function for call to 'RTSPServer::RTSPClientConnection::RTSPClientConnection(RTSPServer&, int&, sockaddr_in&)'
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h:126:138: note: candidates are:
In file included from /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/HTTPServer.cpp:19:0:
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:157:5: note: RTSPServer::RTSPClientConnection::RTSPClientConnection(RTSPServer&, int, const sockaddr_storage&)
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:157:5: note:   no known conversion for argument 3 from 'sockaddr_in' to 'const sockaddr_storage&'
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:135:9: note: RTSPServer::RTSPClientConnection::RTSPClientConnection(const RTSPServer::RTSPClientConnection&)
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/../Modules/live/live555/liveMedia/include/RTSPServer.hh:135:9: note:   candidate expects 1 argument, 3 provided
In file included from /home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/src/HTTPServer.cpp:27:0:
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h: In static member function 'static HTTPServer* HTTPServer::createNew(UsageEnvironment&, Port, UserAuthenticationDatabase*, unsigned int, unsigned int, std::string)':
/home/cdknight/Dafang-Hacks-Main/v4l2rtspserver-master/inc/HTTPServer.h:154:48: error: no matching function for call to 'HTTPServer::setUpOurSocket(UsageEnvironment&, Port&)'
...

motion capture and performance of system()

The system() calls to detectionOn.sh and detectionOff.sh have huge performance impacts (process creation, particularly memory allocation, plus execution of a shell script...note the man page for system(), which states "The main cost of system() is inefficiency".) Motion capture is a time-critical component and I believe the system() call is causing significant loss of image/video data.

Compiling ip_tables.ko module

I want to compile ip_tables.ko module for use on the Wyze Cam PAN.
I followed the instructions to:

  • Clone the repository
  • Set CROSS_COMPILE
  • make menuconfig, and select the module I needed
  • Compiled the kernel (make vmlinuz, make modules)

When I transfer the compiled module .ko file to the camera and try to insmod., I get the following error:

insmod: can't insert 'ip_tables.ko': unknown symbol in module or invalid parameter

Any help will be appreciated

Program does not have write permissions

Hi guys,
Please assist me to solve the issue below.
I created the program that write to file some log data.
If I run this program as startup process after reboot program fails to have write access to file system.
But If I ssh as root to my camera and start my program manually from command line everything works fine.
So question is how to run my program on startup with root permissions?

Build scripts don't completely work

The live submodule references the toolchain directory's old name, which causes compile-libraries.sh to fail unless toolchain is symlinked to the old name.

I've also combined all of the compile.sh scripts contained in the submodules, since they are all really three lines long once you get rid of the common environment variables.

Any thoughts? I'd like to lock down freetype2 to a stable version instead of keeping it as a Git submodule tracking potentially breaking changes, but that'd require pulling it into the current source tree or keeping it external and just cloning the latest stable tag from within the build script.

Suggestions

(1) strip library/binary
(2) move to buildroot like openfang
(3) move to musl instead of libc (like openwrt). (depend 2)

by doing so the rootfs could fit on 25q64 flash

Readme seems out of date

Running into issues with following the readme.
Some of the submodules seem to be missing.... some of the scripts are missing (assuming renamed).

austin@pop-os:~/test$ git clone --recurse-submodules https://github.com/Dafang-Hacks/Main.git
Cloning into 'Main'...
remote: Counting objects: 349, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 349 (delta 30), reused 40 (delta 12), pack-reused 279
Receiving objects: 100% (349/349), 1.03 MiB | 920.00 KiB/s, done.
Resolving deltas: 100% (154/154), done.
Submodule 'Audio' (https://github.com/Dafang-Hacks/Audio.git) registered for path 'Audio'
Submodule 'busybox' (git://git.busybox.net/busybox) registered for path 'busybox'
Submodule 'dosfstools' (https://github.com/dosfstools/dosfstools) registered for path 'dosfstools'
Submodule 'drivers' (https://github.com/Dafang-Hacks/drivers.git) registered for path 'drivers'
Submodule 'kernel' (https://github.com/Dafang-Hacks/kernel) registered for path 'kernel'
Submodule 'lame' (https://github.com/Dafang-Hacks/lame) registered for path 'lame'
Submodule 'live' (https://github.com/Dafang-Hacks/live.git) registered for path 'live'
Submodule 'opus' (https://github.com/Dafang-Hacks/opus.git) registered for path 'opus'
Submodule 'toolchain' ([email protected]:Dafang-Hacks/mips-gcc472-glibc216-64bit.git) registered for path 'toolchain'
Submodule 'uboot' ([email protected]:Dafang-Hacks/uboot.git) registered for path 'uboot'
Cloning into '/home/austin/test/Main/Audio'...
remote: Counting objects: 13, done.        
remote: Compressing objects: 100% (10/10), done.        
remote: Total 13 (delta 2), reused 12 (delta 1), pack-reused 0        
Cloning into '/home/austin/test/Main/busybox'...
remote: Counting objects: 104976, done.        
remote: Compressing objects: 100% (23164/23164), done.        
remote: Total 104976 (delta 83925), reused 101694 (delta 81142)        
Receiving objects: 100% (104976/104976), 21.32 MiB | 1.54 MiB/s, done.
Resolving deltas: 100% (83925/83925), done.
Cloning into '/home/austin/test/Main/dosfstools'...
remote: Counting objects: 2249, done.        
remote: Compressing objects: 100% (12/12), done.        
remote: Total 2249 (delta 8), reused 9 (delta 5), pack-reused 2232        
Receiving objects: 100% (2249/2249), 789.26 KiB | 853.00 KiB/s, done.
Resolving deltas: 100% (1591/1591), done.
Cloning into '/home/austin/test/Main/drivers'...
remote: Counting objects: 395, done.        
remote: Compressing objects: 100% (241/241), done.        
remote: Total 395 (delta 150), reused 393 (delta 148), pack-reused 0        
Receiving objects: 100% (395/395), 784.73 KiB | 749.00 KiB/s, done.
Resolving deltas: 100% (150/150), done.
Cloning into '/home/austin/test/Main/kernel'...
remote: Counting objects: 48279, done.        
remote: Compressing objects: 100% (43303/43303), done.        
remote: Total 48279 (delta 4390), reused 48279 (delta 4390), pack-reused 0        
Receiving objects: 100% (48279/48279), 132.24 MiB | 2.92 MiB/s, done.
Resolving deltas: 100% (4390/4390), done.
Cloning into '/home/austin/test/Main/lame'...
remote: Counting objects: 528, done.        
remote: Compressing objects: 100% (330/330), done.        
remote: Total 528 (delta 176), reused 528 (delta 176), pack-reused 0        
Receiving objects: 100% (528/528), 2.53 MiB | 1.09 MiB/s, done.
Resolving deltas: 100% (176/176), done.
Cloning into '/home/austin/test/Main/live'...
remote: Counting objects: 772, done.        
remote: Compressing objects: 100% (485/485), done.        
remote: Total 772 (delta 284), reused 771 (delta 283), pack-reused 0        
Receiving objects: 100% (772/772), 3.17 MiB | 2.03 MiB/s, done.
Resolving deltas: 100% (284/284), done.
Cloning into '/home/austin/test/Main/opus'...
remote: Counting objects: 30090, done.        
remote: Total 30090 (delta 0), reused 0 (delta 0), pack-reused 30090        
Receiving objects: 100% (30090/30090), 9.18 MiB | 2.78 MiB/s, done.
Resolving deltas: 100% (23862/23862), done.
Cloning into '/home/austin/test/Main/toolchain'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:Dafang-Hacks/mips-gcc472-glibc216-64bit.git' into submodule path '/home/austin/test/Main/toolchain' failed
Failed to clone 'toolchain'. Retry scheduled
Cloning into '/home/austin/test/Main/uboot'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:Dafang-Hacks/uboot.git' into submodule path '/home/austin/test/Main/uboot' failed
Failed to clone 'uboot'. Retry scheduled
Cloning into '/home/austin/test/Main/toolchain'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:Dafang-Hacks/mips-gcc472-glibc216-64bit.git' into submodule path '/home/austin/test/Main/toolchain' failed
Failed to clone 'toolchain' a second time, aborting
austin@pop-os:~/test$ cd Main/
austin@pop-os:~/test/Main$ ./compile.sh
bash: ./compile.sh: No such file or directory
austin@pop-os:~/test/Main$ ./compile-libraries.sh
./compile-libraries.sh: line 1: ./lame/compile.sh: No such file or directory
./compile-libraries.sh: line 2: ./live/compile.sh: No such file or directory
./compile-libraries.sh: line 4: ./compile.sh: No such file or directory

RTSP high latency ~ 6s

I use ffplay on LAN network. The latency ~ 6s (WYZE Cam Pan). How to make latency lower? Original firmware the latency about <1s

[mp3float @ 0x7f7f5488c600] Header missing
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 4 packets
[h264 @ 0x7f7f530aa200] concealing 1205 DC, 1205 AC, 1205 MV errors in P frame
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 43 packets
[h264 @ 0x7f7f530b4600] error while decoding MB 25 29, bytestream -49
[h264 @ 0x7f7f530b4600] concealing 1304 DC, 1304 AC, 1304 MV errors in I frame
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 38 packets
[h264 @ 0x7f7f530a6a00] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x7f7f530a6a00] error while decoding MB 0 27, bytestream 24480
[h264 @ 0x7f7f530a6a00] concealing 1489 DC, 1489 AC, 1489 MV errors in I frame
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 47 packets
[h264 @ 0x7f7f530aa800] error while decoding MB 74 28, bytestream -37
[h264 @ 0x7f7f530aa800] concealing 1335 DC, 1335 AC, 1335 MV errors in I frame
[h264 @ 0x7f7f530aae00] Increasing reorder buffer to 1
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 3 packets
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 10 packets
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 7 packets
[h264 @ 0x7f7f530aa200] error while decoding MB 31 42, bytestream -27
[h264 @ 0x7f7f530aa200] concealing 258 DC, 258 AC, 258 MV errors in P frame
[h264 @ 0x7f7f530a6a00] error while decoding MB 7 37, bytestream -15
[h264 @ 0x7f7f530a6a00] concealing 682 DC, 682 AC, 682 MV errors in P frame
[h264 @ 0x7f7f530aa800] error while decoding MB 66 39, bytestream -31
[h264 @ 0x7f7f530aa800] concealing 463 DC, 463 AC, 463 MV errors in P frame
[rtsp @ 0x7f7f5581b200] max delay reached. need to consume packet   
[rtsp @ 0x7f7f5581b200] RTP: missed 55 packets
[h264 @ 0x7f7f530b5400] error while decoding MB 15 27, bytestream -13
[h264 @ 0x7f7f530b5400] concealing 1474 DC, 1474 AC, 1474 MV errors in I frame

Sources for compiling kernel modules that come with standard rootfs

How do I compile the kernel modules that come with the dafang rootfs (.ko names below):

mt7601Usta.ko
rtl8189es.ko
rtl8189fs.ko
sample_motor.ko
sensor_jxf22.ko
sensor_jxf23.ko
sensor_jxh62.ko
sinfo.ko
tx-isp-t10.ko
tx-isp-t20.ko

I cannot find source or kernel options for these - e.g. I looked specifically for rtl8189es.ko and rtl8189fs.ko

Any help will be appreciated

have ImpEncoder.cpp write pictures

So it seems that shared memory is only used for two things: configuration (so that they can be updated by an external program and have the config loaded into the already-running server) and shared between v4lrtsp-server and getimage.

Given that the process is currently v4lrtsp-server identifies motion->detectionOn.sh->getimage->shared memory, why not skip the whole loop and have ImpEncoder.cpp just write the image directly (and the shell script could move the image file, if needed.)

The location/filename format can be passed via the configuration structure.

why is openssl built statically?

The build process for openssl creates a static binary, which uses more space in the filesystem and more space in memory if multiple programs use the same shared library. How about we use the dynamic library? Also, by default, we should strip binaries/libraries of their symbol tables to save additional resources.

Writing software for your OS. Advice

Hello. I am working on using:
https://github.com/brutella/hc
To write a Homekit program for Dafang-Hacks.

His HomeKit Library is written in go. I have successfully compiled his library (mipsle) and gotten a basic Homekit program running on the camera and talking to my iPhone. However the process is very slow as whenever I make a change I have to remove the SD card and plug it into my computer. Do you have any advice for getting my binary to the camera? It seems to be a real lean system. no scp or rsync. I found ftpd however every time I connect the camera reboots. Thanks for any advice you might have.

is it possible to compile ffmpeg for the camera ?

Would it be possible to compile ffmpeg to stream the video data to a remote proxy like ffserver ?
It should be something like this:
ffmpeg -f v4l2 -i /dev/video0 http://remoteIP:8080/feed.ffm

Or is it already possible with the "onboard" tools ?
It would be great to have the functionality that the camera starts automatically streaming to a remote server on which is ffserver listening.

v4l2rtspserver-master won't work without its ini file

Hi,

I'm using a Dafang camera for this hack.
If I copy the prebuilt stuff onto the SD card v4l2rtspserver-master is working fine.

However if I compile my own version with this repo:
1.) v4l2rtspserver-master.ini config file HAS to be in /system/sdcard/bin
2.) v4l2rtspserver-master will listen only on rtsp://IP:1/ (port=1 does not matter what I write after -P on command line)
3.) /tmp/v4l2rtspserver-master.log contains very small amount of log compared to the prebuilt one.

Could someone please update this repo to the one can create the prebuilt v4l2rtspserver-master?
Thanks!

OSD is not visible

Hi,
I try to use OSD on T10-based device with H62 sensor. Using current state of this repo OSD seems broken because now there is no way to set m_osdOn to true. I fixed it and now timestamp_osd.setPixel tries to set pixels with valid coordinates lying inside of bounds. But there is no OSD on the image. v4l2trspserver-master works fine, there is no error and debug messages. I used different colors and even tried to force timestamp_osd.setPixel not to use transparent "color" at all but nothing changed, also built version before the "ConfigReader" series of commits with the same result. Can you advice to check anything else?

Does this code support cameras with XM510 CPU

Hi,

I am looking for a way to get custom firmware on an XM510 wired network camera with JX-H42 sensor. The description in this repository is not 100% clear on what camera types are supported with this firmware, but i found the driver for the JX-H42 sensor.

Is it possible to build a full image for the camera which can be flashed to the camera with https://github.com/stokie-ant/xm510_firmtool

Thanks

onvif on a05a6e7

I am trying out onvif that was checked in on Mar 20.
I am using Onvif Device Manager and the credentials used are user:root and password:password and url: http://192.168.xx.xx:8080.

I am getting the following error:
"The data in element 'security' must be understood but cannot be handled"

Help on uEnv.txt booting a (slightly) modified kernel

I have a Wyze Cam Pan.
I flashed the open source uBoot from this repository a long time ago - Nov-2019. It is working well.
Now I have a (slightly) modified kernel with some additional netfilter modules compiled.
How do I setup uEnv.txt to:

  • Use the new kernel
  • Use the original appfs and rootfs and driverfs

I tried copying uEnv.bootfromsdcard.txt to uEnv.txt and changing this one line

bootargs=console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)

to

bootargs=console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)

(from uEnv.bootfromnand.txt)

The full uEnv.txt I tried was:

baudrate=115200
bootargs=console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)
bootcmd=sf probe;sf read 0x80600000 0x40000 0x280000; bootm 0x80600000;
bootcmd=fatload mmc 0:1 0x80600000 kernel.bin;bootm 0x80600000
bootdelay=1
ethact=Jz4775-9161
ethaddr=00:11:22:33:44:55
gatewayip=193.169.4.1
ipaddr=193.169.4.81
loads_echo=1
netmask=255.255.255.0
serverip=193.169.4.2
stderr=serial
stdin=serial

When the camera boots, the LED turns blue (presumably implying uBoot found a "valid" uEnv.txt), but it doesn't boot - just hangs.

How does getimage work?

I am having a really hard time trying to figure out how getimage works.
It kinda looks like you've patched the v4l2 code so it puts the image into the shared memory region.

And then getimage just reads it.

However the key you use is "/usr/include","x" while the getimage is just "/usr/","1" which I find odd.

Is this correct or am I missing something?

Bitrate and sampling rate issues in v4l2rtspserver-master

A couple of issues regarding the audio bitrate and sampling rates

  • v4l2rtspserver-master allows setting the input (AUDIOINBR) and output (AUDIOOUTBR) sampling rate via the rtspserver.conf file. I assume the BR is suppose to stand for bitrate but the sampling rate is frequency of sampling and not the bitrate. It may seem like quibbling to mention it, but it may cause confusion among users as to what exactly they are changing when modifying these values.
  • Currently the AUDIOOUTBR behaves differently for Opus versus MP3. For MP3 it changes the output sampling rate, but for Opus it changes the output bitrate. I assume this is a bug on the Opus side and the intent was to also change the output sampling rate for Opus and not the bitrate.

I'm also not sure I understand the reasoning for changing the output sampling rate from the input sampling rate. Usually resampling is only done when the output is intended for a device or format which cannot play the input sampling rate because resampling whether it is up or down will result in a loss of quality.

The default configuration has the codec set at MP3, input sampling set at 16000 and output sampling set at 44100. The result is that input audio is being resampled up resulting in some loss of quality, audio delay and the MP3 stream is set at 64kbs CBR, lame's default for 44.1khz mono audio, which is more bandwidth than would be necessary for the default input sampling rate.

My suggestion for default values for MP3 would be to keep the input and output sample rates the same. This can be accomplished by setting AUDIOOUTBR=0. Lame will use the value of the input rate for the output when the output rate is set to 0. I also suggest setting the output bitrate to preset mode V9. This is the lowest quality preset and is generally recommended for mono voice. It will result in less cpu usage, bandwidth usage and audio delay due to processing.

For Opus the situation is worse when input and output don't match. The opus library does not perform resampling. So if you feed 16khz sampled audio and have output set to say 48khz then your audio quality really suffers because opus will convert to 48khz without resampling which really hurts your audio quality. Whether intended or not today v4l2rtspserver doesn't set the output sample rate for opus and it should probably remain that way. I also recommend not setting the output bitrate. Opus will by default determine the best bitrate to use for the given input. I haven't looked closely enough and quite frankly right now it is too late for me to take a look and follow whether the filter noise suppression library is being applied when the opus codec is being used. If it is disabling it may be the better option. I haven't compared yet but opus does have noise suppression filters which are applied when it is determined the input is voice.

These are decisions which probably should be made by the maintainer but I will be happy to provide PRs to implement once a decision has been made regarding how you want to move forward with the audio settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.