8

I'm trying to manipulate images from image stream received from camera in flutter and then save them to a video using flutter_ffmpeg. i'm able to open a pipe but code is unresponsive after that here's the code

controller.startImageStream((CameraImage camimage) {

  //do manipulations and get pointer of the data returned from the function to a List
  List imgData = add_filters_and_text(camimage);
  imglib.Image img =  imglib.Image.fromBytes(_savedImage.height, _savedImage.width, imgData);

  _flutterFFmpegConfig.registerNewFFmpegPipe().then((pipe1) {
     print("New ffmpeg pipe at $pipe1");
     var exec0 = "-y -i " + pipe1 + " -filter:v loop=loop=25*3:size=1 -c:v mpeg4 -r 25 file2.mp4";
     _flutterFFmpeg.execute(exec0).then((rc0){
 // how to pass frame??
   });
});
Avi Sangray
  • 431
  • 3
  • 16

0 Answers0