1

I have original video (with subs) and cropped version of it (without subs). I need to add subtitles from original video into cropped in appropriate time range.

I think the best way to do is:

  1. Extract subtitles from $start to $end. I found this command ffmpeg -i Movie.mkv -map 0:s:0 subs.srt. But
  • I don't know how to specify time
  • Will data in subs.srt be correct? Since I want to add subs to cropped vesrion, time of all subs needed to be $original_time - $start.
  • It extract only one track
  1. Add subs.srt to cropped video.

1 Answer 1

0

The -ss and -to flag specifies start time and end time in format hh:mm:ss. Here goes the code

ffmpeg -i original_video.mp4 -ss <start time> -to <end time> -c:s copy cropped_sub.srt

This extract first subtitle stream in between start and end time in cropped_sub.srt. And now combining cropped files.

ffmpeg -i cropped_video.mp4 -i cropped_sub.srt -c copy cropped_combined.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.