I have a file
Other - Analogue Clock-JEJqy1Wlovw.mp4 which is just a download from https://www.youtube.com/watch?v=JEJqy1Wlovw
It's 2 minutes 13 seconds long.
I had some issues cutting it to the second.
I was able to use this command
ffmpeg -ss 0 -i infile.mp4 -c copy -t 60 output.mp4
to make a file that was 60 seconds, so no problem so far.
That's the file exactly 1 minute, no issue there so far.
C:\vids\a>dir
blahhclo.mp4 9,590,540 bytes
C:\vids\a>
C:\vids\a>mediainfo blahhclo.mp4
General
Complete name : blahhclo.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 9.15 MiB
Duration : 1mn 0s
Overall bit rate : 1 278 Kbps
Writing application : Lavf58.3.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1mn 0s
Bit rate : 1 146 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.022
Stream size : 8.21 MiB (90%)
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 126 Kbps
Channel count : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : 40ms
Stream size : 920 KiB (10%)
C:\vids\a>
But I do have an issue when I try to cut it at the following times, and it's whether I try to cut the 1 minute one or the whole 2 min 13sec one.
If I cut with -ss 0 -t 1, it produces a file that is 1s 22ms.
So that's not too bad that's fairly close to one second. 1.022 seconds is quite good for an attempt to cut one second.
If I cut with -ss 0 -t 2, it produces a file that is 3s 19ms That is terrible! it's meant to be one second!
If I cut with -ss 0 -t 30 then it is fine it does 30s 1ms.
Or this video for example, also an mp4 https://www.youtube.com/watch?v=pJ3-xf26wDE
C:\blah>ffmpeg -ss 189 -i vid.mp4 -c copy -t 6 someoutput.mp4
C:\blah>mediainfo someoutput.mp4
produces a duration of 8s 383ms
That is so wrong though 'cos it should be 6 seconds! So that is two seconds too long!
C:\blah>ffmpeg -ss 191 -i vid.mp4 -c copy -t 6 someoutput2.mp4
C:\blah>mediainfo output2.mp4
shows that ffmpeg produced a duration of 10s 403ms
which is crazily wrong 'cos the ffmpeg command specified 6 seconds!
So that's not just one second out, that is 4 seconds out!
That's almost 50% longer than it should be!