[PR #2438] add mediainfo.js as a backup tag parser for extra tags #3714

Open
opened 2026-04-25 00:16:46 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2438
Author: @johnpyp
Created: 12/22/2023
Status: 🔄 Open

Base: masterHead: mediainfo-extra-tag-parsing


📝 Commits (4)

  • dee41dd add mediainfo.js as an additional "backup" tag parser for extra tags ffprobe can't get
  • 600e289 remove console.log
  • f5cb1ce fix other usage of tryGrabTags
  • 0f480cd remove extraneous doc comment

📊 Changes

4 files changed (+336 additions, -126 deletions)

View changed files

📝 package-lock.json (+99 -23)
📝 package.json (+2 -1)
server/utils/mediaInfoHelpers.js (+97 -0)
📝 server/utils/prober.js (+138 -102)

📄 Description

Motivation: https://github.com/advplyr/audiobookshelf/issues/2437

This PR adds mediainfo.js as a backup for ffprobe to get tag metadata information from media files.

Currently, it's quite conservative and will only check medainfo if ffprobe doesn't find anything for any of its possible tag values, and will only consider the extra fields anyways (i.e non-well-defined/known fields). This should help limit any compatibility issues with file formats I haven't tested.

A key usecase here is to extract asin or cdek tags as definitions for the ASIN, which ffprobe can't currently do.

So far, I've tested this with a couple of M4B files.

Before (master):
image

After:
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/2438 **Author:** [@johnpyp](https://github.com/johnpyp) **Created:** 12/22/2023 **Status:** 🔄 Open **Base:** `master` ← **Head:** `mediainfo-extra-tag-parsing` --- ### 📝 Commits (4) - [`dee41dd`](https://github.com/advplyr/audiobookshelf/commit/dee41dd180d234ced93382fbed547e68869a62be) add mediainfo.js as an additional "backup" tag parser for extra tags ffprobe can't get - [`600e289`](https://github.com/advplyr/audiobookshelf/commit/600e2896436ac9fa4812cf2d7b6bb3daad448785) remove console.log - [`f5cb1ce`](https://github.com/advplyr/audiobookshelf/commit/f5cb1ce782379df72e4820d324e0c7cc53254bb0) fix other usage of `tryGrabTags` - [`0f480cd`](https://github.com/advplyr/audiobookshelf/commit/0f480cd517b167355fa9d163c783390f3a749520) remove extraneous doc comment ### 📊 Changes **4 files changed** (+336 additions, -126 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+99 -23) 📝 `package.json` (+2 -1) ➕ `server/utils/mediaInfoHelpers.js` (+97 -0) 📝 `server/utils/prober.js` (+138 -102) </details> ### 📄 Description Motivation: https://github.com/advplyr/audiobookshelf/issues/2437 This PR adds mediainfo.js as a backup for ffprobe to get tag metadata information from media files. Currently, it's quite conservative and will only check medainfo if ffprobe doesn't find anything for any of its possible tag values, and will only consider the `extra` fields anyways (i.e non-well-defined/known fields). This should help limit any compatibility issues with file formats I haven't tested. A key usecase here is to extract `asin` or `cdek` tags as definitions for the ASIN, which ffprobe can't currently do. So far, I've tested this with a couple of M4B files. Before (master): ![image](https://github.com/advplyr/audiobookshelf/assets/20625636/77a1f880-f604-4bb7-84c1-a694d8c6cf6d) After: ![image](https://github.com/advplyr/audiobookshelf/assets/20625636/a2b5cae4-b220-47fc-bcdb-d6c3959b84d0) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:46 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3714