Commit 211be5e
committed
obs-ffmpeg: Fix Opus encoder bitrate and errors
The Opus encoder was using the AAC encoder's properties function which
allows bitrates up to 1024 kbps. However, FFmpeg's libopus enforces a
maximum of 256 kbps per channel. Users selecting bitrates above 256
kbps would encounter confusing "Failed to open AAC codec" errors.
This commit adds a dedicated opus_properties() function that sets the
correct bitrate range (64-256 kbps). The 256 kbps limit is more than
sufficient for Opus, as typical WebRTC usage is only 30-90 kbps.
Additionally, fixes hardcoded "AAC codec" error messages in
initialize_codec() to display the actual codec name, improving error
reporting for all FFmpeg audio encoders.
Fixes #127531 parent c025f21 commit 211be5e
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
425 | 437 | | |
426 | 438 | | |
427 | 439 | | |
| |||
481 | 493 | | |
482 | 494 | | |
483 | 495 | | |
484 | | - | |
| 496 | + | |
485 | 497 | | |
486 | 498 | | |
487 | 499 | | |
| |||
0 commit comments