Menu

#234 Unable to (re)encode certain files with FLAC 1.1.3beta2

closed-fixed
9
2006-11-27
2006-11-23
No

I've ran into two FLAC files out of several thousands that FLAC 1.1.3beta2 is unable to (re)encode. FLAC remains at 1% forever consuming CPU like it was encoding, but there's no progress.

Decoding and testing the file succeeded, but when reencoding/encoding the file it remains at 1% forever. I had to kill it after 24h.

This happened under cygwin running on WinXP on an Intel 2.8gHz with 1GB RAM. I compiled 1.1.3beta2 from source configured and installed like this: ./configure && make && make install.

The other FLAC file that caused this problem was only 8kb and had no audio (at least it wouldn't play), but I deleted it before I thought of submitting a bug report.

Except for this this, flac 1.1.3beta2 works perfectly. :-)

$ flac --best -V -f k*.flac

flac 1.1.3-beta2, Copyright (C) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson

flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

options: -P 8192 -b 4608 -m -l 12 -e -q 0 -r 0,6 -V
kcrw01.flac: 1% complete, ratio=0.207

Note: I tried to upload the file, but I keep getting internal server error from sourceforge.

http://home.rustradio.org/~thomas/AAAkcrw01.flac
(just remove AAA from the address)

Discussion

  • Anonymous

    Anonymous - 2006-11-23
    • labels: --> flac (command-line)
     
  • Anonymous

    Anonymous - 2006-11-23

    Logged In: YES
    user_id=596080
    Originator: YES

    I also tested reencoding it on a Debian system with same results.

    Linux 2.6.8-2-686 #1 Tue Aug 16 13:22:48 UTC 2005 i686 GNU/Linux
    Intel(R) Celeron(R) CPU 2.00GHz
    512MB RAM
    $ cat /etc/debian_version
    testing/unstable
    $ cat /proc/version
    Linux version 2.6.8-2-686 (horms@tabatha.lab.ultramonkey.org) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #1 Tue Aug 16 13:22:48 UTC 2005

    FLAC 1.1.3beta2 was compiled with
    gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)
    on this machine.

     
  • Anonymous

    Anonymous - 2006-11-27

    Logged In: YES
    user_id=596080
    Originator: YES

    Here's some additional info from metaflac (1.1.3beta2):

    $ metaflac.exe --list kcrw01.flac
    METADATA block #0
    type: 0 (STREAMINFO)
    is last: false
    length: 34
    minimum blocksize: 4608 samples
    maximum blocksize: 4608 samples
    minimum framesize: 14 bytes
    maximum framesize: 14992 bytes
    sample_rate: 44100 Hz
    channels: 2
    bits-per-sample: 16
    total samples: 11680620
    MD5 signature: 7d3edcba239d5a6245430fb5dc379355
    METADATA block #1
    type: 3 (SEEKTABLE)
    is last: false
    length: 468
    seek points: 26
    point 0: sample_number=0, stream_offset=0, frame_samples=4608
    point 1: sample_number=446976, stream_offset=395933, frame_samples=4608
    point 2: sample_number=893952, stream_offset=940311, frame_samples=4608
    point 3: sample_number=1345536, stream_offset=1548191, frame_samples=4608
    point 4: sample_number=1792512, stream_offset=2222098, frame_samples=4608
    point 5: sample_number=2244096, stream_offset=2939065, frame_samples=4608
    point 6: sample_number=2691072, stream_offset=3848937, frame_samples=4608
    point 7: sample_number=3142656, stream_offset=4772833, frame_samples=4608
    point 8: sample_number=3589632, stream_offset=5677888, frame_samples=4608
    point 9: sample_number=4041216, stream_offset=6722088, frame_samples=4608
    point 10: sample_number=4488192, stream_offset=7848381, frame_samples=4608
    point 11: sample_number=4939776, stream_offset=8738934, frame_samples=4608
    point 12: sample_number=5386752, stream_offset=9483076, frame_samples=4608
    point 13: sample_number=5838336, stream_offset=10437238, frame_samples=4608
    point 14: sample_number=6285312, stream_offset=11364659, frame_samples=4608
    point 15: sample_number=6736896, stream_offset=12301911, frame_samples=4608
    point 16: sample_number=7183872, stream_offset=13437547, frame_samples=4608
    point 17: sample_number=7635456, stream_offset=14603829, frame_samples=4608
    point 18: sample_number=8082432, stream_offset=15755924, frame_samples=4608
    point 19: sample_number=8534016, stream_offset=16925967, frame_samples=4608
    point 20: sample_number=8980992, stream_offset=18100089, frame_samples=4608
    point 21: sample_number=9432576, stream_offset=19291196, frame_samples=4608
    point 22: sample_number=9879552, stream_offset=20113282, frame_samples=4608
    point 23: sample_number=10331136, stream_offset=20950945, frame_samples=4608
    point 24: sample_number=10778112, stream_offset=21800687, frame_samples=4608
    point 25: sample_number=11229696, stream_offset=22483801, frame_samples=4608

    METADATA block #2
    type: 4 (VORBIS_COMMENT)
    is last: false
    length: 40
    vendor string: reference libFLAC 1.1.0 20030126
    comments: 0
    METADATA block #3
    type: 1 (PADDING)
    is last: true
    length: 4096

     
  • Josh Coalson

    Josh Coalson - 2006-11-27

    Logged In: YES
    user_id=78173
    Originator: NO

    ok, I can reproduce this... looks like it might be a problem in the window calculation (e.g. it works if you add -A rectangle or -A hamming). good thing you found this, the release was going to be tomorrow :)

     
  • Josh Coalson

    Josh Coalson - 2006-11-27
    • priority: 5 --> 9
    • assigned_to: nobody --> jcoalson
    • status: open --> open-accepted
     
  • Josh Coalson

    Josh Coalson - 2006-11-27

    Logged In: YES
    user_id=78173
    Originator: NO

    found the problem, it is caused by a very rare occurrence in FLAC__lpc_compute_lp_coefficients() where the error can hit exactly 0, causing problems later. I checked in a fix for this.

     
  • Josh Coalson

    Josh Coalson - 2006-11-27
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.