Oh no! Some styles failed to load. 😵 Please try reloading this page
Menu â–¾ â–´

#260 2GB limit still there!

closed
5
2007-03-15
2007-03-14
No

The 1.1.3 changelog sais:

"Large file (>2GB) support everywhere"

However, flac.exe 1.1.4 (Windows command line) still doesn't cope with >2GB (raw) files. The compression simply stops too early. And when I try to specify the "--input-size" parameter, it sais: "ERROR: --input-size too large; this build of flac does not support filesizes over 2GB".

The limit is hurting me, cause I want to use FLAC for movie soundtracks. A 2 hour Dolby Digital Plus movie soundtrack decoded to raw is about 6GB long.

Thank you!

Discussion

  • Josh Coalson

    Josh Coalson - 2007-03-15

    Logged In: YES
    user_id=78173
    Originator: NO

    yes, the 'everywhere' really means 'everywhere in the source'. the windows build in the release I make is with MSVC which does not support large files.

    Josh

     
  • Josh Coalson

    Josh Coalson - 2007-03-15
    • assigned_to: nobody --> jcoalson
    • status: open --> closed
     
  • Mathias Rauen

    Mathias Rauen - 2007-03-15

    Logged In: YES
    user_id=535287
    Originator: YES

    Thanks for the quick reply!

    You can support large files with MSVC. Just call the win32 API GetFileSize or FindFirstFile+FindClose. Both ways you'll get "low" and "high" 32bit file sizes, which put together (high << 32 + low) are true 64bit. Also you could just open the file and read until the end of the file - at least with raw files. This way you wouldn't even need to know the file size (similar to how the stdin method works).

    Either way, currently I simply cannot use FLAC for my movie soundtracks. Isn't that a pity?

     
  • Mathias Rauen

    Mathias Rauen - 2007-03-15

    Logged In: YES
    user_id=535287
    Originator: YES

    P.S: Even if all else fails - can't you allow "--input-size" to work for >2GB files with the win32 flac.exe? Just continuously reading such a big file will work beautifully without any problems. Only seeking inside of such big files is a bit more difficult in win32.

     
  • Mathias Rauen

    Mathias Rauen - 2007-03-15

    Logged In: YES
    user_id=535287
    Originator: YES

    I'm sorry for spamming you with posts. But I thought I should mention that I succeeded to encode >4GB files with flac.exe 1.1.4 by using cmd.exe with stdin and stdout redirection. However, this way the final flac file has an unknown run length and no MD5 checksum in it. So it would still be quite nice if the 2GB (and 4GB) limit would be removed.

    The limit not only applies to reading source files, it also applies to writing the flac file. There flac.exe also stops at 2GB - unless I'm using stdout redirection. I'm not sure where the limit in MSVC++ is coming from. Maybe it's a limit in the run time library? Anyway, the win32 APIs (CreateFile + Read/WriteFile + CloseHandle + GetFileSize) provide full 64bit support.

     
  • Mathias Rauen

    Mathias Rauen - 2007-08-05

    Logged In: YES
    user_id=535287
    Originator: YES

    Got a fully working flac.exe without any file size limits by compiling with MSVC++ with the following changes:

    typedef long long _off_t;
    typedef long long off_t;

    #define fseeko _fseeki64
    #define ftello _ftelli64

    Hopefully you can take these changes over in your next build?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign Up No, Thank you