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

Wrong year in metadata in M4A, MP4, FLAC format #3087

Closed
6 tasks done
sourabhkv opened this issue Mar 16, 2022 · 14 comments
Closed
6 tasks done

Wrong year in metadata in M4A, MP4, FLAC format #3087

sourabhkv opened this issue Mar 16, 2022 · 14 comments
Labels
bug Bug that is not site-specific external issue Issue with an external tool

Comments

@sourabhkv
Copy link

sourabhkv commented Mar 16, 2022

Checklist

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2022.03.08.1. (update instructions)
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I've read the guidelines for opening an issue

Description

While downloading audio year in metadata in mp3 file is of YYYY format whereas in case of m4a is is of YYYYMMDD format

M4A metadata
m4a-metadata

MP3 metadata
mp3-metadata

Verbose log

---------------------------------------------M4a-LOG------------------------------------
yt-dlp_x86 --no-mtime --add-metadata --audio-format m4a --audio-quality 0 -x --embed-thumbnail -vU https://music.youtube.com/watch?v=F2_pg8xd1To
[debug] Command-line config: ['--no-mtime', '--add-metadata', '--audio-format', 'm4a', '--audio-quality', '0', '-x', '--embed-thumbnail', '-vU', 'https://music.youtube.com/watch?v=F2_pg8xd1To']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.03.08.1 [c0c2c57] (win_exe)
[debug] Python version 3.7.9 (CPython 32bit) - Windows-10-10.0.22000-SP0
[debug] exe versions: ffmpeg 4.3.1
[debug] Optional libraries: brotli, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08.1
yt-dlp is up to date (2022.03.08.1)
[debug] [youtube] Extracting URL: https://music.youtube.com/watch?v=F2_pg8xd1To
[youtube] F2_pg8xd1To: Downloading webpage
[youtube] F2_pg8xd1To: Downloading android player API JSON
[youtube] F2_pg8xd1To: Downloading android music player API JSON
[youtube] F2_pg8xd1To: Downloading web music config
[youtube] F2_pg8xd1To: Downloading player bd67d609
[youtube] F2_pg8xd1To: Downloading web music 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
[info] F2_pg8xd1To: Downloading 1 format(s): 251
[info] Downloading video thumbnail 43 ...
WARNING: Unable to download video thumbnail 43: HTTP Error 404: Not Found
[info] Downloading video thumbnail 42 ...
WARNING: Unable to download video thumbnail 42: HTTP Error 404: Not Found
[info] Downloading video thumbnail 41 ...
WARNING: Unable to download video thumbnail 41: HTTP Error 404: Not Found
[info] Downloading video thumbnail 40 ...
WARNING: Unable to download video thumbnail 40: HTTP Error 404: Not Found
[info] Downloading video thumbnail 39 ...
[info] Writing video thumbnail 39 to: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp
[debug] Invoking downloader on "https://rr7---sn-ci5gup-qxay.googlevideo.com/videoplayback?expire=1647461873&ei=kfExYsvLCan74-EPvKqN4AI&ip=122.167.128.76&id=o-ALEAbOOv7QMzwQhZ3UIznuVL9503nsQDX0DcJbKU0o11&itag=251&source=youtube&requiressl=yes&mh=D-&mm=31%2C29&mn=sn-ci5gup-qxay%2Csn-ci5gup-h55z&ms=au%2Crdu&mv=m&mvi=7&pl=20&initcwndbps=1598750&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3677756&dur=210.141&lmt=1540083846249430&mt=1647440000&fvip=6&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5411222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAKNWuiJy_NNc2GPKflfaxy-lMsa1xcX-zOrqMqgPmfNZAiBRZqo_YC3jDGALcuVc9ntcZRoBALc2TLWXtz42qi4Lgw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgcpq_2cZ-yeGgv6PAIP0hwrwKyxq0Sid2q-nTtD25oLUCIQDG_CvfY8IH6ZwHWGlXENNlaFG0XXXTHJModUe2I7COTQ%3D%3D"
[download] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm
[download] 100% of 3.51MiB in 00:03
[debug] ffmpeg command line: ffmpeg -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm"
[ExtractAudio] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm" -vn -acodec aac "-q:a" 4.0 "-bsf:a" aac_adtstoasc -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a"
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm (pass -k to keep)
[Metadata] Adding metadata to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a" -map 0 -dn -ignore_unknown -vn -acodec copy -metadata "title=Grand Theft Auto - Vice City (Main Theme Extended Mix)" -metadata "date=20150423" -metadata "purl=https://www.youtube.com/watch?v=F2_pg8xd1To" -metadata "comment=https://www.youtube.com/watch?v=F2_pg8xd1To" -metadata "artist=MrGlere" -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].temp.m4a"
[ThumbnailsConvertor] Converting thumbnail "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp" to png
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -f image2 -pattern_type none -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp" -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].png"
[EmbedThumbnail] mutagen: Adding thumbnail to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a"
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].png (pass -k to keep)
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp (pass -k to keep)

-----------------------------------------------MP3-LOG-------------------------------------------------
yt-dlp_x86 --no-mtime --add-metadata --audio-format mp3 --audio-quality 0 -x --embed-thumbnail -vU https://music.youtube.com/watch?v=F2_pg8xd1To
[debug] Command-line config: ['--no-mtime', '--add-metadata', '--audio-format', 'mp3', '--audio-quality', '0', '-x', '--embed-thumbnail', '-vU', 'https://music.youtube.com/watch?v=F2_pg8xd1To']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.03.08.1 [c0c2c57] (win_exe)
[debug] Python version 3.7.9 (CPython 32bit) - Windows-10-10.0.22000-SP0
[debug] exe versions: ffmpeg 4.3.1
[debug] Optional libraries: brotli, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08.1
yt-dlp is up to date (2022.03.08.1)
[debug] [youtube] Extracting URL: https://music.youtube.com/watch?v=F2_pg8xd1To
[youtube] F2_pg8xd1To: Downloading webpage
[youtube] F2_pg8xd1To: Downloading android player API JSON
[youtube] F2_pg8xd1To: Downloading android music player API JSON
[youtube] F2_pg8xd1To: Downloading web music config
[youtube] F2_pg8xd1To: Downloading player bd67d609
[youtube] F2_pg8xd1To: Downloading web music 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
[info] F2_pg8xd1To: Downloading 1 format(s): 251
[info] Downloading video thumbnail 43 ...
WARNING: Unable to download video thumbnail 43: HTTP Error 404: Not Found
[info] Downloading video thumbnail 42 ...
WARNING: Unable to download video thumbnail 42: HTTP Error 404: Not Found
[info] Downloading video thumbnail 41 ...
WARNING: Unable to download video thumbnail 41: HTTP Error 404: Not Found
[info] Downloading video thumbnail 40 ...
WARNING: Unable to download video thumbnail 40: HTTP Error 404: Not Found
[info] Downloading video thumbnail 39 ...
[info] Writing video thumbnail 39 to: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp
[debug] Invoking downloader on "https://rr7---sn-ci5gup-qxay.googlevideo.com/videoplayback?expire=1647462011&ei=G_IxYp-MMvyQg8UPhd-zwAc&ip=122.167.128.76&id=o-ALt_SXOcTHlNt4BITAwXtFdsPGYSmtjQGGeXXN7vlQQi&itag=251&source=youtube&requiressl=yes&mh=D-&mm=31%2C29&mn=sn-ci5gup-qxay%2Csn-ci5gup-h55z&ms=au%2Crdu&mv=m&mvi=7&pcm2cms=yes&pl=20&initcwndbps=1598750&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3677756&dur=210.141&lmt=1540083846249430&mt=1647440000&fvip=6&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5411222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgX8KB_MldXg2c3w6XX9bl46YsejB2E7ecKGLc5IJ_E5gCID2t2TausmuaStS_WtTInZZoocyPDdD7j0jXVvBlyn9m&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgcgmjELR7UeqsX1S7OLEkIGiUec_nfABFRN7R2C0ZR0ICIA4iZgdXol8vHrIYVm4TUofBq-a6j8vebAWfT54kjstE"
[download] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm
[download] 100% of 3.51MiB in 00:01
[debug] ffmpeg command line: ffmpeg -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm"
[ExtractAudio] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm" -vn -acodec libmp3lame "-q:a" 0.0 -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3"
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webm (pass -k to keep)
[Metadata] Adding metadata to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3" -map 0 -dn -ignore_unknown -c copy -metadata "title=Grand Theft Auto - Vice City (Main Theme Extended Mix)" -metadata "date=20150423" -metadata "purl=https://www.youtube.com/watch?v=F2_pg8xd1To" -metadata "comment=https://www.youtube.com/watch?v=F2_pg8xd1To" -metadata "artist=MrGlere" -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].temp.mp3"
[ThumbnailsConvertor] Converting thumbnail "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp" to png
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -f image2 -pattern_type none -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp" -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].png"
[EmbedThumbnail] ffmpeg: Adding thumbnail to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3" -i "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].png" -c copy -map "0:0" -map "1:0" -id3v2_version 3 "-metadata:s:v" "title=\"Album cover\"" "-metadata:s:v" "comment=\"Cover (front)\"" -movflags "+faststart" "file:Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].temp.mp3"
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].png (pass -k to keep)
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].webp (pass -k to keep)
@sourabhkv sourabhkv added bug Bug that is not site-specific triage Untriaged issue labels Mar 16, 2022
@pukkandan
Copy link
Member

pukkandan commented Mar 16, 2022

Windows is probably processing the field wrong. Show ffprobe/mediainfo output of the m4a file

@sourabhkv
Copy link
Author

sourabhkv commented Mar 16, 2022

I installed yt-dlp ,ffmpeg ,atomicparsley using termux still output is same
Screenshot_20220316-203121_Oto Music.png

Detailed year M4A format
Screenshot_20220316-203154_Oto Music.png

Detailed year MP3 format
Screenshot_20220316-205645_Oto Music.png

@pukkandan
Copy link
Member

pukkandan commented Mar 16, 2022

I meant this:

❯ yt-dlp --add-metadata F2_pg8xd1To -S +size -f m4a --exec ffprobe
[youtube] F2_pg8xd1To: Downloading webpage
[youtube] F2_pg8xd1To: Downloading android player API JSON
[info] F2_pg8xd1To: Downloading 1 format(s): 139
[download] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a
[download] 100% of 1.19MiB in 00:00
[FixupM4a] Correcting container of "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a"
[Metadata] Adding metadata to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a"
[Exec] Executing command: ffprobe "D:\Programs\Source\yt-dlp\yt-dlp\Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a"
ffprobe version N-105465-gbedb4bac1c-20220206 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.498_5075e1f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-nonfree --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220206
  libavutil      57. 19.100 / 57. 19.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 26.101 /  8. 26.101
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Programs\Source\yt-dlp\yt-dlp\Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: M4A isomiso2
    title           : Grand Theft Auto - Vice City (Main Theme Extended Mix)
    artist          : MrGlere
    date            : 20150423
    encoder         : Lavf59.17.101
    comment         : https://www.youtube.com/watch?v=F2_pg8xd1To
  Duration: 00:03:30.23, start: 0.000000, bitrate: 47 kb/s
  Stream #0:0[0x1](eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 46 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]

❯ yt-dlp --add-metadata F2_pg8xd1To -S +size -f m4a -x --audio-format mp3 --exec ffprobe
[youtube] F2_pg8xd1To: Downloading webpage
[youtube] F2_pg8xd1To: Downloading android player API JSON
[info] F2_pg8xd1To: Downloading 1 format(s): 139
[download] Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a has already been downloaded
[download] 100% of 1.19MiB
WARNING: F2_pg8xd1To: writing DASH m4a. Only some players support this container
[ExtractAudio] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3
Deleting original file Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].m4a (pass -k to keep)
[Metadata] Adding metadata to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3"
[Exec] Executing command: ffprobe "D:\Programs\Source\yt-dlp\yt-dlp\Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3"
ffprobe version N-105465-gbedb4bac1c-20220206 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (crosstool-NG 1.24.0.498_5075e1f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-nonfree --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220206
  libavutil      57. 19.100 / 57. 19.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 26.101 /  8. 26.101
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
Input #0, mp3, from 'D:\Programs\Source\yt-dlp\yt-dlp\Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp3':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: M4A isomiso2
    artist          : MrGlere
    comment         : https://www.youtube.com/watch?v=F2_pg8xd1To
    title           : Grand Theft Auto - Vice City (Main Theme Extended Mix)
    purl            : https://www.youtube.com/watch?v=F2_pg8xd1To
    date            : 20150423
    encoder         : Lavf59.17.101
  Duration: 00:03:30.26, start: 0.025057, bitrate: 128 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc59.20
date            : 20150423

You can see what is being shown as "year" in your GUI apps is actually the field "date". yt-dlp sets it to YYYYMMDD in both m4a and mp3

@pukkandan pukkandan added external issue Issue with an external tool and removed triage Untriaged issue labels Mar 16, 2022
@Fakeaccount12312
Copy link

The same thing happens in the mp4 format:

Mp4 metadata
grafik

Log

$ yt-dlp --add-metadata -f "bv*[ext=mp4]" --exec "ffprobe" F2_pg8xd1To
[youtube] F2_pg8xd1To: Downloading webpage
[youtube] F2_pg8xd1To: Downloading android player API JSON
[info] F2_pg8xd1To: Downloading 1 format(s): 135
[download] Destination: Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp4
[download] 100% of 1.66MiB in 00:00
[Metadata] Adding metadata to "Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp4"
[Exec] Executing command: ffprobe "C:\Users\censored\Downloads\Temp\Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp4"
ffprobe version 4.4.1-full_build-www.gyan.dev Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 11.2.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\censored\Downloads\Temp\Grand Theft Auto - Vice City (Main Theme Extended Mix) [F2_pg8xd1To].mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Grand Theft Auto - Vice City (Main Theme Extended Mix)
    artist          : MrGlere
    date            : 20150423
    encoder         : Lavf59.0.100
    comment         : https://www.youtube.com/watch?v=F2_pg8xd1To
  Duration: 00:03:30.08, start: 0.000000, bitrate: 64 kb/s
  Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 63 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]

@sourabhkv
Copy link
Author

______ flac metadata (LEFT)__________________________ m4a metadata (CENTER)________________________mp3 metadata (RIGHT) ________
metadata

metadata year is not in YYYY format except MP3

@sourabhkv
Copy link
Author

sourabhkv commented Mar 18, 2022

I have a temporary solution which only works with music only (yt music not youtube video)
--parse-metadata "release_year:(?s)(?P<meta_date>.+)"
adding this command works fine for albums but not video
See here
release_year (numeric): Year (YYYY) when the album was released

Don't know how to same for video

M4A metadata

159034369-d8d80f79-7f13-4e69-8950-830a5a3938be~2.png

@pukkandan
Copy link
Member

I have a temporary solution which only works with music only (yt music not youtube video)
--parse-metadata "release_year:(?s)(?P<meta_date>.+)"
adding this command works fine for albums but not video
See here
release_year (numeric): Year (YYYY) when the album was released

Don't know how to same for video

You can do: --parse-metadata "%(upload_date,release_year).4s:(?P<meta_date>.+)"

@sourabhkv
Copy link
Author

sourabhkv commented Mar 18, 2022

LEFT : --parse-metadata "release_year:(?s)(?P<meta_date>.+)"
RIGHT : --parse-metadata "%(upload_date,release_year).4s:(?P<meta_date>.+)"

159037142-fb5fb5b2-5fa8-47d6-b739-b0732a0fd905~2.png

In left the year is released_year whereas in right it is uploaded year
Uploaded year should only be used when release_year is not available

@pukkandan
Copy link
Member

then just reverse the order of the fields! 😕

@sourabhkv
Copy link
Author

sourabhkv commented Mar 18, 2022

Reversing is not working for youtube video
[MetadataParser] Parsed meta_date from '%(release_year,upload_year).4s': 'NA'

159039436-d80c8eb7-4a5c-42d6-9641-ab54b1132ec7~2.png

@sourabhkv sourabhkv changed the title Wrong year in metadata in M4A format Wrong year in metadata in M4A, MP4, FLAC format Mar 19, 2022
@pukkandan
Copy link
Member

Reversing is not working for youtube video
[MetadataParser] Parsed meta_date from '%(release_year,upload_year).4s': 'NA'

The field names are wrong

@paul1149
Copy link

Is this the same issue: Suddenly I'm getting wrong Modified dates displayed in Dolphin in Linux with the KDE desktop. The Creation date is correct however, but I don't display that. I just downloaded an .mp4 from youtube, and the Modified Date is 2/19/2919. I first noticed this happening last night. I'm running version 2022.08.19-1, but I think it also happened with my previous version.

@pukkandan
Copy link
Member

Off topic, but see --no-mtime option

@paul1149
Copy link

Ok, thanks much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific external issue Issue with an external tool
Projects
None yet
Development

No branches or pull requests

4 participants