chewie
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)
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, ), ); } }
Does anyone have this problem? Please help me solve it. thank you.
same problem
same problem
Version 3.24.3 is problematic, downgrade to version 3.22.1 is okay
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.
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
);
}
@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.
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
- Add this to
android\app\src\main\AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
- 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
Hi guys, come here a bit late but i just have similar error with latest Chewie and video_player version with Flutter
3.27.2I have try several way to fix on this link and this one work for me
- Add this to
android\app\src\main\AndroidManifest.xml:<uses-permission android:name="android.permission.INTERNET"/>
- 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.2to3.24.2anđ modify the versionchewie: 1.8.0 video_player: ^2.8.6
not resolve this question
nfg