I'm using FFmpeg to work with videos which have a negative start time:
$ ffmpeg -i test.mp4 -ss 0 out.mp4
...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2018-01-03 11:35:13
Duration: 00:00:06.16, start: -1.238906, bitrate: 1425 kb/s
...
Output #0, mp4, to 'out.mp4':
...
frame= 222 fps=0.0 q=-1.0 Lsize= 166kB time=00:00:07.44 bitrate= 182.9kbits/s
Is there any way to cut the video at time 0? i.e. the output should have duration 6.16 and not 7.74. I've tried setting -avoid_negative_ts to all the different values. Obviously, I could manually read the negative value and run it again with the correct offset using -ss, but I'm looking for an automatic solution.