Yi 4k+ bitrate mod and firmware unpacker.


250mbps bitrate kind of works. It's strange because sometimes it gives a slow sd card error after 1 second and sometimes it works and continues working for a few minutes which leads me to believe that there's something causing this that isn't the speed of the sd card. If the sd card was really too slow the errors would be much more regular. The exact same behavior happens though much more rarely when I set the bitrate to 200mbps.

One hypothesis might be that the encoder sets the quality too high for the first seconds and then adjusts it after which might explain the higher bitrate of the 1 second files and the camera has trouble writing them fast enough.
 
Code:
const
  // константа Rom Section Info
  CNS_ROM_SECT_INFO = $66FC328A;
  // константа конца заголовка файла в Rom Section
  CNS_END_NAME_FILE = $2387AB76;

  CNS_ROM_TYPE_1: array [0..7] of Byte = ($8A, $32, $FC, $66, $FF, $FF, $FF, $FF);
  CNS_ROM_TYPE_2: array [0..7] of Byte = ($00, $00, $00, $00, $8A, $32, $FC, $66);

type
  // поиск имен Rom секций
  TRomSecName = record
    SecPath: string;
    SecName: string;
    SecType: Integer;
  end;
  TArrRomSecName = array of TRomSecName;

  // заголовок секции
  TRomSecHdr = record // равно 0x100
    Crc32:       DWORD; // контрольная сумма 4 байта
    Version:     DWORD; // версия = 2 символа, по 2 байта на символ
    DateSec:     DWORD; // дата = день = 1 байт, месяц = 1 байт, год = 2 байта
                        // год - 2 старших байта
    LengthSec:   DWORD; // длина секции 4 байта
    MemAddress:  DWORD; // Memory адрес 4 байта
    FlagSection: DWORD; // флаг 4 байта
    MagicConst:  DWORD; // константа секции 4 байта CNS_MAGIC_CONSTANT
    ZeroBytes:   array [1..57] of DWORD; // 224 нулевых байт
  end;

//..............................ROM TYPE 1....................................//
  // информационный заголовок (количество файлов и константа)
  TRomSecInfoType_1 = record // равно 0x800
    RomFileCount: DWORD; // количество файлов в секции Rom
    RomSecConst:  DWORD; // CNS_ROM_SECT_INFO = $66FC328A
    RomReserved:  array [0..2039] of Byte; // заполнен FF-значениями
  end;

  // имена файлов Rom секции
  TRomFileNameType_1 = record // равно 0x80
    NameFile:      array [0..115] of Byte; // длина имени файла = 116 байт
    OffsetFile:    DWORD; // стартовый адрес начала файла + 0x100 байт RomHeader
    LengthFile:    DWORD; // длина тела файла
    ConstFileName: DWORD; // CNS_END_NAME_FILE = $2387AB76
  end;
  TArrRFN_1 = array of TRomFileNameType_1;

//..............................ROM TYPE 2....................................//
  // информационный заголовок (количество файлов и константа)
  TRomSecInfoType_2 = record // равно 0x80
    RomSecConst:  DWORD; // CNS_ROM_SECT_INFO = $66FC328A
    RomFileCount: DWORD; // количество файлов в секции Rom
  end;

  // имена файлов Rom секции
  TRomFileNameType_2 = record // равно 0x4C
    NameFile:      array [0..63] of Byte; // длина имени файла = 64 байта
    LengthFile:    DWORD; // длина тела файла
    OffsetFile:    DWORD; // стартовый адрес начала файла + 0x100 байт RomHeader
    Crc32File:     DWORD; // Crc32 файла
  end;
  TArrRFN_2 = array of TRomFileNameType_2;

This is Delphi.
Comments in Russian language.
To open the ROM - you need a section header.
Open file - you need a file header.
Bitmaps, strings, fonts - without problems my prog will open ...
 
Last edited:

Some bitrate comparisons between 200mbps and 135mbps. Raw files can be found here: https://mega.nz/#F!gK5ABTDJ!0am0xFmLq7AMbmZveSzNbQ

I think there might be something else limiting video quality other than the bitrate.

Bitmaps, strings, fonts - without problems my prog will open ...

It looks like there's a bunch of configuration files that configure the camera image/filters in these files too, I haven't really looked at it much yet though.
 
Last edited:
Dears,
thanks a lot for your effort regarding the Yi 4K+ mods.
I have tried to set higher bitrates in the autoexec.ash file (100mbps high / 80mbps medium / 60mbps low), but the values are not loaded when the camera started up. Bitrates are always as in stock firmware.
May I ask for help on this topic. It would be great if someone could have a look into my autoexec.ash file attached to see where the problem is.
Thanks a lot for your help
 

Attachments

  • autoexec.zip
    1.2 KB · Views: 14
HEy All

Trying to make a VR camera with the 4k+

I am trying to get manual ISO mode. Currently as standard with new firmware can only set ISO to 400. Is there a way to do it? Have some cash if you can do it.

Also need the exposure set to around 1/400

reach me at
tom a t eye-mirror.com
thx
 
HEy All

Trying to make a VR camera with the 4k+

I am trying to get manual ISO mode. Currently as standard with new firmware can only set ISO to 400. Is there a way to do it? Have some cash if you can do it.

Also need the exposure set to around 1/400

reach me at
tom a t eye-mirror.com
thx
PS just need ISO 100
 
Hello! how you sync the video from the cameras?I have made VR camera from the yi 4k+ and i am trying sync video by sound, but it is not very accurate (because i am shooting in 30 fps 4000*3008). Very necessary feature is the sync, as done in yi 4k. If someone will be able to port the VR firmware in yi 4k+ it would be great. Ready to spend some money on this, if someone will take to do it.
 
Hello! how you sync the video from the cameras?I have made VR camera from the yi 4k+ and i am trying sync video by sound, but it is not very accurate (because i am shooting in 30 fps 4000*3008). Very necessary feature is the sync, as done in yi 4k. If someone will be able to port the VR firmware in yi 4k+ it would be great. Ready to spend some money on this, if someone will take to do it.
I would put in $1000 for a sync cable mode as Alex69 wants.

To my ISO problem above:
Think I have an ISO hack working. Doing further tests now its a bit buggy. Will report in
 
May I ask for help on this topic. It would be great if someone could have a look into my autoexec.ash file attached to see where the problem is.
Thanks a lot for your help

I looked at it quickly but I don't see anything wrong with your autoexec.ash file.

If someone will be able to port the VR firmware in yi 4k+ it would be great. Ready to spend some money on this, if someone will take to do it.

I think I saw the yi guys say somewhere that it was impossible because the hardware doesn't support it.
 
Maybe there's another way to do the synchronization. For example, as made for gopro
 
Can anyone upload a savebin dump.bin file for this camera?
 
Great work, irungentoo! Did you measured how accurate this sync?
 
They now released beta 1.4.3 and official 1.3.29, both for yi4k+.
The first one is specially made to control and sync more cameras from one
 
Great work, irungentoo! Did you measured how accurate this sync?

Honestly the sync isn't that accurate between my 4k and 4k+ cameras (need to shave off a few frames from the beginning of one of the videos) but that's to be expected because of wifi. If you have good wifi you might be able to get them to sync accurately. I wonder if the 1.4.3 firmware sync feature has the same problem.

Something strange is that on 1.4.3 when I plug in the camera I don't get the normal storage device that lets me access the sd card. Instead I get: /dev/ttyACM0 and /dev/ttyACM1

/dev/ttyACM1 is a serial linux console on the camera and it can be accessed with: screen /dev/ttyACM1

/dev/ttyACM0 is the rtos console but for some reason it only goes one way. It's obvious if you do: socat - /dev/ttyACM0 and then type: help > c:\help.log then press enter. The help command works because there's a help.log file that appears on the sd card but the problem is that typing the help command alone and pressing enter does not return anything back in the console. I'm going to assume that there's some way to enable 2 way communication but I'm not sure how.
 
I have the same problem with access to sd card via usb after flashing 1.4.3 firmware. I have tried to flash 1.3.29 fw, but it has not solved the problem, help only hard reset camera. It is very bad for me, because all 3 cams installed on the VR gimbal (custom made for dji inspire 2 drone), and access to the memory card is very difficult.
 
Last edited:
I have the same problem with access to sd card via usb after flashing 1.4.3 firmware. I have tried to flash 1.3.29 fw, but it has not solved the problem, help only hard reset camera. It is very bad for me, because all 3 cams installed on the VR gimbal (custom made for dji inspire 2 drone), and access to the memory card is very difficult.

1.4.4 has just been released, addressing :
1. Added preview grid line for capturing and recording;
2. Improved sd card optimization function;

Just uploaded firmware dumps to github
 
Great work guys!

Hmmm, looking at white paper of H2. Seem it can do 4k x 3k res @ 35fps 12bit? Also how fare can we push fps @ 480p, over 300 fps?
 

250mbps bitrate kind of works. It's strange because sometimes it gives a slow sd card error after 1 second and sometimes it works and continues working for a few minutes which leads me to believe that there's something causing this that isn't the speed of the sd card. If the sd card was really too slow the errors would be much more regular. The exact same behavior happens though much more rarely when I set the bitrate to 200mbps.

One hypothesis might be that the encoder sets the quality too high for the first seconds and then adjusts it after which might explain the higher bitrate of the 1 second files and the camera has trouble writing them fast enough.

This happens occasionally even without the bitrate hack, at Medium bitrates which my cards are more than capable of handling. It's pretty random but still happens sometimes.

I think also the fact that it writes three files simultaneously to the card in the beginning (mp4, sec, and thm) then continues writing 2 of those files (mp4 and sec) throughout the entire recording, isn't helping with this issue.




They now released beta 1.4.3 and official 1.3.29, both for yi4k+.
The first one is specially made to control and sync more cameras from one

immediately after @irungentoo released this feature, and they had never even hinted at it before afaik (aside from the special vr firmware version but that's like over a year old i think?)

I honestly wouldn't be surprised if they were just snagging your code from github @irungentoo


Great work guys!

Hmmm, looking at white paper of H2. Seem it can do 4k x 3k res @ 35fps 12bit? Also how fare can we push fps @ 480p, over 300 fps?

camera already gets hot as it is, and these cameras aren't exactly known for their software's stability. i'd wager that pushing the chip much further is inadvisable at best.

as far as higher framerate, past 120fps it already looks like garbage with crazy amounts of ghosting even in broad daylight. i think you'd need a faster lens at the very least.
 
Last edited:
Back
Top