Anaglyph 3d Video Player For Android -
You can easily modify the shader for top-bottom or full-SBS formats.
Rating: 4.4/5 | Price: Free (with ads) / $2.99 Pro
This is the closest you will get to a purpose-built anaglyph 3D video player for Android. Unlike others that treat 3D as a gimmick, this app is built from the ground up for stereoscopy.
This is the heart of the player. The shader runs on the GPU for each pixel:
// anaglyph.frag precision mediump float; varying vec2 vTextureCoord; uniform sampler2D uLeftTexture; uniform sampler2D uRightTexture;void main() vec4 leftPixel = texture2D(uLeftTexture, vTextureCoord); vec4 rightPixel = texture2D(uRightTexture, vTextureCoord); anaglyph 3d video player for android
// Standard red-cyan anaglyph float red = leftPixel.r; float green = rightPixel.g; float blue = rightPixel.b; gl_FragColor = vec4(red, green, blue, 1.0);
Optimized version with adjustable depth:
uniform float uDepthStrength; // 0.0 to 1.0void main() vec4 left = texture2D(uLeftTexture, vTextureCoord); vec4 right = texture2D(uRightTexture, vTextureCoord); You can easily modify the shader for top-bottom
// Depth-weighted blending float red = left.r; float green = mix(left.g, right.g, uDepthStrength); float blue = mix(left.b, right.b, uDepthStrength); gl_FragColor = vec4(red, green, blue, 1.0);
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.anaglyph3d"><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-feature android:glEsVersion="0x00020000" android:required="true" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="Anaglyph 3D Player" android:theme="@style/Theme.AppCompat.NoActionBar"> <activity android:name=".MainActivity" android:configChanges="orientation|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
</manifest>
A robust anaglyph 3D video player requires these core modules:
┌─────────────────────────────────────────────┐
│ User Interface │
│ (Playback controls, format selection, etc.)│
└───────────────────┬─────────────────────────┘
│
┌───────────────────▼─────────────────────────┐
│ Media Player Core │
│ (ExoPlayer / MediaPlayer) │
└───────────────────┬─────────────────────────┘
│
┌───────────────────▼─────────────────────────┐
│ Video Decoder (Hardware/Software) │
└───────────────────┬─────────────────────────┘
│ (Raw YUV/RGB frames)
┌───────────────────▼─────────────────────────┐
│ Frame Extractor & Splitter │
│ - Crop left/right from SBS │
│ - Crop top/bottom from TB │
│ - Resize to display resolution │
└───────────────────┬─────────────────────────┘
│
┌───────────────────▼─────────────────────────┐
│ Anaglyph Shader (GPU accelerated) │
│ - Fragment shader for real-time conversion │
│ - Color matrix transformation │
└───────────────────┬─────────────────────────┘
│
┌───────────────────▼─────────────────────────┐
│ Renderer (SurfaceView/GLSurfaceView)│
└─────────────────────────────────────────────┘
Abstract
This paper explores the technical requirements, architectural design, and implementation strategies for developing an Anaglyph 3D video player on the Android operating system. While Virtual Reality (VR) and autostereoscopic displays gain market share, anaglyph technology remains a cost-effective, hardware-agnostic solution for stereoscopic viewing. This document details the end-to-end pipeline from media extraction using Android’s MediaExtractor to rasterization using OpenGL ES Shaders (GLSL). Special attention is given to the signal processing required for real-time color isolation (dubois algorithm vs. simple isolation) and the geometric transformations necessary to support multiple 3D input formats (SBS, Over/Under, Interlaced).
An idea that started as a nostalgic curiosity: bringing analog stereoscopic cinema into the palms of modern users. Anaglyph 3D—red/cyan composite images that separate views by color—was one of the earliest and most accessible ways to create a stereoscopic experience. It requires only two slightly offset images (left and right) and inexpensive complementary glasses. The project began from a simple question: could an Android app replicate the old-school anaglyph effect in real time for video playback while taking advantage of modern phone hardware, sensors, and UX expectations? Rating: 4