flutter_ffplay icon indicating copy to clipboard operation
flutter_ffplay copied to clipboard

How to play live stream video from the internet?

Open ingvilow opened this issue 3 years ago • 0 comments

I have web camera and it is streaming video, but stream can be played only by ffmpeg (because stream in mjpeg format), so how can I play stream on my device? I found something like that but it dosen't work, could you help me, please?

 void initState() {
    FFmpegKitConfig.registerNewFFmpegPipe().then((pipePath) {
      var values = 'ffmpeg -i webcam.mkv -vcodec mjpeg -an $url';
      print("=> pipePath: " + pipePath.toString());
      FFmpegKit.executeAsync(values, (Session session) async {}, (Log log) {
        print(log.getMessage());
      }, (Statistics statistics) {
        (statistics) async {
          Mjpeg(
            stream: values,
          );
        };
      });
    });
    super.initState();
  } 

ingvilow avatar Aug 24 '22 08:08 ingvilow