Giter VIP home page Giter VIP logo

dropcreations / manzana-apple-music-tagger Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 4.0 207 KB

A python script to fetch credits info from apple music about albums, songs and music-videos and tag MP4 and M4A files using those credits info.

Home Page: https://music.apple.com

License: MIT License

Python 100.00%
album animated apple apple-music artworks cover download downloader json m4a mp4 music music-video mutagen python song tagger

manzana-apple-music-tagger's People

Contributors

dropcreations avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

manzana-apple-music-tagger's Issues

The language of the tag value

Hello.

Apple Music is available in every regional language. Can I change the language of the tag value? For example, change the output language to Japanese instead of English.

Thank you very much.

How can I embed synced lyrics into a MP3 or AAC file which also shows as synced Lyrics in Apple Music.app ?

You possibly have the knowhow, hence I dare to ask here

Concrete Question

  • What exact metadata format must synced lyrics comply to in MP3 and AAC (M4A) files so that Apple Music on macOS shows them indeed as synced lyrics?
    • ID3 in MP3?
    • XMP in M4A container with AAC audio codec?
    • What text character encoding? (I'd prefer UTF-8)
    • What timecode: Milliseconds or MPEG frames?

My failed experiments

With Kid3 I added this metadata to the ID3 metadata of a WAV file

  • Lyrics Nr.1, Language: "ger" (German), Title "Viennese German", as audible in the song, UTF8
  • Lyrics Nr.2, Language: "ger" (German), Title "High German" (the translation for those not familiar with the Viennese dialect), UTF8
  • Synchronized Lyrics, Language: "ger" (German), Title "Viennese German", milliseconds as time units, UTF8
    • During playback in Kid3 the editor/preview windows jumps to the corresponding timestamped lines, so the timing is correct.
    • I also managed to export those synced lyrics as a .LYR file, should that be needed.

Convert WAV to MP3 and AAC and preserve all metadata

  • The basic ffmpeg -i input.wav output.mp3 || output.m4a carries over most metadata (Artist, Title, Album) but not all:
    • .mp3 (MP3 file with metadata in ID3 which ideally is preserved from the WAV file as-is)
      • Lyrics "Viennese German" and "High German" are copied over, but the synced lyrics not.
    • .m4a (MP4 container with AAC audio + metadata as XMP)
      • No Lyrics copied at all.

Also manual postprocessing attempts with Kid3 failed

  • Copy tag from WAV and paste to MP3 or M4A file
  • Inspecting this mediainfo frontend "InvisorLite" on macOS shows me this:
    • M4A
      • Lyrics: Shows the Viennese German version, the High German version is dropped.
        • Those M4A/XMP allow only one lyric record possibly?
        • In the source I had two lyric tags, both using language code "ger", only differing in the titles
        • So overall: In ID3 this seems to work, but in M4A/XMP only one seems to "make it"
      • SYLT - Synchronized lyric/text: Viennese German, whether only the title makes it, or also the content, I tried to determine by also inspecting with a Hex editor
        • Certain unique text phrases which are identical in German and Viennese German, occured only once. So this is a strong proof that this file has no 2 static lyrics + 1 synced lyrics., but rather only 1 static lyric. Unless ofc the "atomization" of the lyrics makes even ASCII text hard to find.
    • MP3
      • Contains a Field Lyrics Which shows: "High German: all High German lines // Viennese German: all Viennese German lines".
        • Seems like a complete representation
      • Shows no Synced Lyrics at all

Thanks for any directions!

it doesn't work (am i doing something wrong?)

Microsoft Windows [Version 10.0.22621.1702]
(c) Microsoft Corporation. All rights reserved.

C:\Users\leona\Downloads\2Pac\The Don Killuminati The 7 Day Theory>C:\Users\leona\Downloads\Manzana-Apple-Music-Tagger-main\manzana.py https://music.apple.com/us/album/the-don-killuminati-the-7-day-theory/1588164338

[22:29:38] [Downloader] INFO: Proccessing media...
[22:29:38] [AppleMusic] INFO: Loading cache...
[22:29:38] [AppleMusic] INFO: Checking access token found in cache...
[22:29:38] [AppleMusic] INFO: Loading cookies...
[22:29:38] [AppleMusic] INFO: Getting API response...
[22:29:39] [AppleMusic] INFO: Fetching album info...
Traceback (most recent call last):
  File "C:\Users\leona\Downloads\Manzana-Apple-Music-Tagger-main\manzana.py", line 201, in <module>
    main()
  File "C:\Users\leona\Downloads\Manzana-Apple-Music-Tagger-main\manzana.py", line 188, in main
    cover = download_artwork(data)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\leona\Downloads\Manzana-Apple-Music-Tagger-main\manzana.py", line 71, in download_artwork
    if info["externalCover"].get("originalUrl") is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

This is the error I get. Maybe I'm doing something wrong?

it doesn't work for me

I'm an apple music subscriber but i can't get any lyrics

"error: unrecognized arguments: lyrics"

This works only for US people i think. Changing the API will resolve the problem?

don't work

What is the problem?

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 22-25: ordinal
not in range(256)

Could you please help me? Thanks.

Download artist image

Please add a parameter to download only artist images? Only one image per artist is downloaded.
image

Apple Music

Does Apple Music app on iPhone show these credits tag for locally saved m4a?
Such as Lyricist

Does iTunes/Apple music on Mac, read/sync .lrc file Apple Music app on iPhone for locally saved m4a?

Or is program geared to get the credits from Apple music n save in m4a and read it on other app (non-Apple Music)

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.