APALink — dynamic bitrate switching for APFPV
APALink is a C program for the APFPV firmware, created to keep the video link stable.
It uses fallback logic, automatically lowering the bitrate (for example, to 2 Mbps) when the signal is weak.
Installation
- Go to GitHub
- Follow the instructions in the
README.mdfile - Copy the executable to
/usr/bin:
bash
chmod 777 +x /usr/bin/ap_alink- Copy the configuration file
ap_alink.confto the/etc/directory - (Optional) Copy
vtxmenu.inito/etc/to enable the APFPV menu - Go fly! 🚀
Configuring ap_alink.conf
The configuration file lets you change the bitrate and threshold parameters:
bash
bitrate_max=22 ## Maximum bitrate with a good signal
bitrate_min=2 ## Minimum bitrate in fallback mode
dbm_threshold=-47 ## Threshold for activating fallback (dBm)Tip
- Lower threshold → better image quality for longer, but possible lag with a weak signal
- Higher threshold → fallback activates sooner, reducing lag, but quality is lower
Recommended settings
- BL-M8812EU2
bash
bitrate_max=12
bitrate_min=2
dbm_threshold=-52- BL-R8812AF1
bash
bitrate_max=10
bitrate_min=2
dbm_threshold=-48The VTXMENU menu
Through the MSP menu (as in HDZero or WFB-NG) you can configure:
- Tx Power:
1500or2000(25mW / 100mW) - Channel: all available 5GHz channels
- AutoPower:
0or1— automatic power adjustment viaiw

