2

I am implementing FFmpeg to my android project.

I used ffmpeg-android-java to perform editing in audio and video files.

Now I am trying to trim my audio file using FFmpeg and FFmpeg ignores my start time for trimming.

I referred many posts like:

Trim video with reference to a start time and end time using FFMPEG

https://www.oodlestechnologies.com/blogs/FFMPEG-for-android/

But still, I am facing the same issue.

Below is my ffmpeg command:

   String[] complexCommand = {"-y", "-ss", "00:00:20", "-i", uploadFilePath , "-t", "30", editFilePath};

I also tried with

   String[] complexCommand = {"-y", "-ss", "00:00:20", "-i", uploadFilePath, "-t", "30", editFilePath};

and

    String[] complexCommand = {"-y", "-ss", "00:00:20", "-i", uploadFilePath, "-t", "30", editFilePath};

But FFmpeg trims my audio file from start time 00:00:00 to 00:00:30 always. It ignores my start time or -ss time

If any more file or info needed, plz mention in comments.

Bablu Gaur
  • 27
  • 7

1 Answers1

0

I know I am posting my own question, but it might help others in future.

In my question, I am passing initial time at beginning of command line so ffmpeg didnt recognize it.

Below is corking commands:

  String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "00:00:20" , "-t", "30", editFilePath}

  String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "20" , "-t", "30", editFilePath};
Bablu Gaur
  • 27
  • 7