[Bug]: Error concatenating an audiobook with a bitrate higher than 192k #2801

Closed
opened 2026-04-25 00:10:46 +02:00 by adam · 2 comments
Owner

Originally created by @marius-luca-87 on GitHub (May 25, 2025).

What happened?

I tried to concatenate an audiobook with a higher bitrate from GraphicAudio (256k) and the process failed.

The code at
EncoderOptionsCard.vue#L166
resolves "selectedBitrate" to "undefinedk" when the value is above 192 leading to a incorrect ffmpeg command.

What did you expect to happen?

AudioBook to get concatenated.

Steps to reproduce the issue

  1. Try to concatenate two files with bitrates higher than 192.

Audiobookshelf version

v2.23.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Firefox

Logs

ffmpeg stderr: ffmpeg version 6.1.2 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 14.2.0 (Alpine 14.2.0) configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100 Input #0, concat, from '/metadata/cache/items/1e30f3a0-01dc-4207-9745-bac0514fc20f/files.txt': Duration: 07:32:20.41, start: -0.025056, bitrate: N/A Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s Metadata: encoder : LAME3.99r Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 458x458 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn Metadata: title : BOOK comment : Cover (front) Stream mapping: Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (native)) Press [q] to stop, [?] for help [aac @ 0x7f7bc6b74700] [Eval @ 0x7ffeb9d71690] Undefined constant or missing '(' in 'undefinedk' [aac @ 0x7f7bc6b74700] Unable to parse option value "undefinedk" [aac @ 0x7f7bc6b74700] Error setting option b to value undefinedk. [aost#0:0/aac @ 0x7f7bcc606740] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. Error while filtering: Invalid argument [out#0/mp4 @ 0x7f7bc814a3c0] Nothing was written into output file, because at least one of its streams received no packets. size= 0kB time=N/A bitrate=N/A speed=N/A Conversion failed!

Additional Notes

No response

Originally created by @marius-luca-87 on GitHub (May 25, 2025). ### What happened? I tried to concatenate an audiobook with a higher bitrate from GraphicAudio (256k) and the process failed. The code at [EncoderOptionsCard.vue#L166](https://github.com/advplyr/audiobookshelf/blob/d03c338b489f2c10f977da34651d8f28321b0f50/client/components/widgets/EncoderOptionsCard.vue#L166) resolves "selectedBitrate" to "undefinedk" when the value is above 192 leading to a incorrect ffmpeg command. ### What did you expect to happen? AudioBook to get concatenated. ### Steps to reproduce the issue 1. Try to concatenate two files with bitrates higher than 192. ### Audiobookshelf version v2.23.0 ### How are you running audiobookshelf? Docker ### What OS is your Audiobookshelf server hosted from? Linux ### If the issue is being seen in the UI, what browsers are you seeing the problem on? Firefox ### Logs ```shell ffmpeg stderr: ffmpeg version 6.1.2 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 14.2.0 (Alpine 14.2.0) configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100 Input #0, concat, from '/metadata/cache/items/1e30f3a0-01dc-4207-9745-bac0514fc20f/files.txt': Duration: 07:32:20.41, start: -0.025056, bitrate: N/A Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s Metadata: encoder : LAME3.99r Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 458x458 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn Metadata: title : BOOK comment : Cover (front) Stream mapping: Stream #0:0 -> #0:0 (mp3 (mp3float) -> aac (native)) Press [q] to stop, [?] for help [aac @ 0x7f7bc6b74700] [Eval @ 0x7ffeb9d71690] Undefined constant or missing '(' in 'undefinedk' [aac @ 0x7f7bc6b74700] Unable to parse option value "undefinedk" [aac @ 0x7f7bc6b74700] Error setting option b to value undefinedk. [aost#0:0/aac @ 0x7f7bcc606740] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. Error while filtering: Invalid argument [out#0/mp4 @ 0x7f7bc814a3c0] Nothing was written into output file, because at least one of its streams received no packets. size= 0kB time=N/A bitrate=N/A speed=N/A Conversion failed! ``` ### Additional Notes _No response_
adam added the bug label 2026-04-25 00:10:46 +02:00
adam closed this issue 2026-04-25 00:10:46 +02:00
Author
Owner

@marius-luca-87 commented on GitHub (May 29, 2025):

Wound it make sense to allow the encode to support higher bitrates like 256k or 320k? Some "radio theater" books seem to use them and it might be helpful considering they store sound effects/background music and not just the human voice.

@marius-luca-87 commented on GitHub (May 29, 2025): Wound it make sense to allow the encode to support higher bitrates like 256k or 320k? Some "radio theater" books seem to use them and it might be helpful considering they store sound effects/background music and not just the human voice.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 1, 2025):

Fixed in v2.24.0.

@github-actions[bot] commented on GitHub (Jun 1, 2025): Fixed in [v2.24.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.24.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2801