X-Git-Url: http://git.ieval.ro/?p=fdkaac.git;a=blobdiff_plain;f=README;h=4bd55b3eaaf39d3a209c6faf2cd76f9304df7595;hp=007af3adfbfd2ee88a10618e3576bc073f86ffd8;hb=cbb23cdbd8ad4a17340d453e750cdbb7be324664;hpb=721d977f599a444dbfe86a4ca5a3b64a7e6d64b1 diff --git a/README b/README index 007af3a..4bd55b3 100644 --- a/README +++ b/README @@ -50,3 +50,53 @@ Therefore, only use UTF-8 (without BOM) when setting text tags by this option. On the other hand, --tag / --long-tag (and other command line arguments) are converted from locale character encoding to UTF-8 on Posix environment. On Windows, command line arguments are always treated as Unicode. + +Tagging using JSON +------------------ +With --tag-from-json, fdkaac can read JSON file and set tags from it. +By default, tags are assumed to be in the root object(dictionary) like this: + +{ + "title": "No Expectations", + "artist": "The Rolling Stones", + "album": "Beggars Banquet", + "track": 2 +} + +In this case, you can simply specify the filename like: +--tag-from-json=/path/to/json + +If the object containing tags is placed somewhere else, you can optionally +specify the path of the object with dotted notation. + +{ + "format" : { + "filename" : "Middle Curse.flac", + "nb_streams" : 1, + "format_name" : "flac", + "format_long_name" : "raw FLAC", + "start_time" : "N/A", + "duration" : "216.146667", + "size" : "11851007.000000", + "bit_rate" : "438628.000000", + "tags" : { + "ALBUM" : "Scary World Theory", + "ARTIST" : "Lali Puna", + "DATE" : "2001", + "DISCID" : "9208CC0A", + "TITLE" : "Middle Curse", + "TRACKTOTAL" : "10", + "track" : "2" + } + } +} + +In this example, tags are placed under the object "format.tags". +("format" is a child of the root, and "tags" is a child of the "format"). +In this case, you can say: +--tag-from-json=/path/to/json?format.tags + +For your information, ffprobe of ffmpeg project (or avprobe of libav) can +output media information/metadata in json format like this. + +Note that not all tags can be read/written this way.