Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapters are not visible in iTunes #5

Open
michellekg opened this issue May 17, 2020 · 19 comments
Open

Chapters are not visible in iTunes #5

michellekg opened this issue May 17, 2020 · 19 comments
Assignees

Comments

@michellekg
Copy link

Chapters created in mp3chaps are not visible in iTunes and Apple Podcasts. Some other apps like Overcast recognizes them though.

But if you open mp3 file with chapters created by mp3chaps in Forecast (macOS app with GUI) and then just save this file without any editing, chapters will become visible in iTunes.

I compared two files (before and after Forecast) and there some big differencies - mainly in the beginning of the file. Can this problem be solved somehow please?

@dskrad
Copy link
Owner

dskrad commented May 23, 2020

Hey, I just uploaded a new version. Can you tell me if this fixes this issue with iTunes, as I cannot test with iTunes. Thanks.

@michellekg
Copy link
Author

Hey, I just uploaded a new version. Can you tell me if this fixes this issue with iTunes, as I cannot test with iTunes. Thanks.

Thanks! I'm kinda new to all this Python thing. Should I reinstall mp3chaps like this?

pip3 install mp3chaps

I did it and recieved Requirement already satisfied everywhere:

C:\Users\Wiedzmin>pip3 install mp3chaps
Requirement already satisfied: mp3chaps in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (0.2)
Requirement already satisfied: eyeD3>=0.8.4 in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from mp3chaps) (0.9.5)
Requirement already satisfied: docopt>=0.6.2 in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from mp3chaps) (0.6.2)
Requirement already satisfied: filetype in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from eyeD3>=0.8.4->mp3chaps) (1.0.7)
Requirement already satisfied: deprecation in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from eyeD3>=0.8.4->mp3chaps) (2.1.0)
Requirement already satisfied: packaging in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from deprecation->eyeD3>=0.8.4->mp3chaps) (20.3)
Requirement already satisfied: six in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from packaging->deprecation->eyeD3>=0.8.4->mp3chaps) (1.14.0)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\wiedzmin\appdata\local\programs\python\python38\lib\site-packages (from packaging->deprecation->eyeD3>=0.8.4->mp3chaps) (2.4.7)

Is it normal or am I doing something wrong?

@dskrad
Copy link
Owner

dskrad commented May 24, 2020

@michellekg
Pip upgrade as follows:

pip3 install -U mp3chaps

Or

pip3 install --upgrade mp3chaps

@michellekg
Copy link
Author

Thanks again. Unfortunately, iTunes still doesn't see chapters. Maybe this will help:

Here's my podcast after adding chapters with mp3chaps: https://media.kg-portal.ru/tv/t/tvpodcast/trailers/tvpodcast_part341_129351_not.mp3 (no chapters in iTunes)

And here's the same file, but opened and saved with Forecast: https://media.kg-portal.ru/tv/t/tvpodcast/trailers/tvpodcast_part341_129351_ok.mp3 (chapters in iTunes are here)

@dskrad
Copy link
Owner

dskrad commented May 24, 2020

@michellekg I will check those out, but I'm not sure I'll be able to find a fix.

I am on Linux and Android, and chapters work in mpv (aka celluloid) and Podcast Addict.

@michellekg
Copy link
Author

Yes, it works basically in every other podcasts, but not in Podcasts and iTunes. Maybe ask author of Forecast for help? Or just compare this two files to check what's different?

@dskrad
Copy link
Owner

dskrad commented May 24, 2020

Since these are binary files, they are not easy to directly compare. I have tried using a couple of tools to see the differences.

I used the eyeD3 command line tool (provided by eyeD3 python library) to examine the ID3 tags.

The "bad" file has all the chapters listed in the "Lyrics" tag, whereas the "good" file has only a small hyperlink in the "Lyrics" tag. I don't know if you removed this on purpose, or if Forecast does this. Maybe the time codes listed in the lyrics tag are confusing iTunes?

I also used the ffprobe command line tool (provided by ffmpeg tool) and noticed that the "bad" file has the first chapter (Благодарим наших спонсоров) at 60 seconds (00:60:00.000) while the "good" file has the first chapter (Introduction) at time zero (00:00:00.000). This may also be confusing to iTunes. It may be standard practice to put the first chapter at time zero, and maybe Forecast defaults to this. Try using my tool to create chapters with the first chapter at time zero, and see if that fixes it.

One other difference is a frame called TLEN which contains the length of the file in milliseconds. This is present in the "good" file and absent in the "bad" file. This may be causing the iTunes issue. I will have mp3chaps update the TLEN frame and post the updated code here soon.

In the meantime, let me know if the other issues items I listed fix the issue for you. Thanks.

@dskrad dskrad self-assigned this May 24, 2020
@michellekg
Copy link
Author

Thanks, I'll try to make first chapter at time zero.

As for tags - yes, Forecast messes with them. For some strange reason it copies Comment to Lyrics and Album to Artist. Also it clears Genre and URL (and maybe more, I don't know). I tried to clear Lyrics, but it doesn't help in iTunes.

Also I think TLEN can help too.

@dskrad
Copy link
Owner

dskrad commented May 25, 2020

@michellekg The newest version on pypi now adds TLEN frame. Let me know if that fixes the issue with iTunes.

@michellekg
Copy link
Author

Tried it, but no luck (

Here's file after mp3chaps (not working): https://media.kg-portal.ru/tv/t/tvpodcast/trailers/tvpodcast_part341_129351_chaps04.mp3

And here's after mp3chaps and saving in Forecast (works): https://media.kg-portal.ru/tv/t/tvpodcast/trailers/tvpodcast_part341_129351_chaps04_forecast.mp3

@dskrad
Copy link
Owner

dskrad commented May 26, 2020

@michellekg Hey, I noticed that the "Track" field gets stripped by Forecast. Maybe this is the trick? Try to not set the "Track" in the ID3 tag, then use mp3chaps and see if it works in iTunes.

@michellekg
Copy link
Author

Unfortunately, no luck ( It seems like Forecast clearing Track tag by mistake like all other.

@dskrad
Copy link
Owner

dskrad commented May 31, 2020

Just curious what software you are using to encode or tag your mp3 files prior to adding chapters?

And referring to your original question: what "big differences" did you notice in the files before and after saving with Forecast? How did you spot these differences?

@michellekg
Copy link
Author

Just curious what software you are using to encode or tag your mp3 files prior to adding chapters?

AIMP for tags, sometimes mp3tags. Enconding with Vegas Pro or foobar2000 - it seems it doesn't matter.

And referring to your original question: what "big differences" did you notice in the files before and after saving with Forecast? How did you spot these differences?

I was just comparing these files with Hex Fiend and differences was there.

@pierrocknroll
Copy link

@michellekg did you find a solution ?

@michellekg
Copy link
Author

@michellekg did you find a solution ?

Unfortunately no ( I'm still have to use Forecast on macOS. It's a shame.

@pierrocknroll
Copy link

pierrocknroll commented Feb 17, 2021

I think it's because Apple needs a "table of contents" in the MP3 File.
Example (look at toc) :
https://github.com/nicfit/eyeD3/blob/master/examples/chapters.py
With "top level" ?

@michellekg
Copy link
Author

I think it's because Apple needs a "table of contents" in the MP3 File.
Example (look at toc) :
https://github.com/nicfit/eyeD3/blob/master/examples/chapters.py

Maybe you're right! Can @dskrad please try this?

@pierrocknroll
Copy link

I confirm, the "toplevel=True" flag in my example fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants