Skip to content

Latest commit

 

History

History
370 lines (352 loc) · 7.3 KB

Readme.md

File metadata and controls

370 lines (352 loc) · 7.3 KB

Yi 4k and 4k+ bitrate mod.

Start by opening up the autoexec.ash that corresponds to the firmware version that you have.

It is important to note that the autoexec file needs to have linux line endings (meaning you need to have an editor like Notepad++ if you are on windows. Using something like the default windows notepad will add windows line endings which will break the file. This is also the reason why you must not copy paste the file from github and instead (save as) download it if you are on windows). It is also important that the file have an empty line at the end.

The command is: writel <address> <value>

This command writes value to a ram address. This means that this mod is not permanent and if you want it gone you can just remove the autoexec.ash file from your sd card and restart your camera.

For example this command: writel 0xA9D004 0x42F00000

writes 0x42F00000 which corresponds to 120 to the address 0xA9D004, on firmware 1.3.11 this would set the bitrate for the 4000x3008 30P 4:3 resolution to 120 (120mbps). If you look in the video table below you will see that 0x42F00000 corresponds to 120. You can replace 0x42F00000 with any other value to set any other bitrate.

If you look in the bitrate_addresses.txt file for firmware 1.3.11, and search for 0xA9D004 you will see that it corresponds to the 4000x3008 30P 4:3 resolution. The bitrate addresses in that file correspond to the address for the high quality setting. To get the bitrate address for the medium quality option, add: 0x10. To get the address for the low quality option, add: 0x20.

Other values that can be set other than the bitrate are the lower and upper bound values. These values correspond to how closely the encoder should try to follow the set bitrate. A lower bound of 0.75 will make the encoder not go below a bitrate of 0.75 multiplied by the set bitrate and a higher bound of 1.25 will make the encoder not go above a bitrate of 1.25 multiplied by the set bitrate.

To get the address of the lower bound, add 0x04 to the bitrate address, to get the address for the upper bound add 0x08 to the bitrate address.

Audio bitrate values

The audio bitrate is stored as a 32 bit integer corresponding to the number of bits per second.

ex: 0x1F400 is 128000 bits per second which is 128kb/s.

0x1F40 #8kbs
0x3E80 #16kbs
0x7D00 #32kbs
0xFA00 #64kbs
0x17700 #96kbs
0x1F400 #128kbs
0x3E800 #256kbs
0x4E200 #320kbs

Video bitrate table values

The values in the video bitrate table are stored as 32 bit floating point values, for your convenience I have a table here with all the conversions you should ever need:

0x3D4CCCCD #0.05
0x3DCCCCCD #0.1
0x3E19999A #0.15
0x3E4CCCCD #0.2
0x3E800000 #0.25
0x3E99999A #0.3
0x3EB33333 #0.35
0x3ECCCCCD #0.4
0x3EE66666 #0.45
0x3F000000 #0.5
0x3F0CCCCD #0.55
0x3F19999A #0.6
0x3F266666 #0.65
0x3F333333 #0.7
0x3F400000 #0.75
0x3F4CCCCD #0.8
0x3F59999A #0.85
0x3F666666 #0.9
0x3F733333 #0.95
0x3F800000 #1
0x3F866666 #1.05
0x3F8CCCCD #1.1
0x3F933333 #1.15
0x3F99999A #1.2
0x3FA00000 #1.25
0x3FA66666 #1.3
0x3FACCCCD #1.35
0x3FB33333 #1.4
0x3FB9999A #1.45
0x3FC00000 #1.5
0x3FC66666 #1.55
0x3FCCCCCD #1.6
0x3FD33333 #1.65
0x3FD9999A #1.7
0x3FE00000 #1.75
0x3FE66666 #1.8
0x3FECCCCD #1.85
0x3FF33333 #1.9
0x3FF9999A #1.95
0x40000000 #2
0x40033333 #2.05
0x40066666 #2.1
0x4009999A #2.15
0x400CCCCD #2.2
0x40100000 #2.25
0x40133333 #2.3
0x40166666 #2.35
0x4019999A #2.4
0x401CCCCD #2.45
0x40200000 #2.5
0x40233333 #2.55
0x40266666 #2.6
0x4029999A #2.65
0x402CCCCD #2.7
0x40300000 #2.75
0x40333333 #2.8
0x40366666 #2.85
0x4039999A #2.9
0x403CCCCD #2.95
0x40400000 #3
0x40433333 #3.05
0x40466666 #3.1
0x4049999A #3.15
0x404CCCCD #3.2
0x40500000 #3.25
0x40533333 #3.3
0x40566666 #3.35
0x4059999A #3.4
0x405CCCCD #3.45
0x40600000 #3.5
0x40633333 #3.55
0x40666666 #3.6
0x4069999A #3.65
0x406CCCCD #3.7
0x40700000 #3.75
0x40733333 #3.8
0x40766666 #3.85
0x4079999A #3.9
0x407CCCCD #3.95
0x40800000 #4
0x4081999A #4.05
0x40833333 #4.1
0x4084CCCD #4.15
0x40866666 #4.2
0x40880000 #4.25
0x4089999A #4.3
0x408B3333 #4.35
0x408CCCCD #4.4
0x408E6666 #4.45
0x40900000 #4.5
0x4091999A #4.55
0x40933333 #4.6
0x4094CCCD #4.65
0x40966666 #4.7
0x40980000 #4.75
0x4099999A #4.8
0x409B3333 #4.85
0x409CCCCD #4.9
0x409E6666 #4.95
0x40A00000 #5
0x41200000 #10
0x41700000 #15
0x41A00000 #20
0x41C80000 #25
0x41F00000 #30
0x420C0000 #35
0x42200000 #40
0x42340000 #45
0x42480000 #50
0x425C0000 #55
0x42700000 #60
0x42820000 #65
0x428C0000 #70
0x42960000 #75
0x42A00000 #80
0x42AA0000 #85
0x42B40000 #90
0x42BE0000 #95
0x42C80000 #100
0x42D20000 #105
0x42DC0000 #110
0x42E60000 #115
0x42F00000 #120
0x42FA0000 #125
0x43020000 #130
0x43070000 #135
0x430C0000 #140
0x43110000 #145
0x43160000 #150
0x431B0000 #155
0x43200000 #160
0x43250000 #165
0x432A0000 #170
0x432F0000 #175
0x43340000 #180
0x43390000 #185
0x433E0000 #190
0x43430000 #195
0x43480000 #200
0x434D0000 #205
0x43520000 #210
0x43570000 #215
0x435C0000 #220
0x43610000 #225
0x43660000 #230
0x436B0000 #235
0x43700000 #240
0x43750000 #245
0x437A0000 #250
0x437F0000 #255
0x43820000 #260
0x43848000 #265
0x43870000 #270
0x43898000 #275
0x438C0000 #280
0x438E8000 #285
0x43910000 #290
0x43938000 #295
0x43960000 #300
0x43988000 #305
0x439B0000 #310
0x439D8000 #315
0x43A00000 #320
0x43A28000 #325
0x43A50000 #330
0x43A78000 #335
0x43AA0000 #340
0x43AC8000 #345
0x43AF0000 #350
0x43B18000 #355
0x43B40000 #360
0x43B68000 #365
0x43B90000 #370
0x43BB8000 #375
0x43BE0000 #380
0x43C08000 #385
0x43C30000 #390
0x43C58000 #395
0x43C80000 #400
0x43CA8000 #405
0x43CD0000 #410
0x43CF8000 #415
0x43D20000 #420
0x43D48000 #425
0x43D70000 #430
0x43D98000 #435
0x43DC0000 #440
0x43DE8000 #445
0x43E10000 #450
0x43E38000 #455
0x43E60000 #460
0x43E88000 #465
0x43EB0000 #470
0x43ED8000 #475
0x43F00000 #480
0x43F28000 #485
0x43F50000 #490
0x43F78000 #495
0x43FA0000 #500
0x43FC8000 #505
0x43FF0000 #510
0x4400C000 #515
0x44020000 #520
0x44034000 #525
0x44048000 #530
0x4405C000 #535
0x44070000 #540
0x44084000 #545
0x44098000 #550
0x440AC000 #555
0x440C0000 #560
0x440D4000 #565
0x440E8000 #570
0x440FC000 #575
0x44110000 #580
0x44124000 #585
0x44138000 #590
0x4414C000 #595
0x44160000 #600
0x44174000 #605
0x44188000 #610
0x4419C000 #615
0x441B0000 #620
0x441C4000 #625
0x441D8000 #630
0x441EC000 #635
0x44200000 #640
0x44214000 #645
0x44228000 #650
0x4423C000 #655
0x44250000 #660
0x44264000 #665
0x44278000 #670
0x4428C000 #675
0x442A0000 #680
0x442B4000 #685
0x442C8000 #690
0x442DC000 #695
0x442F0000 #700
0x44304000 #705
0x44318000 #710
0x4432C000 #715
0x44340000 #720
0x44354000 #725
0x44368000 #730
0x4437C000 #735
0x44390000 #740
0x443A4000 #745
0x443B8000 #750
0x443CC000 #755
0x443E0000 #760
0x443F4000 #765
0x44408000 #770
0x4441C000 #775
0x44430000 #780
0x44444000 #785
0x44458000 #790
0x4446C000 #795
0x44480000 #800
0x44494000 #805
0x444A8000 #810
0x444BC000 #815
0x444D0000 #820
0x444E4000 #825
0x444F8000 #830
0x4450C000 #835
0x44520000 #840
0x44534000 #845
0x44548000 #850
0x4455C000 #855
0x44570000 #860
0x44584000 #865
0x44598000 #870
0x445AC000 #875
0x445C0000 #880
0x445D4000 #885
0x445E8000 #890
0x445FC000 #895
0x44610000 #900
0x44624000 #905
0x44638000 #910
0x4464C000 #915
0x44660000 #920
0x44674000 #925
0x44688000 #930
0x4469C000 #935
0x446B0000 #940
0x446C4000 #945
0x446D8000 #950
0x446EC000 #955
0x44700000 #960
0x44714000 #965
0x44728000 #970
0x4473C000 #975
0x44750000 #980
0x44764000 #985
0x44778000 #990
0x4478C000 #995