Changing the default bitrate of Ambarella based cameras using AFT

Could you also try to find it in the Rom(rfs) partition? In some rare cases the bitrates are in a separate file in the rom partition
 
Could you also try to find it in the Rom(rfs) partition? In some rare cases the bitrates are in a separate file in the rom partition
Ok. I have extracted ROM, but sadly there is no PRI.a7s file in that rom directory.
 
Sorry, I wasn't clear enough. (information: PRI = kernel partition, RFS = rom file partiton)

Just load the RFS.a7s with the bitrate editor instead of PRI.a7s
 
Sorry, I wasn't clear enough. (information: PRI = kernel partition, RFS = rom file partiton)

Just load the RFS.a7s with the bitrate editor instead of PRI.a7s
Still no luck. In rom directory there is only rfs.a7t, and in partition folder there are two types of PRI: PRI.a7h (202 bytes) and PRI.a7s (6,98 mb), also RFS.A7s is found here. Nothing can be opened while leaving custom offset (dec) window blank - getting error. If I type any number in that offset window, it opens the table but numbers contains "E-24" and similar stuff.

In screenshot bellow there is RFS.A7S opened while using custom offset someone recommended. I can type any number and get some numbers showing
 

Attachments

  • Screenshot 2017-01-18 21.09.02.png
    Screenshot 2017-01-18 21.09.02.png
    85.9 KB · Views: 14
Please use the values (offset/length) from the screenshot below:
The values cant be random, they specify the address of the bitrate table and its length. In most cases they can be detected automatically

upload_2017-1-18_20-31-35.png
 
Oh what a miracle. Works like a charm. You are genius :) Thank you really very much!
 
To get more information I would like to ask, what optimal bitrate should I set ? Somewhere on forum I have read that higher bitrate cause chip to heat more rapidly. I don't want it to be damaged by temperature. Now it has bitrate of 18 on highest resollution and quality settings and after few hours journey gadget gets quite warm, but video quality isn't super fine (can a small bitrate change solve that and is safe?).

I have more questions relating to AFT application. I have found a setting named "AE Table editor", what it does ? It opens a screen with boxes and there are numbers in them. On top there is information that max value must be not higher than 5, but in default some boxes contain number 6 or even 7. What it does and can it be used to achieve better video quality ? For now I am having one problem - blurred sides on video, and, for example, car number plates cannot be recognized if they are not in front of my car but on the side lanes.
 

Attachments

  • Screenshot 2017-01-19 08.34.42.png
    Screenshot 2017-01-19 08.34.42.png
    354.4 KB · Views: 18
A7 chipset is ok up to about 28mbit, above that you're just generating more heat but not really gaining much
Ok, thanks, I am thinking of 24 bit setting leaving min and max default (0,75 - 1,25). Can you coment about AE Table editor?
 
Please use the values (offset/length) from the screenshot below:
The values cant be random, they specify the address of the bitrate table and its length. In most cases they can be detected automatically

View attachment 28776
Tried that on different ROM and again got strange numbers in table, seems that table is different in each ROM update. Can you provide information how to find out custom offset and custom length for that table to open normaly ? I would like to learn how these things work :) ROM link is here https://dl.dropboxusercontent.com/u/64768144/firmware.bin
 
That's how I'm doing it (using the file you provided):
1. Load the firmware with AFT
2. Export all partitions
3. Open the file PRI.a7s with a hex editor of your choice
4. Search for this hex pattern: 0x31 0x00 0x36 0x00 0x3a 0x00 0x39 0x00
4.info: the pattern you are looking for is a unicode representation of 16:9 which gets you almost to the bitrate table location in the binary
5. You should find something like this:
upload_2017-1-19_23-16-28.png

6. Scroll down till the end of the resolutions
upload_2017-1-19_23-17-9.png

7. Now comes the "tricky" part, finding the exact start position.
7.1 Bitrate table has this format [4 byte integer: type] [4 byte float: range min] [4 byte float: range max] [4 byte float: bitrate] (this is repeated n-times)
7.2 find the first occurrence of the "type" integer (most of the times its something like [03 00 00 00] , sometimes [01 00 00 00] - whatever comes first)
upload_2017-1-19_23-20-36.png

7.3 the first occurrence (marked green in the screenshot above) is the location of the bitrate table. get its offset (in this example 0x00487c64)
8. convert the hex to dec: 0x00487c64 = 4750436
9. enter the decimal value in the custom offset field in bitrate editor
10. load the firmware
 
Oh, looks quite hard. Never had experience with HEX. Thank you Tobi@s, that is really useful tutorial. Definitely will try to play with :)

Tried to do that, very good explanation, success at first attempt. Found same number you give and thought damn, probably got something wrong, then opened PRI and realised you did this with my firmware :D thank you, you are great !

I've adjusted 1090p 60 fps bitrate to 28 mbits from 20 (default), won't it damage the device (by temperature or too much data flow through processor) ? I tried filming and checked temperature, after 10 mins filming gadget's screen is about 40 celsius, while ambient is 23 celsius. Probably everything is fine.
 
Last edited:
I am attempting to locate the bitrate table in a firmware from a DJI camera using the A9s using this tool, not having any luck however as the data structures seem to dissimilar.

I have downloaded this firmware https://dl.djicdn.com/downloads/osmo/OSMO_FC550_FW_V01.03.00.40.zip

I have decompiled the firmware to extract the ambarella firmware elements using these tools https://github.com/mefistotelis/phantom-firmware-tools

First I have unpacked the various total firmware package then separated the OSMO_FC550_FW_V01.03.00.40_m0101.bin into it's various elements

From this using fgrep the command points me to the OSMO_FC550_FW_V01.03.00.40_m0100_part_sys.a9s partition as being the likely candidate.

I am unable to locate the bitrate table this partition using the technique described above.

Can you provide any assistance - I would like to be able to repeat the procedure for other firmware as well share the process on this page for other users
https://github.com/mefistotelis/phantom-firmware-tools

thanks

Glenn
 
Back
Top