<p>Found out that <code>ffmpeg</code> works on the text based subtitle file just as well:</p>
<pre class="lang-sh prettyprint-override"><code>$ cat subtitles.srt
1
00:00:06,000 --&gt; 00:00:20,000
This is demo subtitle 1

2
00:00:20,000 --&gt; 00:00:40,000
This is demo subtitle 2

$ ffmpeg -i subtitles.srt -ss 5 -t 60 -y cut.srt

$ cat cut.srt
1
00:00:01,000 --&gt; 00:00:15,000
This is demo subtitle 1

2
00:00:15,000 --&gt; 00:00:35,000
This is demo subtitle 2

$ ffmpeg -i subtitles.srt -ss 10 -t 60 -y cut.srt

$ cat cut.srt
1
00:00:10,000 --&gt; 00:00:30,000
This is demo subtitle 2
</code></pre>
<p>Just exactly as what I wanted.</p>

CC BY-SA 4.0
2021-09-18T00:41:57.757Z
2021-09-18T00:41:57.757Z
xpt
<p>I managed to cut the video and keep subtitle in sync by embedding the subtitles in the video:</p>
<pre><code>$ ffmpeg -i sample-mp4-file.mp4 -hide_banner \
    -vf subtitles=subtitles.srt -ss 0:30:00 -t 1:33:31 \
    OutputVideo.mp4
</code></pre>
<p>I'm wonder if it possible to cut subtitle file in accordance / sync with the cut video, instead of embedding them in the video?</p>

<ffmpeg><video><subtitles><sync>
ffmpeg to cut subtitle file in sync with the cut video
xpt
# ffmpeg to cut subtitle file in sync with the cut video

(Asked by: username_0 on 2021-09-13)

I managed to cut the video and keep subtitle in sync by embedding the subtitles in the video:
$ ffmpeg -i sample-mp4-file.mp4 -hide_banner \
    -vf subtitles=subtitles.srt -ss 0:30:00 -t 1:33:31 \
    OutputVideo.mp4

I'm wonder if it possible to cut subtitle file in accordance / sync with the cut video, instead of embedding them in the video?

**Tags:** ffmpeg, video, subtitles, sync


---

## 1 answers

### Answer by username_0 on 2021-09-18. Score: 5 | Accepted answer

Found out that ffmpeg works on the text based subtitle file just as well:
$ cat subtitles.srt
1
00:00:06,000 --> 00:00:20,000
This is demo subtitle 1

2
00:00:20,000 --> 00:00:40,000
This is demo subtitle 2

$ ffmpeg -i subtitles.srt -ss 5 -t 60 -y cut.srt

$ cat cut.srt
1
00:00:01,000 --> 00:00:15,000
This is demo subtitle 1

2
00:00:15,000 --> 00:00:35,000
This is demo subtitle 2

$ ffmpeg -i subtitles.srt -ss 10 -t 60 -y cut.srt

$ cat cut.srt
1
00:00:10,000 --> 00:00:30,000
This is demo subtitle 2

Just exactly as what I wanted.


---

