0

I´m using ffmpeg to convert images to a video. I don´t know how to get all images in given directory.

Future<int> execute(String command) async {
      return await _flutterFFmpeg.execute(command);
    }

    void _onCreateVideoFromImages() {
      execute("ffmpeg -r 1/5 -start_number 2 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4")
          .then((rc) {
        if (rc == 0) {
          print("Video completed");
        } else {
          print(rc);
        }
      });
    }

My images a saved in the AppDirectory. How could I add this path to the ffmpeg execute?

easeccy
  • 4,248
  • 1
  • 21
  • 37
cssler
  • 73
  • 9
  • Dart File API is easy to use. Have a look at this [similar question](https://stackoverflow.com/questions/14268967/how-do-i-list-the-contents-of-a-directory-with-dart). – easeccy Jul 30 '20 at 13:45
  • Yes, but this not helps me regarding the way to create a video with `ffmpeg` .. – cssler Jul 30 '20 at 15:29
  • Well get the AppDirectory path then get all the files inside. – easeccy Jul 31 '20 at 15:17

0 Answers0