yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
81.96k stars 6.39k forks source link

When using `--parse-metadate`, <meta_album_artist> does not properly overwrite the legacy metadata and <meta_artist> does not tag to the right field. #1958

Closed Xyde closed 2 years ago

Xyde commented 2 years ago

Checklist

Description

I use album_artist and artist metadata fields. I intend to label album_artist as uploader_id and artist as uploader.

For the field album_artist, instead of overwriting the legacy metadata (which yt-dlp defaults to artist) by the new metadata (which is uploader_id), yt-dlp just adds it as a separate tag entry. So I get artist; uploader_id instead of uploader_id.

For the field artist, instead of writing the metadata (uploader_id) to the artist field, yt-dlp writes it to the album_artist field.

Example of where I set uploader_id to artist

(Seen in the verbose log 1)

Screenshot

Set uploader_id to meta_artist

Example of where I set uploader_id to album_artist

(Seen in the verbose log 2)

Screenshot

Set uploader_id to meta_album_artist

Conclusion / What needs to be fixed

Bonus screenshot when the two entries are compared to each other

bonus screenshot

Verbose log

E:\>yt-dlp --ffmpeg-location %CD%\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe --verbose -o %(id)s.%(ext)s --geo-bypass-country JP -f bv*+ba/b --parse-metadata "uploader_id:(?s)(?P<meta_artist>.+)" --add-metadata https://www.youtube.com/watch?v=G7aJCz6E_YY
[debug] Command-line config: ['--ffmpeg-location', 'E:\\\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\\bin\\ffmpeg.exe', '--verbose', '-o', '%(id)s.%(ext)s', '--geo-bypass-country', 'JP', '-f', 'bv*+ba/b', '--parse-metadata', 'uploader_id:(?s)(?P<meta_artist>.+)', '--add-metadata', 'https://www.youtube.com/watch?v=G7aJCz6E_YY']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.12.01 [91f071a] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.14393-SP0
[debug] exe versions: ffmpeg n4.4.1-2-gcc33e73618-20211206 (setts), ffprobe n4.4.1-2-gcc33e73618-20211206
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] Using fake IP 133.114.198.186 (JP) as X-Forwarded-For
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=G7aJCz6E_YY
[youtube] G7aJCz6E_YY: Downloading webpage
[youtube] G7aJCz6E_YY: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Searching for '(?s)(?P<meta_artist>.+)' in '%(uploader_id)s'
[MetadataParser] Parsed meta_artist from '%(uploader_id)s': 'UCXRlIK3Cw_TJIQC5kSJJQMg'
[info] G7aJCz6E_YY: Downloading 1 format(s): 248+251
[debug] Invoking downloader on "https://r5---sn-8qu-t0ay.googlevideo.com/videoplayback?expire=1639235220&ei=NGq0Ya3eBI6F8wTOqKboAg&ip=96.22.172.30&id=o-ABInhaRbPmG1JzIF0in7SU9ZD-4B5Vz077eEyhQRPL2J&itag=248&source=youtube&requiressl=yes&mh=Yw&mm=31%2C29&mn=sn-8qu-t0ay%2Csn-t0a7sn7d&ms=au%2Crdu&mv=m&mvi=5&pcm2cms=yes&pl=22&initcwndbps=1562500&vprv=1&mime=video%2Fwebm&gir=yes&clen=56532983&dur=265.000&lmt=1634672884046813&mt=1639213248&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5432432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMVkVnyX7c_6FWd5rRTz4fqgdl5tFrYSAb2YUhdzMsfAAiEAqkL3dB7bh-Tjb2r8b6f8HdUPlJ3MtrqvWSxOxN1z3tE%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAJXO_sW5qk92HvCTrtPgdedlZXxf_QF7yD2iUR_06nHcAiBSHamPYZmG1KetDIMI0U5LEUKomxqhsgFadqNux1RSsQ%3D%3D"
[download] Destination: G7aJCz6E_YY.f248.webm
[download] 100% of 53.91MiB in 00:07
[debug] Invoking downloader on "https://r5---sn-8qu-t0ay.googlevideo.com/videoplayback?expire=1639235220&ei=NGq0Ya3eBI6F8wTOqKboAg&ip=96.22.172.30&id=o-ABInhaRbPmG1JzIF0in7SU9ZD-4B5Vz077eEyhQRPL2J&itag=251&source=youtube&requiressl=yes&mh=Yw&mm=31%2C29&mn=sn-8qu-t0ay%2Csn-t0a7sn7d&ms=au%2Crdu&mv=m&mvi=5&pcm2cms=yes&pl=22&initcwndbps=1562500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=4550572&dur=265.021&lmt=1634672015188080&mt=1639213248&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAIViSgJDhNBdXEprloIQPZdw3IyhSwokVsFyJhQ-rVYyAiEA6cV_jA35MNCvjiQ8WES3SWLzSrd0TqySAL-pxTXUZRk%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAJXO_sW5qk92HvCTrtPgdedlZXxf_QF7yD2iUR_06nHcAiBSHamPYZmG1KetDIMI0U5LEUKomxqhsgFadqNux1RSsQ%3D%3D"
[download] Destination: G7aJCz6E_YY.f251.webm
[download] 100% of 4.34MiB in 00:00
[Merger] Merging formats into "G7aJCz6E_YY.webm"
[debug] ffmpeg command line: "E:\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe" -y -loglevel "repeat+info" -i "file:G7aJCz6E_YY.f248.webm" -i "file:G7aJCz6E_YY.f251.webm" -c copy -map "0:v:0" -map "1:a:0" "file:G7aJCz6E_YY.temp.webm"
Deleting original file G7aJCz6E_YY.f251.webm (pass -k to keep)
Deleting original file G7aJCz6E_YY.f248.webm (pass -k to keep)
[Metadata] Adding metadata to "G7aJCz6E_YY.webm"
[debug] ffmpeg command line: "E:\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe" -y -loglevel "repeat+info" -i "file:G7aJCz6E_YY.webm" -map 0 -dn -c copy -metadata "title=【MV】初恋/戌亥とこ" -metadata "date=20211019" -metadata "description=『初恋』

作詞・作曲:山本 恭平(Arte Refact)
MIX:菊池司(Arte Refact)
 プロデュース:桑原 聖(Arte Refact)
 歌唱:戌亥とこ
イラスト:花ヶ田
 映像:ANYCOLOR株式会社

こもろ観光局 タイアップソング
参考:島崎藤村『初恋』
 小諸城址・懐古園" -metadata "synopsis=『初恋』

作詞・作曲:山本 恭平(Arte Refact)
MIX:菊池司(Arte Refact)
 プロデュース:桑原 聖(Arte Refact)
 歌唱:戌亥とこ
イラスト:花ヶ田
 映像:ANYCOLOR株式会社

こもろ観光局 タイアップソング
参考:島崎藤村『初恋』
 小諸城址・懐古園" -metadata "purl=https://www.youtube.com/watch?v=G7aJCz6E_YY" -metadata "comment=https://www.youtube.com/watch?v=G7aJCz6E_YY" -metadata "artist=UCXRlIK3Cw_TJIQC5kSJJQMg" "file:G7aJCz6E_YY.temp.webm"

E:\>yt-dlp --ffmpeg-location %CD%\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe --verbose -o %(id)s.%(ext)s --geo-bypass-country JP -f bv*+ba/b --parse-metadata "uploader_id:(?s)(?P<meta_album_artist>.+)" --add-metadata https://www.youtube.com/watch?v=wl95zSvqWqU
[debug] Command-line config: ['--ffmpeg-location', 'E:\\\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\\bin\\ffmpeg.exe', '--verbose', '-o', '%(id)s.%(ext)s', '--geo-bypass-country', 'JP', '-f', 'bv*+ba/b', '--parse-metadata', 'uploader_id:(?s)(?P<meta_album_artist>.+)', '--add-metadata', 'https://www.youtube.com/watch?v=wl95zSvqWqU']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.12.01 [91f071a] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.14393-SP0
[debug] exe versions: ffmpeg n4.4.1-2-gcc33e73618-20211206 (setts), ffprobe n4.4.1-2-gcc33e73618-20211206
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] Using fake IP 133.56.82.213 (JP) as X-Forwarded-For
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=wl95zSvqWqU
[youtube] wl95zSvqWqU: Downloading webpage
[youtube] wl95zSvqWqU: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Searching for '(?s)(?P<meta_album_artist>.+)' in '%(uploader_id)s'
[MetadataParser] Parsed meta_album_artist from '%(uploader_id)s': 'UCXRlIK3Cw_TJIQC5kSJJQMg'
[info] wl95zSvqWqU: Downloading 1 format(s): 248+251
[debug] Invoking downloader on "https://r3---sn-8qu-t0aee.googlevideo.com/videoplayback?expire=1639236197&ei=BW60YZPOGpKH_9EPvo64iA8&ip=96.22.172.30&id=o-AIzRUDYzFbhVtxVO13gNnJ3QAONFOGTLl196F3BhKRfx&itag=248&source=youtube&requiressl=yes&mh=Ww&mm=31%2C29&mn=sn-8qu-t0aee%2Csn-t0a7ln7d&ms=au%2Crdu&mv=m&mvi=3&pl=22&initcwndbps=1542500&vprv=1&mime=video%2Fwebm&gir=yes&clen=15437195&dur=208.074&lmt=1616935683743195&mt=1639214213&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgYOFubEcb2hOPOPsnsxjiRKGKAcHfehQGBM_0m4yBJMACIQC8NCB3NJRwb0dveVbDb4SsRpeofFYYXNJ7YKUDa4NIAQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAOaccAfWg2Djki4VrvcZQMr5rO20P3acot0kGvyFTFLRAiEAjkljLotlfK0-j8ZXvcLQ20o-0L-4F94KFdfaUh0_rKk%3D"
[download] Destination: wl95zSvqWqU.f248.webm
[download] 100% of 14.72MiB in 00:01
[debug] Invoking downloader on "https://r3---sn-8qu-t0aee.googlevideo.com/videoplayback?expire=1639236197&ei=BW60YZPOGpKH_9EPvo64iA8&ip=96.22.172.30&id=o-AIzRUDYzFbhVtxVO13gNnJ3QAONFOGTLl196F3BhKRfx&itag=251&source=youtube&requiressl=yes&mh=Ww&mm=31%2C29&mn=sn-8qu-t0aee%2Csn-t0a7ln7d&ms=au%2Crdu&mv=m&mvi=3&pl=22&initcwndbps=1542500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3519321&dur=208.101&lmt=1616935107895652&mt=1639214213&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAJSpE2XFEvk5F7IYzfkGaQtd9JFxqZV9Rl8JxSqO8MAwAiEAlNlXzNplb3-biznq8hQICxHeuGfxfHEjQVrcFQSZIFw%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAOaccAfWg2Djki4VrvcZQMr5rO20P3acot0kGvyFTFLRAiEAjkljLotlfK0-j8ZXvcLQ20o-0L-4F94KFdfaUh0_rKk%3D"
[download] Destination: wl95zSvqWqU.f251.webm
[download] 100% of 3.36MiB in 00:00
[Merger] Merging formats into "wl95zSvqWqU.webm"
[debug] ffmpeg command line: "E:\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe" -y -loglevel "repeat+info" -i "file:wl95zSvqWqU.f248.webm" -i "file:wl95zSvqWqU.f251.webm" -c copy -map "0:v:0" -map "1:a:0" "file:wl95zSvqWqU.temp.webm"
Deleting original file wl95zSvqWqU.f251.webm (pass -k to keep)
Deleting original file wl95zSvqWqU.f248.webm (pass -k to keep)
[Metadata] Adding metadata to "wl95zSvqWqU.webm"
[debug] ffmpeg command line: "E:\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe" -y -loglevel "repeat+info" -i "file:wl95zSvqWqU.webm" -map 0 -dn -c copy -metadata "title=カタオモイ/Aimer covered by 戌亥とこ" -metadata "date=20210323" -metadata "description=夢が叶ったの

Aimer「カタオモイ」
https://www.youtube.com/watch?v=kxs9Su_mbpU

イラスト / しぐれうい 様
https://twitter.com/ui_shig
https://www.youtube.com/channel/UCt30jJgChL8qeT9VPadidSw

動画 / 神稲 たーむ 様
https://twitter.com/Kumashiro_tarm

ボーカル / 戌亥とこ
https://twitter.com/inui_toko
https://www.youtube.com/channel/UCXRlIK3Cw_TJIQC5kSJJQMg" -metadata "synopsis=夢が叶ったの

Aimer「カタオモイ」
https://www.youtube.com/watch?v=kxs9Su_mbpU

イラスト / しぐれうい 様
https://twitter.com/ui_shig
https://www.youtube.com/channel/UCt30jJgChL8qeT9VPadidSw

動画 / 神稲 たーむ 様
https://twitter.com/Kumashiro_tarm

ボーカル / 戌亥とこ
https://twitter.com/inui_toko
https://www.youtube.com/channel/UCXRlIK3Cw_TJIQC5kSJJQMg" -metadata "purl=https://www.youtube.com/watch?v=wl95zSvqWqU" -metadata "comment=https://www.youtube.com/watch?v=wl95zSvqWqU" -metadata "artist=戌亥とこ -Inui Toko-" -metadata "album_artist=UCXRlIK3Cw_TJIQC5kSJJQMg" "file:wl95zSvqWqU.temp.webm"

E:\>
pukkandan commented 2 years ago

From the logs, the fields are being set to the correct values.

[debug] ffmpeg command line: "E:\\ffmpeg-n4.4.1-2-gcc33e73618-win64-gpl-4.4\bin\ffmpeg.exe" -y -loglevel "repeat+info" -i "file:G7aJCz6E_YY.webm" -map 0 -dn -c copy -metadata "title=【MV】初恋/戌亥とこ" -metadata "date=20211019" -metadata "description=..." -metadata "purl=https://www.youtube.com/watch?v=G7aJCz6E_YY" -metadata "comment=https://www.youtube.com/watch?v=G7aJCz6E_YY" -metadata "artist=UCXRlIK3Cw_TJIQC5kSJJQMg" "file:G7aJCz6E_YY.temp.webm"

If whatever program you are using to view the metadata decided to merge the two fields, nothing I can do about it

Run ffmpeg -i "path/to/video.webm" and show the output

Xyde commented 2 years ago

Output for the "merged metadata"

E:\>ffmpeg -i "E:/wl95zSvqWqU.webm"
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'E:/wl95zSvqWqU.webm':
  Metadata:
    title           : カタオモイ/Aimer covered by 戌亥とこ
    ARTIST          : 戌亥とこ -Inui Toko-
    ALBUM_ARTIST    : UCXRlIK3Cw_TJIQC5kSJJQMg
    DATE            : 20210323
    DESCRIPTION     : 夢が叶ったの
                    :
                    :
                    : Aimer「カタオモイ」
                    : https://www.youtube.com/watch?v=kxs9Su_mbpU
                    :
                    : イラスト / しぐれうい 様
                    : https://twitter.com/ui_shig
                    : https://www.youtube.com/channel/UCt30jJgChL8qeT9VPadidSw
                    :
                    : 動画 / 神稲 たーむ 様
                    : https://twitter.com/Kumashiro_tarm
                    :
                    : ボーカル / 戌亥とこ
                    : https://twitter.com/inui_toko
                    : https://www.youtube.com/channel/UCXRlIK3Cw_TJIQC5kSJJQMg
    SYNOPSIS        : 夢が叶ったの
                    :
                    :
                    : Aimer「カタオモイ」
                    : https://www.youtube.com/watch?v=kxs9Su_mbpU
                    :
                    : イラスト / しぐれうい 様
                    : https://twitter.com/ui_shig
                    : https://www.youtube.com/channel/UCt30jJgChL8qeT9VPadidSw
                    :
                    : 動画 / 神稲 たーむ 様
                    : https://twitter.com/Kumashiro_tarm
                    :
                    : ボーカル / 戌亥とこ
                    : https://twitter.com/inui_toko
                    : https://www.youtube.com/channel/UCXRlIK3Cw_TJIQC5kSJJQMg
    PURL            : https://www.youtube.com/watch?v=wl95zSvqWqU
    COMMENT         : https://www.youtube.com/watch?v=wl95zSvqWqU
    ENCODER         : Lavf58.76.100
  Duration: 00:03:28.10, start: -0.007000, bitrate: 728 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:03:28.081000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:03:28.101000000
At least one output file must be specified

E:\>

I then edit the metadata so that it appears the "correct way" in foobar 2000 and tried to use the command line once again and this was the output

foobar2000 edit


E:\>ffmpeg -i "E:/wl95zSvqWqU.webm"
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'E:/wl95zSvqWqU.webm':
  Metadata:
    SYNOPSIS        : 夢が叶ったの
                    :
                    :
                    : Aimer「カタオモイ」
                    : https://www.youtube.com/watch?v=kxs9Su_mbpU
                    :
                    : イラスト / しぐれうい 様
                    : https://twitter.com/ui_shig
                    : https://www.youtube.com/channel/UCt30jJgChL8qeT9VPadidSw
                    :
                    : 動画 / 神稲 たーむ 様
                    : https://twitter.com/Kumashiro_tarm
                    :
                    : ボーカル / 戌亥とこ
                    : https://twitter.com/inui_toko
                    : https://www.youtube.com/channel/UCXRlIK3Cw_TJIQC5kSJJQMg
    DESCRIPTION     : 夢が叶ったの
                    :
                    :
                    : Aimer「カタオモイ」
                    : https://www.youtube.com/watch?v=kxs9Su_mbpU
                    :
                    : イラスト / しぐれうい 様
                    : https://twitter.com/ui_shig
                    : https://www.youtube.com/channel/UCt30jJgChL8qeT9VPadidSw
                    :
                    : 動画 / 神稲 たーむ 様
                    : https://twitter.com/Kumashiro_tarm
                    :
                    : ボーカル / 戌亥とこ
                    : https://twitter.com/inui_toko
                    : https://www.youtube.com/channel/UCXRlIK3Cw_TJIQC5kSJJQMg
    ALBUM_ARTIST    : UCXRlIK3Cw_TJIQC5kSJJQMg
    ARTIST          : 戌亥とこ
    COMMENT         : https://www.youtube.com/watch?v=wl95zSvqWqU
    DATE_RECORDED   : 20210323
    ENCODER         : Lavf58.76.100
    PURL            : https://www.youtube.com/watch?v=wl95zSvqWqU
    TITLE           : カタオモイ/Aimer covered by 戌亥とこ
  Duration: 00:03:28.10, start: -0.007000, bitrate: 728 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:03:28.081000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:03:28.101000000
At least one output file must be specified

E:\>

Output for the "non merged metadata"

E:\> ffmpeg -i "E:/G7aJCz6E_YY.webm"
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'E:/G7aJCz6E_YY.webm':
  Metadata:
    title           : 【MV】初恋/戌亥とこ
    COMMENT         : https://www.youtube.com/watch?v=G7aJCz6E_YY
    ARTIST          : UCXRlIK3Cw_TJIQC5kSJJQMg
    DATE            : 20211019
    DESCRIPTION     : 『初恋』
                    :
                    : 作詞・作曲:山本 恭平(Arte Refact)
                    : MIX:菊池司(Arte Refact)
                    :  プロデュース:桑原 聖(Arte Refact)
                    :  歌唱:戌亥とこ
                    : イラスト:花ヶ田
                    :  映像:ANYCOLOR株式会社
                    :
                    :
                    : こもろ観光局 タイアップソング
                    : 参考:島崎藤村『初恋』
                    :  小諸城址・懐古園
    SYNOPSIS        : 『初恋』
                    :
                    : 作詞・作曲:山本 恭平(Arte Refact)
                    : MIX:菊池司(Arte Refact)
                    :  プロデュース:桑原 聖(Arte Refact)
                    :  歌唱:戌亥とこ
                    : イラスト:花ヶ田
                    :  映像:ANYCOLOR株式会社
                    :
                    :
                    : こもろ観光局 タイアップソング
                    : 参考:島崎藤村『初恋』
                    :  小諸城址・懐古園
    PURL            : https://www.youtube.com/watch?v=G7aJCz6E_YY
    ENCODER         : Lavf58.76.100
  Duration: 00:04:25.02, start: -0.007000, bitrate: 1843 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:04:25.007000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:04:25.021000000
At least one output file must be specified

Then I edited it in foobar


E:\>ffmpeg -i "E:/G7aJCz6E_YY.webm"
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'E:/G7aJCz6E_YY.webm':
  Metadata:
    SYNOPSIS        : 『初恋』
                    :
                    : 作詞・作曲:山本 恭平(Arte Refact)
                    : MIX:菊池司(Arte Refact)
                    :  プロデュース:桑原 聖(Arte Refact)
                    :  歌唱:戌亥とこ
                    : イラスト:花ヶ田
                    :  映像:ANYCOLOR株式会社
                    :
                    :
                    : こもろ観光局 タイアップソング
                    : 参考:島崎藤村『初恋』
                    :  小諸城址・懐古園
    DESCRIPTION     : 『初恋』
                    :
                    : 作詞・作曲:山本 恭平(Arte Refact)
                    : MIX:菊池司(Arte Refact)
                    :  プロデュース:桑原 聖(Arte Refact)
                    :  歌唱:戌亥とこ
                    : イラスト:花ヶ田
                    :  映像:ANYCOLOR株式会社
                    :
                    :
                    : こもろ観光局 タイアップソング
                    : 参考:島崎藤村『初恋』
                    :  小諸城址・懐古園
    ARTIST          : 戌亥とこ
    COMMENT         : https://www.youtube.com/watch?v=G7aJCz6E_YY
    DATE_RECORDED   : 20211019
    ENCODER         : Lavf58.76.100
    PURL            : https://www.youtube.com/watch?v=G7aJCz6E_YY
    TITLE           : 【MV】初恋/戌亥とこ
  Duration: 00:04:25.02, start: -0.007000, bitrate: 1843 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:04:25.007000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:04:25.021000000
At least one output file must be specified

E:\>

Conclusion

I noticed that the "badly displayed data" have the album artist and the artist field appear in the beginning in the log (with the title field being in first), and the "properly displayed one" have the "sypnosis" at the beginning with the "artist" and "album_artist" right after the "description" field.

Not sure how it affected the display but it did.

I also tried to use another program to display metadata (MP3TAG) and it also showed the data weirdly...

Suggestion: Maybe reorder how the metadata is written (when using ffmpeg -i)?

pukkandan commented 2 years ago

Maybe foobar issue? idk

Anyway, since the metadata is being written to the file and ffprobe can read it properly, it's not yt-dlp's issue