-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opusenc from git fails to encode very short flac files on windows #78
Comments
I'm finished bisecting, and here it is:
src/audio-in.c | 10 ++++------ Which makes sence because the commit has to do with flac files. |
I encountered the same error. See in Chocobo1/opus-tools_win32-build#13, where I attached an example FLAC file of 14.2 KB.
ping @tdaede |
I briefly looked into it. Here is my findings: Line 396 in 98f3ddc
Here the FLAC__stream_decoder_process_until_end_of_metadata failed and FLAC__stream_decoder_get_state == FLAC__STREAM_DECODER_END_OF_STREAM .Of all the callbacks, only the eof_callback is called once and it returns true and the entire flac procedure just stopped.This is due to 5d0ac20, it reads a lot of data (64K) which easily read all data of a small file and the FILE position goes to eof. I guess it has something to do with flac internal implementation which couldn't handle this specific eof case properly. A dirty workaround is to just disable the eof_callback:
A little more proper workaround is to add Line 380 in 98f3ddc
I'll take a shot at it in PR #95. |
The file handle might be at EOF if the input .opus file is small. So reset the file position properly before any further handling. Fixes xiph#78.
The file handle might be at EOF if the input .opus file is small. So reset the file position properly before any further handling. Fixes xiph#78.
I see this error regularly for files which are entirely silence, for which the flac file is extremely small. |
Hi.
I made an issue about this in the opus repo but it's related to opus-tools instead.
When I try to encode a short flac file with opusenc it says:
ERROR: Could not open FLAC stream.
Error: unsupported input file: synth1.flac
I compiled opus-tools 0.2 with dynamic libflac and that worked, but not the version from git, neither dynamic or static. (Haven't tried 0.2 static yet).
I can try to bisect it, but as I get no audio by inverting a file with the git version and 0.2 it's really low priority.
But if you know of a git change after 0.2 that has to do with flac input that might be it.
Thanks,
Marc
The text was updated successfully, but these errors were encountered: