Refract app icon Refract
Refract app icon
Android 7.0+ · FFmpeg Full-GPL · 100% On-Device

Local video transcoding & M3U8 downloads, with every FFmpeg flag visible.

Refract (折光) is a focused Android media utility built with Material Design 3. Remux TS to MP4 without quality loss, re-encode to H.264/H.265/VP9, trim clips on a millisecond-level timeline, or download multi-threaded HLS streams—entirely on your device with zero uploads and zero trackers.

Package: moe.xleine.refract Requires: Android 7.0+ (API 24) Telemetry: None
Core Capabilities

Built around real media workflows, not black-box presets.

Every feature below runs entirely on your device, powered by the app's built-in FFmpeg engine.

Lossless Remux & Flexible Transcoding

Switch containers in seconds with stream copy (such as TS to MP4 with automatic AAC ADTS header repair), or re-encode with H.264, H.265, VP9, MPEG-4, AAC, MP3, or Opus with CRF quality and speed controls.

Transparent FFmpeg Command Inspector

See the exact FFmpeg command before execution. Tap any color-coded argument token to read what it does, review preflight compatibility warnings, append custom extra flags, or copy the command to clipboard.

Actionable Error Diagnostics

When a stream combination fails, Refract highlights the key FFmpeg error line, explains likely causes in plain language, and offers one-tap fixes—like enabling aac_adtstoasc or switching to H.264 + AAC.

Millisecond Trimming & Multi-Audio Tracks

Preview videos smoothly to set millisecond-level start and end points. Select a specific audio stream from multi-track containers, strip audio, or export audio-only M4A/MP3 files.

Multi-Threaded M3U8 / HLS Downloader

Probe Master Playlists for resolution variants, download with 1–16 configurable threads, decrypt AES-128/192/256 CBC streams, handle disguised image-header TS segments, set custom Referer/UA/Cookie headers, and pause, resume, or merge partial downloads into MP4 or TS.

Native Android Integration & Presets

Open files from any app via "Open with" or "Share to", keep long jobs alive via Foreground Services, save custom format recipes locally, and manage history or temporary staging cache with one tap.

Supported Containers, Codecs & Presets Built-in Format Support
Output Containers
MP4 · MKV · MOV · WebM · TS · AVI · GIF · M4A · MP3
Video Codecs
Stream Copy (Lossless) · H.264 (libx264) · H.265 / HEVC (libx265) · VP9 (libvpx-vp9) · MPEG-4 · Audio-only
Audio Codecs
Stream Copy · AAC (192 kbps) · MP3 (libmp3lame, 192 kbps) · Opus (128 kbps) · Mute (-an)
Built-in Presets
TS → MP4 Lossless · Universal H.264 · Compact H.265 · Extract M4A Audio · Animated GIF (480p) + Custom Saved Presets
M3U8 / HLS Features
Master Playlist variant selection · 1–16 threads · AES-128/192/256 CBC · Live stream recording · fMP4 & TS lossless MP4/TS merge
Privacy & Architecture

Offline-first engineering with minimal Android permissions.

Every privacy claim below reflects the actual compiled dependencies and AndroidManifest.xml declarations in Refract.

Media never leaves your device

All probing, trimming, transcoding, and HLS segment merging run locally on your device. There is no developer backend server and no cloud upload queue.

No accounts, no ads, no analytics SDKs

Refract contains no ad networks, no usage tracking, no automated crash telemetry, and no Firebase runtime libraries. Open the app and start converting immediately.

Zero broad storage permissions

The app does not declare READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, or READ_MEDIA_VIDEO. It accesses only the exact files you choose via Android Photo Picker or Storage Access Framework.

Direct, user-initiated networking only

Network access is used exclusively when you trigger an M3U8 download or paste a webpage URL to extract an M3U8 stream, connecting straight from your phone to the endpoint you entered.

FAQ

Common questions

Does Refract upload my videos to a server for conversion?
No. All video probing, trimming, transcoding, and merging run 100% locally on your Android device. You can convert local videos completely offline, even in airplane mode.
Why does Refract declare Internet permission if transcoding is offline?
Internet access is only used by the built-in M3U8 / HLS downloader when you explicitly enter a stream or webpage URL to parse or download. Your device connects directly to the server you specify—never to a developer server.
Where are converted videos saved, and why aren't storage permissions requested?
Refract uses Android's zero-permission Photo Picker and Storage Access Framework (SAF) to read only the files you pick. On Android 10 and above, completed outputs are automatically saved to a dedicated folder under your device's Downloads directory, and you can also export any file to a custom folder using "Save As".
When should I use "Stream Copy (Lossless)" vs. re-encoding?
Choose Stream Copy when you only need to change the container (such as converting a recorded .ts video into .mp4) and the codecs are already compatible—it finishes in seconds with zero quality loss. Choose H.264, H.265, or VP9 when you want to reduce file size, scale resolution (1080p/720p/480p), or convert incompatible codecs.
How does the M3U8 downloader handle encrypted streams or 403 errors?
Refract supports standard HLS AES-128, AES-192, and AES-256 CBC decryption (including inline data URI keys and RFC 8216 sequence IVs) and strips disguised image prefixes on TS segments. If a stream server returns HTTP 401 or 403, you can expand Advanced Options to provide custom Referer, User-Agent, or Cookie headers for that task.
How can I clear temporary cache or delete my history?
Open Conversion History to view staging cache usage and tap "Clear Cache" at any time. You can swipe or select history entries to remove records (with an option to also delete exported files), or uninstall the app to remove all local database records, preferences, and app-private files.