AFRd Auto Frame Rate Daemon Works with 64-bit Amlogic Processors

Automatic frame rate switching in TV box ensures video output matches the video frame rate in order to avoid skipped frames (judder) from time to time, and makes the videos much smoother to watch, especially to trained eyes.

The problem is that the feature is not always implemented, and/or does not work for all apps. AFRd auto frame rate daemon aims to solve this issue by automatically switching video output to match the video framerate – e.g. 23.976 fps or 59.94 fps – on Android TV boxes powered by one of Amlogic 64-bit processors, be it S905, S905X, S905X2, S912, S905W and other more recent Armv8 processors from the company.

AFRd Auto Frame Rate Daemon for Amlogic

Developed by Andrey Zabolotny (anpaza), AFRd is Linux daemon can be linked to either bionic for Android, or glibc for Linux operating systems, and the source code can be found on Github.

It relies on two techniques to detect the video frame rate, and adequately change video output (HDMI) frame rate:

  • Kernel uevent-based notifications available in AmLogic 3.14 kernels up to Kernel 4.9 used in Android 7 and 8. Example of uevent when a 29.976 fps movie is started (FRAME_RATE_HINT contains the info):

  • In newer kernels or when uevent notifications are not generated, video decoder notifications emitted at the start and end of playback are used instead. Example of video start:

    Since the frame rate is not shown in the data, the daemon will check /sys/class/vdec/vdec_status when the event above is detected:

    Frame dur is used is not zero, otherwise frame rate data is selected with 23 fps meaning 23.976 fps, 29 is 29.970fps and 59 represents 59.94 fps.

The installation will be easily in Android, as Andrey provides an apk (ru.cobra.zap.afrd-0.3.2.apk) which you can install in your rooted TV box.

AFRD screenshot
Click to Enlarge

Then you can enter the app to enable/disable auto frame rate, and adjust other settings such as preferred frequencies. It’s also possible to directly edit AFDR configuration, and/or control the daemon through an API as explained in details in the Github page.

Via AndroidPC.es

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
3 Comments
oldest
newest
phh
phh
4 years ago

Another solution on Android, without requiring root, is to use NOVA Video Player, it has a setting to set hdmi frame rate based on video

Tim
Tim
4 years ago

Never heard of this player but it’s certainly nice.

theguyuk
theguyuk
4 years ago

I cannot find any option in Nova Video player to switch frame rate

Khadas VIM4 SBC