I'm implementing video player functionality in a Flutter app but I don't understand which is the best video format that work in both systems (IOS & Android).
I use video_player 0.10.0+2 and chewie 0.9.6.
Actually we're using H264 with container MKV and H265 with container MP4 (HEVC) but on IOS (real device) doesnt' work and in Android works but with some errors.
Some piece of code...
// Declaration
VideoPlayerController _playerController;
// Initialization
if (_playerController == null) {
_playerController = VideoPlayerController.network(_myVideoUrl)
..setVolume(0.0)
..setLooping(true)
..initialize();
}
//Play
_playerController.play();
//Stop
if (_playerController != null) {
_playerController.pause();
}
@override
void deactivate() {
super.deactivate();
if (_playerController != null) {
_playerController.pause();
}
}
@override
void dispose() {
super.dispose();
if (_playerController != null) {
_playerController.pause();
}
_playerController = null;
}
In IOS on real devices the video are not playing without error message.
In Android the video are playing but with these problems:
1) Log Error:
2019-03-24 15:30:49.468 1739-1817/? E/OMXNodeInstance: getExtensionIndex(0xf411c240:google.h264.decoder, OMX.google.android.index.enableAndroidNativeBuffers) ERROR: UnsupportedIndex(0x8000101a)
2019-03-24 15:30:49.468 16136-16335/it.itasoft.moc E/ACodec: [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
2019-03-24 15:30:49.472 1739-1817/? E/OMXNodeInstance: setConfig(0xf411c240:google.h264.decoder, ConfigPriority(0x6f800002)) ERROR: UnsupportedIndex(0x8000101a)
2019-03-24 15:30:49.473 1739-1817/? E/OMXNodeInstance: getConfig(0xf411c240:google.h264.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: UnsupportedIndex(0x8000101a)
2019-03-24 15:30:49.475 1739-1817/? E/OMXNodeInstance: getConfig(0xf411c240:google.h264.decoder, ??(0x7f000003)) ERROR: UnsupportedSetting(0x80001019)
2019-03-24 15:30:49.554 1739-1817/? E/OMXNodeInstance: getConfig(0xf411c240:google.h264.decoder, ??(0x7f000003)) ERROR: UnsupportedSetting(0x80001019)
2019-03-24 15:30:49.558 1739-2059/? E/OMXNodeInstance: setConfig(0xf411c720:google.aac.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
2019-03-24 15:30:49.559 1739-2059/? E/OMXNodeInstance: setConfig(0xf411c720:google.aac.decoder, ConfigOperatingRate(0x6f800003)) ERROR: Undefined(0x80001001)
2019-03-24 15:30:49.559 1739-2059/? E/OMXNodeInstance: getConfig(0xf411c720:google.aac.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2) Loop doesn't work
Which formats are the best for maximize compatibility on both system?