roleoroleo / yi-hack-Allwinner-v2

Custom firmware for Yi 1080p camera based on Allwinner platform
MIT License
817 stars 93 forks source link

Can you change the osd time format for rtsp? #932

Open Export33 opened 6 days ago

Export33 commented 6 days ago

Hi,

i´m using the Timezone Europe/Berlin

CET-1CEST,M3.5.0,M10.5.0/3

Is there a way to change the time-format for the rtsp-stream? Instead of mm/dd/yyyy i would like to use the german format dd/mm/yyyy or even better dd.mm.yyyy.

grafik

roleoroleo commented 6 days ago

Mmmmh What cam? Mine is: immagine

Export33 commented 5 days ago

Your date also looks ok.

It´s a YI Home 2K PRO

grafik

roleoroleo commented 4 days ago

Please check what timezone is set in the Yi app.

Export33 commented 2 days ago

I´m using your hack in order to not use the app. Is there a ssh command to do so? The commands i found for timezone didn´t work.

date shows the following grafik

roleoroleo commented 2 days ago

This is the pseudocode:

        pcVar2 = strstr((char *)(g_rmm_info._8_4_ + 0xc),"us");
        if (pcVar2 == (char *)0x0) {
          pcVar2 = strstr((char *)(g_rmm_info._8_4_ + 0xc),"eu");
          if ((pcVar2 == (char *)0x0) &&
             (pcVar2 = strstr((char *)(g_rmm_info._8_4_ + 0xc),"plt-api-de"), pcVar2 == (char *)0x0)
             ) {
            snprintf(acStack_1d0,0x80,"%04d/%02d/%02d %02d:%02d:%02d ",local_2c->tm_year + 0x76c,
                     local_2c->tm_mon + 1,local_2c->tm_mday,local_2c->tm_hour,local_2c->tm_min,
                     local_2c->tm_sec);
          }
          else {
            snprintf(acStack_1d0,0x80,"%02d/%02d/%04d %02d:%02d:%02d ",local_2c->tm_mday,
                     local_2c->tm_mon + 1,local_2c->tm_year + 0x76c,local_2c->tm_hour,
                     local_2c->tm_min,local_2c->tm_sec);
          }
        }
        else {
          snprintf(acStack_1d0,0x80,"%02d/%02d/%04d %02d:%02d:%02d ",local_2c->tm_mon + 1,
                   local_2c->tm_mday,local_2c->tm_year + 0x76c,local_2c->tm_hour,local_2c->tm_min,
                   local_2c->tm_sec);
        }

This means that rmm process tries to find the string eu, us or plt-api-de in the file /tmp/mmap.info starting from address 0xc. It's a part of the server name. So, dump the content of /tmp/mmap.info: hexdump -C /tmp/mmap.info

Export33 commented 1 day ago

Sure.

root@Kamera:~# hexdump -C /tmp/mmap.info
00000000  10 00 00 00 00 00 00 00  03 00 00 00 68 74 74 70  |............http|
00000010  73 3a 2f 2f 61 70 69 2e  75 73 2e 78 69 61 6f 79  |s://api.us.xiaoy|
00000020  69 2e 63 6f 6d 00 00 00  00 00 00 00 00 00 00 00  |i.com...........|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000100  00 00 00 00 00 00 00 00  00 00 00 00 68 74 74 70  |............http|
00000110  3a 2f 2f 6c 6f 67 2e 75  73 2e 78 69 61 6f 79 69  |://log.us.xiaoyi|
00000120  2e 63 6f 6d 00 00 00 00  00 00 00 00 00 00 00 00  |.com............|
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000180  00 00 00 00 00 00 00 00  00 00 00 00 66 61 6d 69  |............fami|
00000190  6c 79 6d 6f 6e 69 74 6f  72 2d 79 36 32 33 00 00  |lymonitor-y623..|
roleoroleo commented 1 day ago

us = mm/dd/yyyy You could try to change us to eu.

Export33 commented 16 hours ago

That works. Is there any way to make it permanent? Right now it resets when you reboot the camera.

grafik