I am editing a video with ffmpeg
where I have to keep in view the timestamp further deep from seconds to milliseconds. I know such command : ffmpeg -i a.ogg -ss 00:01:02 -to 00:01:03 -c copy x2.ogg
. This uses seconds, but I want down to milliseconds.
Asked
Active
Viewed 4.4k times
61

Salvatore
- 10,815
- 4
- 31
- 69

Harjit Singh
- 905
- 1
- 8
- 17
3 Answers
129
you can try:
ffmpeg -i a.ogg -ss 00:01:02.500 -t 00:01:03.250 -c copy x2.ogg
Timestamps need to be in HH:MM:SS.xxx format for advanced precision (where xxx are milliseconds).
Let me know if it works.

Arnaud Leyder
- 6,674
- 5
- 31
- 43
-
1Good to know. Remember to accept an answer when your problem is solved so that people on Stackoverflow can continue to provide good answers to good questions. Welcome! – Arnaud Leyder Apr 19 '14 at 17:12
-
Thanks for your time and effort! – Ahmed Mahmoud Jun 15 '18 at 07:24
-
this is weird. i'm requesting 13 frames of video but it's only saying it copied 3! – Michael Apr 03 '20 at 21:12
14
Time duration can be present two format. (FFmpeg 4.3 or newer)
Format 1 :
[-][HH:]MM:SS[.m...]
or
Format 2 :
[-]S+[.m...][s|ms|us]
Format 1 samples
01:20:10 1 hour 20 minute 10 seconds
04:03 4 minutes 3 seconds
07:02:05.100 7 hours 2 minutes 5 seconds 100 miliseconds
Format 2 samples
120 120 seconds
120.2 120.2 seconds or 120 seconds 200 miliseconds
1200ms 1200 milliseconds
1300us 1300 microseconds
I never rely on decimals. If possible, use always format2 (-ss '120534ms').
ffmpeg -i a.ogg -ss '100ms' -t '600ms' -c copy x2.ogg

Muhammet Öztürk
- 181
- 3
- 6
0
It should be:
ffmpeg -i a.ogg -ss 100ms -t 600ms -c copy x2.ogg
not
ffmpeg -i a.ogg -ss '100ms' -t '600ms' -c copy x2.ogg

Jeremy Caney
- 7,102
- 69
- 48
- 77

Henri
- 1
- 2