I am attempting to create a variable rate mp3 from a flac using the following command:
avconv -i t.flac -id3v2_version 3 -vn -acodec libmp3lame -aq 0 t.mp3
avconv and mediainfo both list the duration of the final mp3 correctly as 2m40s, but every mp3 player (clementine, juk and amarok) I've tried says that the song is 21m15s long. Using clementine and amarok to view details about the file turns up that they think the bitrate is 32kbps while avconv and mediainfo (correctly) list the overall bitrate as 255kbps. (255/32)*2.66 = 21.20, so I'm sure that it's the perceived bitrate that's the problem, but I don't know what to do to fix it.
Just for fun, I also tried creating a constant bitrate file with the following command:
avconv -i t.flac -id3v2_version 3 -vn -acodec libmp3lame -ab 320k u.mp3
This has the same problem. Oddly enough, even though the bitrate is specified, mediainfo still reports that the bitrate is variable and mp3 players have the same general problems with the duration.
How can I fix this?