Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG: flac audio file duration in metadata is 0

I have a flac audio file with incorrect duration in the metadata. The audio has a length of 55 minutes but the metadata has a duration of 0. Is it possible to use an ffmpeg command to fix this?

Below are the outputs of an ffprobe:

  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
like image 361
Chognificent Avatar asked Nov 05 '25 02:11

Chognificent


1 Answers

The FLAC header is missing or incomplete. Re-encoding will re-write it:

ffmpeg -i input.flac -c:v copy -c:a flac output.flac

There will be no quality loss as FLAC is lossless.

like image 180
llogan Avatar answered Nov 07 '25 16:11

llogan