Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top