Is it possible to be more accurate than a second for the snipping function below? (MATLAB, ffmpeg)

Viewed 37
snip = 'ffmpeg -i %s -ss %d:%d:%d -t %d:%d:%d -async 1 -strict -2 %s';
snipstr = sprintf(snip,UncutFile,StartHRS,StartMIN,StartSEC,DurHRS,DurMIN,DurSEC,CutFile);
runsnip = system(snipstr);

These lines snip a video based on starting time inputs and duration inputs. I need my videos to be snipped to times more accurate than a second.

Thank you.

1 Answers

The documentation for time duration says:

There are two accepted syntaxes for expressing time duration.

[-][HH:]MM:SS[.m...]

HH expresses the number of hours, MM the number of minutes for a maximum of 2 digits, and SS the number of seconds for a maximum of 2 digits. The m at the end expresses decimal value for SS.

or

[-]S+[.m...][s|ms|us]

S expresses the number of seconds, with the optional decimal part m. The optional literal suffixes s, ms or us indicate to interpret the value as seconds, milliseconds or microseconds, respectively.

In both expressions, the optional - indicates negative duration.

Example: -ss 01:23:45.4 or -ss 5025.4

Related