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

can play rtsp/rtmp? #36

Closed xiaodusx1 closed 1 year ago

xiaodusx1 commented 1 year ago

if can use FFmpeg to play rtsp/rtmp or user FFmpeg cli.can give a simple example?

wang-bin commented 1 year ago

Yes you can, VideoPlayerController.network('rtsp://......');.

Default settings for rtsp is not low latency, i'm considering adding more settings. Currently you can enable low latency via

registerWith(options: {
  'player': {
      'avformat.analyzeduration': '10000',
      'avformat.probesize': '1000',
      'avformat.fpsprobesize': '0',
      'avformat.fflags': '+nobuffer',
      'avformat.avioflags': 'direct',
    }
  });
xiaodusx1 commented 1 year ago

ok,It work,i just see:'VideoPlayerController.network' is deprecated and shouldn't be used. Use VideoPlayerController.networkUrl instead.and i Uri.parse("http://XX") it work,but Uri("rtsp://XX") ,use networkUrl I does't work.

wang-bin commented 1 year ago

Uri("rtsp://XX") is wrong, try Uri.parse("rtsp://XX")

wang-bin commented 1 year ago

sorry, rtsp and rtmp were disabled. the latest code should work.

xiaodusx1 commented 1 year ago

sorry, rtsp and rtmp were disabled. the latest code should work.

thank you for reply