From: Noufal Ibrahim <noufal@ni...> - 2012-05-22 09:10:22
I'm processing some .flac files and converting them into mp3s. I
have a pipeline that uses ffmpeg to convert the flac files to wav files
and then pipe that through the lame executable to create mp3s
The entire pipeline looks something like this
ffmpeg -v 0 -y -vn -i sample.flac -ac 2 -ar 44100 -f wav - | /usr/bin/lame --disptime 10 --preset standard --ta 'Artist name' --tt 'Song title' --tn '01' --tl 'Album name' --tg 'Rock' --add-id3v2 --tc 'Comment' - sample.mp3
The quality of the produced mp3 is good but when I open it in audacity and open the metadata editor, it reports the length as '0'. Trying to extract the metadata reports something similar. It says that the 'TLEN' field is 0.
I tried to forcibly set it by passing
to lame but it didn't work. One way that I've verified is to have ffmpeg output the wav onto disk and then give that to lame as input but this creates a temporary file and it is something which I can't do right now in my setup. I do know the length of track in seconds so if there's some reliable way I can give this to the encoder, it would be sufficient.
How do I do this?
 LAME 64bits version 3.99.5 (http://lame.sf.net)
Get latest updates about Open Source Projects, Conferences and News.