Autoexec.ash commands collection (UPDATE : 18/12/01 - full RTMP mod update)

psolyca

Member
Joined
Jul 30, 2018
Messages
45
Reaction score
17
Country
France
Hey guys,

In order to complete my custom firmware, here is a collection of commands/memory hack to add to an autoexec.ash file.
Lot of commands/hacks comes from irungentoo Github and various sites. I try to improve them.

These memory addresses are for 1.10.9 firmware.

MUST READ (from Irungentoo github)
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.
It is also important that the file have an empty line at the end.

Memory hacks
General instructions

The command is: writel <address> <value>
This command writes value to a ram address.
This means that this command 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 0xA06D48BC 0x42F00000 writes 0x42F00000 which corresponds to 120 to the address 0xA06D48BC.
This would set the bitrate for the 3840x2160 30P 16:9 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.


Video bitrate mod
Instructions
If you look in the bitrate addresses table below, and search for 0xA06D48BC you will see that it corresponds to the 3840x2160 30P 16:9 resolution.
The bitrate addresses correspond to the address for the high quality setting.
To get the bitrate address for the medium quality option, add: 0x10 i.e. 0xA06D48CC.
To get the address for the low quality option, add: 0x20 i.e. 0xA06D48DC.

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
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, i.e. 0xA06D48C0.
To get the address for the upper bound add 0x08 to the bitrate address, i.e. 0xA06D48C4.

Video bitrates addresses
Video bitrates


Audio bitrate mod
Instructions
Same as video bitrate mod

Audio bitrates addresses
Audio bitrates


RTMP bitrate mod
Instructions
The address 0xA011B8E0 correspond to the base bitrate value, 0x49742400 (1 000 000 bps).
The address 0xA06E50BC correspond to the address for the multiplicator for the high quality settings.
To get the bitrate address for the medium quality option, add: 0x10 i.e. 0xA06E50CC.
To get the address for the low quality option, add: 0x20 i.e. 0xA06E50DC.

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.
To get the address of the lower bound, add 0x04 to the bitrate address, i.e. 0xA06E50C0.
To get the address for the upper bound add 0x08 to the bitrate address, i.e. 0xA06E50C4.

These values are always egal to 1.0 so no need to change them.

The calculation for the bitrate is, for each quality :
  • high = base * high multiplicator
    • high lower bound = high * lower multiplicator
    • high upper bound = high * upper multiplicator
  • medium = base * medium mulitplicator
    • medium lower bound = medium * lower multiplicator
    • medium upper bound = medium * upper multiplicator
  • low = base * low multiplicator
    • low lower bound = high * lower multiplicator
    • low upper bound = high * upper multiplicator
BTW, lower and upper multiplicator are egal to 1.0 but they can be change to test.

Video bitrates addresses
Video bitrates base (do not need to change it, just change multiplicator).
Video bitrates multiplicator (limited from 0.05 to 5)

RTMP resolution mod
Instructions
These 3 following addresses correspond to the choice of the resolution for the live stream in the phone app :
0xA011CF54 <= choice of the 480p resolution
0xA011CF80 <= choice of the 1080p resolution
0xA011CFAC <= choice of the 720p resolution
One is only accessible through telnet and the SendToRTOS rtmp command
0xA011CF28 <= choice of the 360p resolution

In order to change the resolution and the associated framerate, a value corresponding to this resolution could be set.
This value are in the linked table (first column) (use for main video bitrate mod)
So to be able to use the 1280x720 60P 16:9 format when livestreaming at 1080p or the 1920x1440 60P 4:3 when switching to 480p, add this to your autoexec.ash
Code:
writeb 0xA011CF80 0x23
writeb 0xA011CF54 0x10
RTMP full mod
Instructions
Just mix the RTMP bitrate mod and the resolution mod to have 3 different presets.
An already made file is this autoexec.ash, customise it.
Use this script Yi full RTMP mod
TAKE CARE, the base bitrate is the same for all presets, play with the resolution multiplicator.

Commands
To Do

More to come...
  • Available commands
  • custom shutter speed in video mode instead of auto
  • loops (recorded in 10x slowmotion :) ) to be shorter
  • change framerate
Github/Gist repositories :
Update :
  • 18/11/06 : Creation of the page
  • 18/11/15 : RTMP reolution mod and RTMP full mod
  • 18/12/01 : Some update to RTMP full mod.
Thanks
 
Last edited:
OP
P

psolyca

Member
Joined
Jul 30, 2018
Messages
45
Reaction score
17
Country
France
RESERVED


Is someone using the bitrate live stream hack ?
Please, for a developper even a hobbyist, it is good to know if my work is not "a fart in the wind"...

It seems that RTMP transmission is limited to 5 Mbps. I will investigate futher if it is a hardware limitation or stream downsizing.
 
Last edited:

dayz_hk

New Member
Joined
Oct 5, 2018
Messages
6
Reaction score
0
Country
Hong Kong
Thankyou for your work!
I've been busy testing multiple settings for 720p but still not sure how to get the bitrate to stay within my desired limits.
It seems to want to jump up high even if i set the multiplicator to a low number.
I will continue to try different settings.
Hoping some other users can share their experience & settings.
This short clip I set the low bitrate to 1600 but it jumps up over 3000.
 
OP
P

psolyca

Member
Joined
Jul 30, 2018
Messages
45
Reaction score
17
Country
France
@dayz_hk, and without tuning your multiplicator everything is stable ?

Someone reported that bitrate is limited to 5 Mbps but I am waiting to know if the bitrate is stable or not and at which resolution.
 

dayz_hk

New Member
Joined
Oct 5, 2018
Messages
6
Reaction score
0
Country
Hong Kong
@dayz_hk, and without tuning your multiplicator everything is stable ?

Someone reported that bitrate is limited to 5 Mbps but I am waiting to know if the bitrate is stable or not and at which resolution.
Yes it works & seems to be limited to 5-6k bitrate which is more than enough. I have only tested 720p.
I did another test stream today at 720p. I set low multiplicator to 1.2 and high to 3. When I started I chose low from the app. The stream fluctuated between approx 2700 & 3500. Weird but it works which is fantastic!
 

Similar threads


Top