Repository navigation
fix: convert .m4a and .aac input through ffmpeg - #78
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
convert_to_wavno longer opens its input with libsndfile before ffmpeg runs. It still reads the duration (for the ffmpeg timeout) from libsndfile when it can, and fromffprobewhen it can't. That helper is now public asinput_duration, andprocess_fileuses it for the timing report's input probe too.AGENTS.mdnotes thatffprobeis needed next toffmpeg.Why
.m4aand.aacare inSUPPORTED_FORMATSand the batch accepts them, but libsndfile 1.2.2 has no AAC or MP4 decoder. The input probe raised insideconvert_to_wav'stry, so every such file failed as "Failed to convert" before ffmpeg, which decodes them fine, was ever called.The same libsndfile read in
process_file's input probe setinput_audio_secondstoNonefor these files with no warning. Those tracks had no speed figure in the batch table, and<session>-metrics.jsonleft their audio out of the session total.Closes #73
How you checked it
New
test_formats_libsndfile_cannot_read_convert_through_ffmpeg(.m4aand.aac, encoded by real ffmpeg): passes with the fix, both cases fail ondfdd18bwith theAudioValidationErrorfrom the issue.New
test_input_seconds_recorded_for_formats_libsndfile_cannot_read(.m4aand.aac, throughprocess_file): passes with the fix, both cases fail with the previouspipeline.py.make lint,make typecheck: pass.make test-fast: 300 passed.Slow (inference) tests not run: they feed WAV input, whose path through
convert_to_wavis unchanged.Confirmed locally that the installed libsndfile 1.2.2 lists no AAC or MP4 format.
CI fails at
setup-pythonbefore any check runs:.python-versionpins 3.14.3, which has no build for the Ubuntu 26.04 runner. It fails the same way on other branches; fix: pin Python at the minor, so new Ubuntu images work #72 fixes it.A bug fix comes with a test that fails without it
Docs match how it works now
No secrets or private information