wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

SBAGen (.sbg files) are not playing, despite FFMpeg being functional about them #133

Closed moriciogithub closed 3 months ago

moriciogithub commented 3 months ago

Describe the bug FPV does not play an SBG file (SBaGen) when FFMpeg does it.

Expected behavior The file must be playable.

Log

E/flutter (30435): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(media open error, invalid or unsupported media, null, null)
E/flutter (30435): #0      MdkVideoPlayerPlatform.create (package:fvp/src/video_player_mdk.dart:264:7)
E/flutter (30435): <asynchronous suspension>
E/flutter (30435): #1      VideoPlayerController.initialize (package:video_player/video_player.dart:440:19)
E/flutter (30435): <asynchronous suspension>
E/flutter (30435): #2      _ButterFlyAssetVideoState.initState.<anonymous closure> (package:fvp_example/main.dart:168:35)
E/flutter (30435): <asynchronous suspension>
E/flutter (30435):
W/FvpPlugin(30435): onMethodCall: ReleaseRT texId: 2, surfaces: 0 textures: 0
D/AudioTrack(30435): stop(1784): called with 1540 frames delivered

Thnaks for an answer.

wang-bin commented 3 months ago

fvp supports ffmpeg 4~7 runtime libraries without rebuilding. you can remove libffmpeg(lobffmpeg.so, libffmpeg.dylib, ffmpeg-*.dll) in fvp destination dir, and add your own ffmpeg libraries(avcodec, avformat etc.) instead, then your ffmpeg will be used. the prebuilt libffmpeg is a lite version with only frequently used features.

moriciogithub commented 3 months ago

Hello and thanks for your prompt answer.

One question: Where do I get prebuilt libffmpeg files for Android and iOS? Google it and didn't find anything.

Thanks again,

Mauricio

wang-bin commented 3 months ago

build yourself. I have a build script https://github.com/wang-bin/avbuild

moriciogithub commented 3 months ago

Hello.

I'm so sorry to bother you. I have unable to build it. I have setup a VM with Ubuntu 22.04, install the build-essentials, downloaded your script, ffmpeg source code version 6.1.2. After running it comes with message

C compiler test failed. clang: error: unsupported option '-gcc-toolchain'

Do you have a doc with the correct setup in order to build the lib?

Thanks in advance.

Mauricio

wang-bin commented 3 months ago

you have to use ndk to build android software