Process video and photos on an Android phone with FFmpeg and darktable
Desktop video and photo tools run on Android inside a Linux system. The interesting part is the GPU: some filters run 2 to 7 times faster on the phone's Adreno GPU, some light jobs are slower, and the phone's hardware video encoder can be used too. All numbers below were measured.
What you can do
- Batch-process video with FFmpeg: cut, scale, denoise, add captions, re-encode, from a script you can re-run.
- Denoise video on the GPU with FFmpeg 8's Vulkan filters or OpenCL filters.
- Encode with the phone's hardware encoder (H.264 or HEVC) from Linux programs.
- Develop RAW photos with darktable, including its command line exporter, with OpenCL on the GPU.
- Edit the result on the Linux desktop or move it to Android's storage with the built-in file manager.
Measured: GPU vs CPU
Denoising (nlmeans) 30 frames of 1080p video. The GPU output matches the CPU output (76 dB PSNR for Vulkan, 48.7 dB for OpenCL on the Tab S7, identical-looking).
| Filter | Device | GPU | CPU |
|---|---|---|---|
| nlmeans_vulkan (FFmpeg 8.1.3) | Flip 3 | 39.6 s | 78.2 s |
| nlmeans_vulkan (FFmpeg 8.1.3) | Tab S7 | 44.7 s | 197 s |
| nlmeans_opencl (FFmpeg 7.1) | Flip 3 | 23.3 s | 62.6 s |
| nlmeans_opencl (FFmpeg 7.1) | Tab S7 | 32.4 s | 226 s |
| light blur (OpenCL) | Flip 3 | 1.8 s | 0.3 s |
Light jobs are slower on the GPU: moving frames to the GPU and back costs more than the filter. The GPU pays off for heavy filters like denoising.
darktable
darktable 5.0.1 runs its export pipeline on the GPU with output identical to the CPU. Its default JPEG export is light, so the CPU was faster there (Flip 3: 0.7 s GPU vs 0.38 s CPU; Tab S7: 3.7 s vs 1.5 s, after about 4 s of one-time kernel compiling). Heavy modules such as denoise were not measured.
Hardware video encoder
On the Tab S7, PocketShell's ps-hwenc-ffmpeg re-encodes a 10-second 1080p30 clip with the phone's Qualcomm H.264 encoder in 4.2–4.8 s, against 7.2 s for x264 (medium preset) on the CPU. Quality is lower: 44–49 dB PSNR against 52–56 dB for x264. Good for quick exports and previews; use x264 or x265 when quality matters. Not yet tested on the Flip 3.
Limits, plainly
- The GPU path in PocketShell works on Qualcomm Adreno GPUs only. On other GPUs (Mali on many Exynos, MediaTek and Google Tensor phones) the same programs run on the CPU, which is much slower for graphics. That is being worked on; it does not work today.
- Debian 13's own FFmpeg 7.1 Vulkan filters return empty frames on this driver; FFmpeg 8 fixes that, so PocketShell installs FFmpeg 8 separately (below).
- The GPU drivers are installed the first time the Linux desktop starts; before that everything runs on the CPU.
- Keep the screen on for long jobs: Android throttles the phone when the display is off.
How to try it
- Start the Linux desktop once (installs the GPU drivers).
- FFmpeg 8 with working Vulkan filters:
ps-gpu get-ffmpeg(a 9.2 MB download, checked against a pinned SHA-256). - OpenCL for FFmpeg and darktable:
ps-gpu opencl(about 150 MB from Debian's backports). - Denoise on the GPU (the example
ps-gpuprints):ps-gpu ffmpeg -init_hw_device vulkan=vk -filter_hw_device vk -i in.mp4 -vf 'hwupload,nlmeans_vulkan,hwdownload,format=yuv420p' out.mp4 - Hardware encode, keeping the audio:
ps-hwenc-ffmpeg -c hevc -b 8M in.mp4 out.mp4
ps-gpu helper that sets them up per program, an FFmpeg 8 build whose Vulkan filters work on that driver, and a bridge that lets Linux programs use Android's hardware encoder. PocketShell is a 15-day free trial, then €7.99 once, no subscription. Pricing · DownloadQuestions
Can I run FFmpeg on Android with GPU acceleration?
Yes, on Qualcomm Adreno GPUs. FFmpeg 8's Vulkan filters and OpenCL filters run on the GPU inside PocketShell; denoising 1080p was 2–7 times faster than the CPU on a Galaxy Z Flip 3 and Galaxy Tab S7.
Is the GPU always faster?
No. Light filters like a small blur were slower on the GPU because copying frames to and from the GPU costs more than the filter.
Can Linux programs use the phone's hardware video encoder?
Yes, through PocketShell's ps-hwenc bridge to Android's encoder. It was about 1.5 times faster than x264 on a Galaxy Tab S7, at lower quality.
Written by Muhammad Taha Raees, the developer of PocketShell. Measurements are single runs on the devices named, unless the text says otherwise. Last checked: 2026-11-04.