[FFmpeg-user] trimmed audio has wrong duration

Ted Park kumowoon1025 at gmail.com
Sun Oct 6 05:26:52 EEST 2019


> _ffprobe.exe -v 0 -sexagesimal -show_entries format^=duration -of
> compact^=p^=0^:nk^=1 _audio.flac
> 1:31:29.848938
> 
> 
> 5489.848938 - 1.001 = 5488.847938
> 
> 

What is the point of doing this calculation?

> I'm trying to trim 1.001 seconds from the beginning of a FLAC file.
> But the output has the wrong duration (same as the input) and so it's
> corrupt.

It’s probably because flac is mostly a stream format, and you’re doing a stream copy. Re-encoding should fix all of this, it’s relatively inexpensive, and it’s lossless after all, but if you really don’t want this, maybe try putting it in an ogg.


More information about the ffmpeg-user mailing list