Flutter/Dart: Find two video segments and merge them into a single valid video file?

前端 未结 1 322
有刺的猬
有刺的猬 2021-01-25 17:43

I have two video files on my iPhone. Is it possible, using Dart, to find two specific 10-second segments in each, and merge them both into a valid 20 second video file?

相关标签:
1条回答
  • 2021-01-25 18:42

    Ok, so there's a FFMpeg plugin for flutter that allows you to do all of this.

    https://github.com/tanersener/flutter-ffmpeg

    Cutting a 15 second video segment starting at second 20:

    ffmpeg -i Funny.mkv -ss 00:00:20 -codec copy -t 15  Funny_cut.mkv
    

    Merging a list of videos that is stored in videos.txt:

    ffmpeg -f concat -i videos.txt -c copy Funny_join.mkv
    

    For more about FFMpeg:

    https://www.poftut.com/ffmpeg-command-tutorial-examples-video-audio/

    0 讨论(0)
提交回复
热议问题