[FFmpeg-user] trimmed audio has wrong duration

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Oct 7 00:55:44 EEST 2019


Am Sa., 5. Okt. 2019 um 16:27 Uhr schrieb Felix Muster via ffmpeg-user
<ffmpeg-user at ffmpeg.org>:
>
> I cut the first ten seconds as a sample: _ffmpeg.exe -i _audio.flac -t 10 -codec copy _audio_2.flac
> https://gofile.io/?c=pnLfN2
>
> ffprobe still tells me a length of 1:31:29.848938
>
> _ffmpeg -i _audio_2.flac -f null
> ffmpeg version N-95216-ge6625ca41f Copyright (c) 2000-2019 the FFmpeg developers
>   built with gcc 9.2.1 (GCC) 20190918
>   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
>   libavutil      56. 35.100 / 56. 35.100
>   libavcodec     58. 59.101 / 58. 59.101
>   libavformat    58. 33.100 / 58. 33.100
>   libavdevice    58.  9.100 / 58.  9.100
>   libavfilter     7. 61.100 /  7. 61.100
>   libswscale      5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> Input #0, flac, from '_audio_2.flac':
>   Metadata:
>     TITLE           : MILLENIUM_D1_VERBLENDUNG.Title0
>     encoder         : Lavf58.33.100
>   Duration: 01:31:29.85, start: 0.000000, bitrate: 1 kb/s
>     Stream #0:0: Audio: flac, 48000 Hz, 5.1(side), s16
> Stream mapping:
>   Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))
> Press [q] to stop, [?] for help
> Output #0, null, to 'pipe:':
>   Metadata:
>     TITLE           : MILLENIUM_D1_VERBLENDUNG.Title0
>     encoder         : Lavf58.33.100
>     Stream #0:0: Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s
>     Metadata:
>       encoder         : Lavc58.59.101 pcm_s16le
> size=N/A time=00:00:10.08 bitrate=N/A speed= 530x
> video:0kB audio:5670kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
>
> This gives me the correct length: 00:00:10.08
>
> I think there is wrong metadata stored in the file?

This is ticket #4905, this this may not be easy to fix.

Carl Eugen


More information about the ffmpeg-user mailing list