I'm developing an app with flutter by Android, and I need a player for UDP multicast signal (udp://@239.255.0.61:1234)
I'm using flutter_vlc_player: ^7.4.2
The UDP test channel signal has:
VIDEO: codec h264-mpeg-4 avc
AUDIO 1: codec a/52 b audio (aka e-ac3)
language: spanish
channels: 2
sample rate: 48000 Hz
AUDIO 2: codec a/52 b audio (aka e-ac3)
language: original audio
channels: 0
sample rate: 0 Hz
I have the following code but it does not make the signal image lag, the audio is heard fine. Why lag?
Could someone recommend me a correct configuration or where the problem could be?
Note: I have VLC app (from play store Android) installed on my android device works correctly with this UDP channel, but my application have lag
late VlcPlayerController _videoPlayerController;
_videoPlayerController = VlcPlayerController.network(
'udp://@239.255.0.61:1234',
hwAcc: HwAcc.auto,
autoPlay: true,
options: VlcPlayerOptions(
advanced: VlcAdvancedOptions([
VlcAdvancedOptions.networkCaching(20000), // Mayor tiempo de caché de red
VlcAdvancedOptions.liveCaching(20000), // Mayor tiempo de caché en vivo
]),
extras: [
'--avcodec-skiploopfilter', // Saltar filtro de bucle para decodificación H.264
'--network-caching=20000', // Mayor tiempo de caché de red
'--clock-jitter=2000',
'--clock-synchro=0',
'--drop-late-frames', // Descartar cuadros tardíos
'--skip-frames' // Saltar cuadros para mantener la sincronización
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: VlcPlayer(
controller: _videoPlayerController,
aspectRatio: 16 / 9,
placeholder: Center(child: CircularProgressIndicator()),
),
),
);
}
Thanks.