chewie icon indicating copy to clipboard operation
chewie copied to clipboard

PlatformException(VideoError, Video player had error androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.64003C, -1, null, [8000, 1500, 25.0, ColorInfo(Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES, null, null)

Open PFY1213 opened this issue 1 year ago • 8 comments

import 'package:flutter/material.dart'; import 'package:chewie/chewie.dart'; import 'package:video_player/video_player.dart';

class VideoView extends StatefulWidget { final String url; final bool autoPlay; final bool looping; final double aspectRatio; const VideoView({super.key, required this.url, this.autoPlay=false, this.looping=false, this.aspectRatio=16/9,});

@override State<VideoView> createState() => _VideoViewState(); }

class _VideoViewState extends State<VideoView> { late VideoPlayerController _videoPlayerController; late ChewieController _chewieController; @override initState() { _videoPlayerController = VideoPlayerController.asset('assets/1.mp4'); initVideo(); _chewieController = ChewieController( videoPlayerController: _videoPlayerController, autoPlay: widget.autoPlay, looping: widget.looping, aspectRatio: widget.aspectRatio ); super.initState(); } Future initVideo() async { await _videoPlayerController.initialize(); }

@override void dispose() { _videoPlayerController.dispose(); _chewieController.dispose(); super.dispose(); }

@override Widget build(BuildContext context) { double screenW = MediaQuery.of(context).size.width; double screenH = MediaQuery.of(context).size.height; return Container( width: screenW, height: screenH/2, color: Colors.grey, child: Chewie( controller: _chewieController, ), ); } }

image

Does anyone have this problem? Please help me solve it. thank you.

PFY1213 avatar Oct 06 '24 18:10 PFY1213

same problem

AKA-LinCoder avatar Oct 13 '24 02:10 AKA-LinCoder

same problem

Version 3.24.3 is problematic, downgrade to version 3.22.1 is okay

PFY1213 avatar Oct 14 '24 06:10 PFY1213

I have same issue with flutter version 3.24.3 . But when i downgrade to 3.22.2 then it's Ok . I hope resolve this issues on new version flutter soon.

thanhcongvietec avatar Oct 21 '24 03:10 thanhcongvietec

  video_player_media_kit: ^1.0.5
  media_kit_libs_android_video: ^1.3.6`

main(){
   ...
       VideoPlayerMediaKit.ensureInitialized(
      android: true,          // default: false    -    dependency: media_kit_libs_android_video
      iOS: false,              // default: false    -    dependency: media_kit_libs_ios_video
    );
}

wapchief avatar Jan 08 '25 02:01 wapchief

@PFY1213 PlatformExceptions are beyond the scope of this library. Keep in mind that chewie is merely a UI layer over video_player. Any platform related video_player issues should be raised to the Flutter Team. Thanks.

diegotori avatar Jan 09 '25 16:01 diegotori

Hi guys, come here a bit late but i just have similar error with latest Chewie and video_player version with Flutter 3.27.2 I have try several way to fix on this link and this one work for me

  1. Add this to android\app\src\main\AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
  1. Add android:usesCleartextTraffic="true" tag in <application>:
<application android:usesCleartextTraffic="true" android:label="your_package_name" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">

if this don't work for, you guys can reference more way of fixing in the Stackoverflow problem in send above:D

UPDATE: this also work when i downgrade flutter from 3.27.2 to 3.24.2 anđ modify the version

  chewie: 1.8.0
  video_player: ^2.8.6

LostArrows27 avatar Feb 28 '25 15:02 LostArrows27

Hi guys, come here a bit late but i just have similar error with latest Chewie and video_player version with Flutter 3.27.2 I have try several way to fix on this link and this one work for me

  1. Add this to android\app\src\main\AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
  1. Add android:usesCleartextTraffic="true" tag in <application>:
<application android:usesCleartextTraffic="true" android:label="your_package_name" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">

if this don't work for, you guys can reference more way of fixing in the Stackoverflow problem in send above:D

UPDATE: this also work when i downgrade flutter from 3.27.2 to 3.24.2 anđ modify the version

  chewie: 1.8.0
  video_player: ^2.8.6

not resolve this question

LeoSsy avatar May 13 '25 09:05 LeoSsy

nfg

AKA-LinCoder avatar May 13 '25 09:05 AKA-LinCoder