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

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).

FilterDeviceGPUCPU
nlmeans_vulkan (FFmpeg 8.1.3)Flip 339.6 s78.2 s
nlmeans_vulkan (FFmpeg 8.1.3)Tab S744.7 s197 s
nlmeans_opencl (FFmpeg 7.1)Flip 323.3 s62.6 s
nlmeans_opencl (FFmpeg 7.1)Tab S732.4 s226 s
light blur (OpenCL)Flip 31.8 s0.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

How to try it

  1. Start the Linux desktop once (installs the GPU drivers).
  2. FFmpeg 8 with working Vulkan filters: ps-gpu get-ffmpeg (a 9.2 MB download, checked against a pinned SHA-256).
  3. OpenCL for FFmpeg and darktable: ps-gpu opencl (about 150 MB from Debian's backports).
  4. Denoise on the GPU (the example ps-gpu prints): ps-gpu ffmpeg -init_hw_device vulkan=vk -filter_hw_device vk -i in.mp4 -vf 'hwupload,nlmeans_vulkan,hwdownload,format=yuv420p' out.mp4
  5. Hardware encode, keeping the audio: ps-hwenc-ffmpeg -c hevc -b 8M in.mp4 out.mp4
Where PocketShell fits. Android keeps the GPU's compute drivers and the hardware video encoder away from Linux programs. PocketShell ships the GPU drivers for Adreno, a 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 · Download

Questions

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.