Skip to content

[BUG] Video rendering artifacts on certain MediaTek Android devices after Media3 upgrade #174026

@jillellamudisurya

Description

@jillellamudisurya

Steps to reproduce

Bug Description

After upgrading video_player_android from legacy ExoPlayer to Media3-ExoPlayer, we're experiencing video rendering artifacts (green lines) on certain Android devices. The issue appears to be device and video-specific.

Environment

  • Flutter Version: 3.32.8
  • video_player: 2.10.0
  • Platform: Android
  • Video Format: HLS streams (.m3u8)

Issue Details

  • Symptom: Green line artifacts appear on the right edge of videos
  • Scope: Affects specific Android devices with certain video resolutions
  • Regression: Issue appeared after Media3 upgrade, worked fine with legacy ExoPlayer
  • Content sensitivity:
    Some videos (e.g. 1280×720, 544×968) render correctly.
    Others (e.g. 848×478, 688×1040) show artifacts.
  • Other Players: Same videos play correctly in other video player apps on the same devices (eg: whatsapp)

Reproduction

  • Upgrade to video_player_android (Media3-based).
  • Play HLS video with resolution not aligned to 16px macroblocks (e.g. 848×478) OR with certain color/VUI metadata.
  • On MediaTek Dimensity device, observe vertical green line at the right side.

Additional Context

  • Only reproducible on MediaTek hardware decoders (c2.mtk.avc.decoder) when selected by Media3.
  • Legacy ExoPlayer often used OMX or SW paths that avoided this.
  • Appears to be related to decoder selection changes in Media3 + videos with certain width/height or VUI/crop metadata.

Expected results

Videos should render without any visual artifacts (no green lines or corruption) across all supported Android devices.

  • Playback should be consistent regardless of video resolution or device chipset.
  • Media3 upgrade should maintain feature parity with legacy ExoPlayer (no regressions in rendering quality).

Actual results

  • On certain Mediatek Dimensity devices, videos show a green diagonal line artifact across the frame.
  • The artifact appears only with some videos (depends on resolution/encoding).
  • Same videos play correctly on other devices and in other player apps.
  • Issue started only after migration to Media3-ExoPlayer; no artifacts in the legacy ExoPlayer build.

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

class VideoTestPage extends StatefulWidget {
  const VideoTestPage({super.key});

  @override
  State<VideoTestPage> createState() => _VideoTestPageState();
}

class _VideoTestPageState extends State<VideoTestPage> {
  late VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.networkUrl(
      Uri.parse(
        // Replace with a problematic HLS or MP4 sample
        // Example: "https://example.com/failing-video.m3u8"
        "https://example.com/example.mp4",
      ),
    )
      ..initialize().then((_) {
        setState(() {});
        _controller.play();
      });
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Media3 Artifact Repro')),
      body: Center(
        child: _controller.value.isInitialized
            ? AspectRatio(
                aspectRatio: _controller.value.aspectRatio,
                child: VideoPlayer(_controller),
              )
            : const CircularProgressIndicator(),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
VID-20250819-WA0005.online-video-cutter.com.mp4

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.8, on macOS 15.4.1 24E263 darwin-arm64, locale en-IN) [375ms]
    • Flutter version 3.32.8 on channel stable at /Users/suryajillellamudi/flutter_working/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision edada7c56e (4 weeks ago), 2025-07-25 14:08:03 +0000
    • Engine revision ef0cd00091
    • Dart version 3.8.1
    • DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [411ms]
    • Android SDK at /Users/suryajillellamudi/Library/Android/sdk
    ✗ cmdline-tools component is missing.
      Try installing or updating Android Studio.
      Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure to set the ANDROID_HOME environment variable.
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[!] Xcode - develop for iOS and macOS (Xcode 16.3) [973ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    ! CocoaPods 1.15.2 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [98ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.3) [97ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)

[✓] IntelliJ IDEA Ultimate Edition (version 2025.1.2) [96ms]
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 85.3.2
    • Dart plugin version 251.25410.28

[✓] VS Code (version 1.101.2) [10ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available) [6.0s]
    • A142 (mobile) • 00055346H000030 • android-arm64 • Android 15 (API 35)
    ! Error: Browsing on the local area network for Praja’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [427ms]
    • All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levele: device-specificOnly manifests on certain devicese: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.p: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions