# "400: Bad Request" response when requesting some audio files

**URL:** <https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407>\
**Category:** Dev/API Corner\
**Tags:** server-linux, ios-legacy\
**Created:** [September 11, 2021, 6:07am UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407 "2021-09-11T06:07:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_lch](https://avatars.discourse-cdn.com/v4/letter/_/3be4f8/32.png) [@\_lch](https://forums.plex.tv/u/_lch)\
**Post date:** [September 11, 2021, 6:07am UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/1 "2021-09-11T06:07:08Z")

</div>

Hi,

Some users of my app (Prologue) are encountering an issue when attempting to stream some mp4/m4a/m4b files.

If the metadata for the item looks like this:

```auto
{
    "ratingKey": "497476",
    "key": "/library/metadata/497476",
    "parentRatingKey": "497475",
    "grandparentRatingKey": "497474",
    "guid": "com.plexapp.agents.audiobooks://B00VN0Q8XY/-1?lang=en",
    "parentGuid": "com.plexapp.agents.audiobooks://B00VN0Q8XY?lang=en",
    "grandparentGuid": "local://497474",
    "parentStudio": "Random House Audio",
    "type": "track",
    "title": "Armada: A Novel",
    "grandparentKey": "/library/metadata/497474",
    "parentKey": "/library/metadata/497475",
    "grandparentTitle": "Ernest Cline",
    "parentTitle": "Armada",
    "originalTitle": "Ernest Cline",
    "summary": "",
    "skipCount": 1,
    "parentYear": 2015,
    "thumb": "/library/metadata/497475/thumb/1630915401",
    "parentThumb": "/library/metadata/497475/thumb/1630915401",
    "duration": 42658932,
    "addedAt": 1630915358,
    "updatedAt": 1630915407,
    "chapterSource": "media",
    "Media": [
        {
            "id": 853508,
            "duration": 42658932,
            "audioChannels": 2,
            "audioCodec": "aac",
            "container": "mp4",
            "optimizedForStreaming": 0,
            "audioProfile": "lc",
            "has64bitOffsets": false,
            "Part": [
                {
                    "id": 901659,
                    "key": "/library/parts/901659/1602180968/file.m4a",
                    "duration": 42658932,
                    "file": "/path/to/file.m4a",
                    "size": 338552226,
                    "audioProfile": "lc",
                    "container": "mp4",
                    "has64bitOffsets": false,
                    "hasThumbnail": "1",
                    "optimizedForStreaming": false
                }
            ]
        }
    ]
}

```

And I request the media file like this:

```auto
GET /library/parts/901659/1602180968/file.m4a?X-Plex-Token=XXXXXXXXXXX HTTP/1.1
Host: SERVER_URL:32400
Accept: */*
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15
Accept-Language: en-AU,en;q=0.9
Accept-Encoding: identity
Connection: keep-alive

```

I get a `400: Bad Request` response.

A few other things I’ve noticed:

- If I add a `download=1` parameter to the request everything works correctly. I can’t use this across the board, however, as a user may not have download permissions for the server
- This only happens with some files (all of them AAC-encoded in an mp4/m4a/m4b container, I think).
- Plex Web transcodes these files (doesn’t attempt to stream them directly). Not sure what other clients do as I’m not able to intercept their requests
- After downloading one of the “problem” files and sticking it in my library, it can be played in Prologue without issue. Implies no problems with the file itself. Both servers running same version (1.24.1.4931).

I’m probably missing something obvious, but this seems very strange to me 🤔  
Hoping someone here can point me in the right direction!

---

<div class="post-metadata">

**Author:** ![JoshStark](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/joshstark/32/118781_2.png) [@JoshStark](https://forums.plex.tv/u/JoshStark)\
**Post date:** [September 13, 2021, 2:18pm UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/2 "2021-09-13T14:18:16Z")

</div>

I can confirm as a user of Prologue and Bookcamp that this is an issue I have run into. Plex server is not showing the correct bitrate metadata on any newly added M4B files (although it used to in previous versions), and will refuse to direct play. The only workaround (and this should really only be read as a workaround, not a fix) is to remove the internet upload speed limit in the Plex server settings.

---

<div class="post-metadata">

**Author:** ![thatsnomooney](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/thatsnomooney/32/200502_2.png) [@thatsnomooney](https://forums.plex.tv/u/thatsnomooney)\
**Post date:** [September 13, 2021, 2:54pm UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/3 "2021-09-13T14:54:04Z")

</div>

I’m seeing this issue on Bookcamp and Chronicle, however I’ve got no workaround at all. None of my M4B based files are showing a bitrate for the overall media (they have one for the media part) and they just refuse to play.

I’ve tried removing the internet upload speed limit (in fact I never had it set), but it doesn’t resolve the issue.

---

<div class="post-metadata">

**Author:** ![Daimyo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/daimyo/32/213551_2.png) [@Daimyo](https://forums.plex.tv/u/Daimyo)\
**Post date:** [September 13, 2021, 6:29pm UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/4 "2021-09-13T18:29:36Z")

</div>

This is caused by changes in recent PMS versions, but will be resolved in an upcoming beta PMS release.

---

<div class="post-metadata">

**Author:** ![\_lch](https://avatars.discourse-cdn.com/v4/letter/_/3be4f8/32.png) [@\_lch](https://forums.plex.tv/u/_lch)\
**Post date:** [September 14, 2021, 5:09am UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/5 "2021-09-14T05:09:16Z")

</div>

Great news, thanks for the info.

---

<div class="post-metadata">

**Author:** ![dazzyp](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dazzyp](https://forums.plex.tv/u/dazzyp)\
**Post date:** [September 14, 2021, 1:01pm UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/6 "2021-09-14T13:01:20Z")

</div>

Brilliant -thanks for the clarification.

I’ve just found this forum post after posting about my own issues with Chronicle and Bookcamp :

([[BUG] Plex no longer correctly analysing M4b files correctly - incorrect bit rate detected - prevents direct play](https://forums.plex.tv/t/bug-plex-no-longer-correctly-analysing-m4b-files-correctly-incorrect-bit-rate-detected-prevents-direct-play/743156))

Glad to hear a fix is in progress, and i’ve added a note for the mods to close my post.

---

<div class="post-metadata">

**Author:** ![brian\_phospher.com](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@brian\_phospher.com](https://forums.plex.tv/u/brian_phospher.com)\
**Post date:** [October 26, 2021, 2:49am UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/7 "2021-10-26T02:49:27Z")

</div>

I’m seeing this same behavior. I’m on Plex 1.24.5.5173.

Streaming Resource: Bandwidth exceeded: 2147483647 kbps \> 8000 kbps  
Streaming Resource: Cannot make a decision because either the file is unplayable or the client provided bad data

This unfortunately is stopping all of my Chronicle and Bookcamp clients from working. I’ve been testing Booksonic as a replacement to Plex (just the Audiobook library) with the family and it’s not going well. ☹

I also can’t set my remote stream limit to “Original” because I don’t have the fancy fiber internet…although, this does allow the clients to play but it destroys everyone else’s experience. I.e., bandwidth contention and neverending buffering, due to the lack of transcoding.

Any help is appreciated!

-Brian

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [October 26, 2021, 4:41am UTC](https://forums.plex.tv/t/400-bad-request-response-when-requesting-some-audio-files/742407/8 "2021-10-26T04:41:31Z")

</div>

@brian_phospher.com

Respond here please:

> [@\[BUG\] Plex no longer correctly analysing M4b files correctly - incorrect bit rate detected - prevents direct play](https://forums.plex.tv/t/bug-plex-no-longer-correctly-analysing-m4b-files-correctly-incorrect-bit-rate-detected-prevents-direct-play/743156/4):
>
> @brian_phospher.com Do you have / can you recreate please and capture the logs ZIP file, then attach it? I will investigate what appears to be a regression.

Allow this solved thread to close please.
