Autoexec.ash commands collection (UPDATE : 18/11/15 - full RTMP mod)

Joined
Jul 30, 2018
Messages
32
Likes
13
Country
France
#1
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
Video bitrates multiplicator (limited from 0.05 to 5)

Code:
#For 6 Mbps bitrate
writel 0xA011B8E0  0x49927C00 #base of the bitrate
writel 0xA06E50BC  0x40A00000 #5 - multiplicator high quality settings for 1920x1080p
writel 0xA06E50CC  0x40933333 #4.6 - multiplicator middle quality settings for 1920x1080p
writel 0xA06E50DC  0x40866666 #4.2 - multiplicator low quality settings for 1920x1080p
writel 0xA06E50FC  0x40A00000 #5 - multiplicator high quality settings for 1280x720p
writel 0xA06E510C  0x40933333 #4.6 - multiplicator middle quality settings for 1280x720p
writel 0xA06E511C  0x40866666 #4.2 - multiplicator low quality settings for 1280x720p
writel 0xA06E513C  0x40A00000 #5 - multiplicator high quality settings for 848x480p
writel 0xA06E514C  0x40933333 #4.6 - multiplicator middle quality settings for 848x480p
writel 0xA06E515C  0x40866666 #4.2 - multiplicator low quality settings for 848x480p
writel 0xA06E517C  0x40A00000 #5 - multiplicator high quality settings for 640x360p
writel 0xA06E518C  0x40933333 #4.6 - multiplicator middle quality settings for 640x360p
writel 0xA06E519C  0x40866666 #4.2 - multiplicator low quality settings for 640x360p

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
```
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.
TAKE CARE, the base bitrate is the same for all presets, play with the resolution multiplicator.

Commands
To Do

More to come...
  • Available commands
Github/Gist repositories :
Update :
  • 18/11/06 : Creation of the page
  • 18/11/15 : RTMP reolution mod and RTMP full mod
Thanks
 
Last edited:
OP
OP
P
Joined
Jul 30, 2018
Messages
32
Likes
13
Country
France
#2
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
Likes
0
Country
Hong Kong
#3
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
OP
P
Joined
Jul 30, 2018
Messages
32
Likes
13
Country
France
#4
@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
Likes
0
Country
Hong Kong
#5
@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