Download the ffmpeg binary here(opens new window). Choose one based on your device’s architecture.
(For GitHub builds) Due to the limit of Replay’s command window, you'll need to rename the executable to a short name, like -> :fr:. Let’s call it <exec_name>.
Install an APK Editor from Google Play or anywhere else (Make sure to use safe sources such as APKPure).
Follow the instructions of the app to add the executable to /lib/<device_architecture> folder of the APK. Then build the APK and install it.
(Required for a clean install) Install required mods (Forge, Replay Mod).
Now launch Minecraft. We're not done yet, so force close it after launching.
Find latestlog.txt.
Open it and find this line: Added custom env: POJAV_NATIVEDIR=<directory>.
Copy the <directory> part.
Launch the game again, go to Replay Viewer and load the replay you want to export.
Follow Replay’s instructions to add keyframes, then (press T show mouse cursor and) click at Render Camera Path.
Scroll to the bottom, paste the text you copied in step 5 into the first command line window, then write /<exec_name> (step 1) at the end of the text line.