Giter VIP home page Giter VIP logo

Comments (7)

izderadicka avatar izderadicka commented on June 4, 2024

Thanks for detailed description of the problem.

audioserve is using libavformat (from ffmpeg package) to extract audio meta data.
If audio file contains chapters then it is displayed as "pseudo" folder - so you can access it's chapters individually. It's used mostly for .m4b format, which contains chapters information.
How ever I've never seen chapters info in .mp3 file. (audioserve can split huge mp3 file into equal size parts - chapter like - but it has to be enabled by explicit option - or one can supply additional companion file to indicate chapters - I assume you are not using this).

So I think libavformat is returning chapters for this file - something like one real and one dummy?

Can you share the problematic file?

from audioserve.

nford88 avatar nford88 commented on June 4, 2024

It seems you are right, I couldn't find that anywhere but of my full metadata output using ffmpeg of my file does show it has 2 chapters there for some reason.

This was originally a chapters m4b file which I split using the m4b-tool utility.
Ironically I found the maintainer of that post the exact issue I had whereby you cannot seem to re-import new chapters data from a modified metadata file.

Will look at trying to re-encode somehow.

from audioserve.

izderadicka avatar izderadicka commented on June 4, 2024

Thanks for update - anyhow if you can share file I'll look into it.
m4b format should work with some limitation (no cover, no description).
I should add some sanity checking about chapters metadata ( if there is only 1 chapter do not show as folder etc..)

For splitting m4b I'm using my own wrapper around ffmpeg

from audioserve.

nford88 avatar nford88 commented on June 4, 2024

I came up with a short bash script to strip out the chapters but retain all other metadata. It now appearing as it should 👍 Do you still want the file for your own observations?

#!/bin/bash

# creates a direectory scrubbed with new chapoter removed files
# '.strip_chapters.sh <dir>

cd "$1"
mkdir "scrubbed"
set -x
for FILE in *; 
do 
   if [ ${FILE: -4} == ".mp3" ]
      then
         ffmpeg -i "${FILE}" -f ffmetadata "meta.txt"
         ffmpeg -i "$FILE" -i "meta.txt" -map_metadata 1 -map_chapters -1 -codec copy "./scrubbed/${FILE}"
         rm -rf "meta.txt"
   fi
done

👏
image

from audioserve.

izderadicka avatar izderadicka commented on June 4, 2024

Yes please - share the file, I have made small changes - wondering if it helps.
Thnx

from audioserve.

nford88 avatar nford88 commented on June 4, 2024

Here you go! -https://filebin.net/gxqpu8fcce5dha7d

from audioserve.

izderadicka avatar izderadicka commented on June 4, 2024

Thanks - I've checked - with ffprobe - there are really two chapters - first one is "real" - other has zero length (and starts and ends at end of first chapter) . audioserve displays them both and plays OK. So I think problem is in splitting program, which adds second useless chapter. I've added option --ignore-chapters-meta to globally ignore chapters metadata if people would prefer that.

from audioserve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.