I've encountered the same issue.
CBR: avconv output bad CBR mp3 headers when using the -ab (or -b:a) option. Outputing to pipe solve this issue:
avconv -i file.flv -b:a 128k --audio-format mp3 - > file.mp3
Note: this fix work only for CBR mp3, it breaks VBR mp3 that needs direct output to file.
VBR: If you use avconv -q:a option (with a 0 to 9 quality indicator), you'll have a VBR mp3 audio stream output:
youtube-dl http://www.youtube.com/watch?v=4f51DhJR0zo
-o "Alesso - Think It's Time.flv" -x -f 43 -q:a 4 --audio-format mp3
With this VBR mp3 output, you can use vbrfix to fix the vbrheader and have a correct duration:
command vbrfix "Rihanna - Diamonds.mp3" "Rihanna - Diamonds - vbrfixed.mp3"
The duration of "Rihanna - Diamonds - vbrfixed.mp3" file should be OK.
Source: http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=7&t=377
Please note that using -ab option with avconv output a CBR mp3 that can't be fixed with vbrfix. Avconv seems to output bad headers for CBR mp3 files.