Skip to content

Fix MKV crash and read the source audio bitrate from the first track - #130

Merged
zfleeman merged 1 commit into
mainfrom
zf/fix-source-audio-bitrate
Oct 22, 2026
Merged

zfleeman merged 1 commit into
mainfrom
zf/fix-source-audio-bitrate

Conversation

@zfleeman

Copy link
Copy Markdown
Owner

Fixes #127 and #128. Both bugs were in the same few lines that read the input's audio bitrate.

The default bitrate only applies when no audio bitrate is set, for example a blank Audio Bitrate field in the web UI.

Testing

  • Added a test for each bug. Both fail without the fix.
  • uv run pytest --cov: 292 passed, 99.39% coverage. ruff format and ruff check are clean.
  • Real encode of a 2-second MKV with two audio tracks: it used to crash on startup. It now encodes with -b:a 96000.

@zfleeman
zfleeman merged commit 1538b15 into main Oct 22, 2026
6 checks passed
@zfleeman
zfleeman deleted the zf/fix-source-audio-bitrate branch October 22, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MKV input crashes with KeyError: 'bit_rate'

1 participant