[Libav-user] Encoding FLAC - no duration

GOO Creations goocreations at gmail.com
Thu Jun 28 14:18:22 CEST 2012


I'm using the AVCodec API as a basis for encoding audio. I managed to 
successfully create a WAV file. When I encode a FLAC file the encoding 
succeeds, but when I open the file, the sound plays, but no media player 
can detect the length of the FLAC file. When I use the ffmpeg command 
line tool, I get the following info on the file:

    /[flac @ 0x94e8380] max_analyze_duration 5000000 reached at 5015510/
    /[flac @ 0x94e8380] Estimating duration from bitrate, this may be
    /Input #0, flac, from '00001.flac':/
    /  Metadata:/
    /    ENCODER         : Lavf54.3.100/
    /  Duration: N/A, bitrate: N/A/
    /    Stream #0:0: Audio: flac, 44100 Hz, stereo, s16/

So here it also seems that the duration cannot be retrieved.

I'm writing all headers and trailers ( 
/avformat_write_header(formatContext, NULL)/    and 
/av_write_trailer(formatContext)/ ).
Does anyone know what I might be missing?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120628/af6f3b90/attachment.html>

More information about the Libav-user mailing list