I am converting a FLAC file to AAC. I have noticed that the duration is off on the output file. This is even the case if you explicitly set the output duration, it just gets ignored
$ ffmpeg -i foo.flac -t 00:02:52.48 -c:a aac -strict -2 bar.aac [flac @ 000000000035d960] max_analyze_duration 5000000 reached at 5015510 microseconds Input #0, flac, from 'foo.flac': Duration: 00:02:52.48, bitrate: 446 kb/s Stream #0:0: Audio: flac, 44100 Hz, stereo, s16 Output #0, adts, to 'bar.aac': Stream #0:0: Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (flac -> aac) Press [q] to stop, [?] for help size= 2770kB time=00:02:52.50 bitrate= 131.5kbits/s video:0kB audio:2719kB subtitle:0 global headers:0kB muxing overhead 1.867920%
$ ffmpeg -i foo.flac -i bar.aac Input #0, flac, from 'foo.flac': Duration: 00:02:52.48, bitrate: 446 kb/s Input #1, aac, from 'bar.aac': Duration: 00:02:49.29, bitrate: 134 kb/s
Can I change my command so that the input and output duration match?