Search code examples
androidffmpegvideo-processingtrim

How to limit Seek Bar on the basis of video size?


I need to know how to limit a SeekBar with a particular video size,rather than limiting using time say like whats app 17 MB , i have done an example by taking time but i need to consider size.

I was using This example


Solution

  • A command in FF-MPEG, -fs , allows to specify the file size and in return the specified size of file will be trimmed from video file

     String[] cm = {"-i", path, "-fs", "17M", "-c", "copy", videopath.getPath()};
    

    After trimming check for duration of the trimmed video with maximum duration set for the seek bar.