question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Broken] YouTube: --add-metadata fails to add metadata to final file

See original GitHub issue

Checklist

  • I’m reporting a broken site support
  • I’ve verified that I’m running yt-dlp version 2021.03.24.1
  • 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

Verbose log

[debug] User config file: /home/toakraka/.config/yt-dlp/config
[debug] User config: ['--limit-rate', '1M', '--no-mtime', '--add-metadata', '-o', '%(title)s (%(height)ip%(fps)i, %(uploader)s).%(ext)s', '--windows-filenames', '--format-sort', 'fps,br']
[debug] Command-line config: ['-v', 'https://www.youtube.com/watch?v=j5FF_fkdtoA']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.03.24.1 (zip)
[debug] Python version 3.7.3 (CPython 64bit) - Linux-4.19.0-13-amd64-x86_64-with-debian-10.7
[debug] exe versions: ffmpeg 4.1.6-1, ffprobe 4.1.6-1
[debug] Proxy map: {}
[youtube] j5FF_fkdtoA: Downloading webpage
[debug] Sort order given by user: fps,br
[debug] Formats sorted by: hasvid, ie_pref, lang, fps, tbr, vbr, abr, quality, res, vcodec:vp9.2(10), acodec, filesize, fs_approx, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Downloading format(s) 137+140
[debug] Invoking downloader on 'https://r6---sn-8xgp1vo-ab5l.googlevideo.com/videoplayback?expire=1616915258&ei=2tZfYIyqC4XVgwPt-4XAAQ&ip=108.24.193.10&id=o-AFRi7bHt6xeFtv5XEwdc1W-DewAFTgvpNhKVymxVoQEx&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mh=Fu&mm=31%2C29&mn=sn-8xgp1vo-ab5l%2Csn-ab5szn7s&ms=au%2Crdu&mv=m&mvi=6&pcm2cms=yes&pl=16&initcwndbps=1135000&vprv=1&mime=video%2Fmp4&ns=TWUknlCrxWNDipxWNm0ASdIF&gir=yes&clen=168392279&dur=887.653&lmt=1594377679520025&mt=1616893481&fvip=6&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=6432432&n=0_RNU7_2l0aeSwUr_jpWM&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgMWrLqeb9ejq7EVDZkfpmextZLnIhE-xjWQanhgtwDY8CIQCvi-3_i7Y75njTWVuGfCyQ0yZWAUsBguDJfViTbGu3CA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAO_ZGVyDp6uH9NeTdc3Zdd6jY6pSxaZ7sA7zSy_RrS4jAiEAsLENmvT-CljBtnnMASD2m0TmP1RdHrB-8ezPcz6eiHs%3D'
[download] Destination: Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).f137.mp4

[download]   0.0% of 160.59MiB at 626.39KiB/s ETA 04:24
...
[download] 100.0% of 160.59MiB at 1023.59KiB/s ETA 00:00
[download] 100% of 160.59MiB in 02:42
[debug] Invoking downloader on 'https://r6---sn-8xgp1vo-ab5l.googlevideo.com/videoplayback?expire=1616915258&ei=2tZfYIyqC4XVgwPt-4XAAQ&ip=108.24.193.10&id=o-AFRi7bHt6xeFtv5XEwdc1W-DewAFTgvpNhKVymxVoQEx&itag=140&source=youtube&requiressl=yes&mh=Fu&mm=31%2C29&mn=sn-8xgp1vo-ab5l%2Csn-ab5szn7s&ms=au%2Crdu&mv=m&mvi=6&pcm2cms=yes&pl=16&initcwndbps=1135000&vprv=1&mime=audio%2Fmp4&ns=TWUknlCrxWNDipxWNm0ASdIF&gir=yes&clen=14367465&dur=887.722&lmt=1594376065267111&mt=1616893481&fvip=6&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=6431432&n=0_RNU7_2l0aeSwUr_jpWM&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgK1hl36C637ht02ntbtbVOZp9pQKSRL0hbl56CbWxCxoCIEFoAq_nsgDAQuAA9Jl1COkIylSyhRJEwyjdwnXA-zRY&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAO_ZGVyDp6uH9NeTdc3Zdd6jY6pSxaZ7sA7zSy_RrS4jAiEAsLENmvT-CljBtnnMASD2m0TmP1RdHrB-8ezPcz6eiHs%3D'
[download] Destination: Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (NApNA, Nyarly).f140.m4a

[download]   0.0% of 13.70MiB at 273.65KiB/s ETA 00:51
...
[download] 100.0% of 13.70MiB at 1023.58KiB/s ETA 00:00
[download] 100% of 13.70MiB in 00:14
[Merger] Merging formats into "Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).f137.mp4' -i 'file:Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (NApNA, Nyarly).f140.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).temp.mp4'
Deleting original file Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (NApNA, Nyarly).f140.m4a (pass -k to keep)
Deleting original file Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).f137.mp4 (pass -k to keep)
[Metadata] Adding metadata to 'Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).mp4' -map 0 -dn -c copy -metadata 'title=Can You Beat Shin Megami Tensei: Nocturne Without Buffs (Part 4)' -metadata date=20200708 -metadata 'description=Subscribe for more SMT and Persona videos!

Follow me on Twitter: https://twitter.com/crawling_nyarly
Consider donating on Ko-Fi: https://ko-fi.com/nyarly
Subscribe to my Twitch channel: https://www.twitch.tv/nyaarly

Part 3: https://www.youtube.com/watch?v=3n4wtSj59rE

After failing to complete the challenge in the last part, Demi-Fiend takes some more time to grind all the way to the max level, and is now back for revenge! Will he be able to beat the bosses originally deemed impossible without having to use buffs this time?

Intro by Lyric: https://www.youtube.com/channel/UCN508DxgoQofsmst-d1BFDQ

The unofficial patch I used to play Nocturne Maniax Chronicle Edition can be found here: https://www.romhacking.net/translations/3283/

#SMT #ShinMegamiTensei #Nocturne' -metadata 'synopsis=Subscribe for more SMT and Persona videos!

Follow me on Twitter: https://twitter.com/crawling_nyarly
Consider donating on Ko-Fi: https://ko-fi.com/nyarly
Subscribe to my Twitch channel: https://www.twitch.tv/nyaarly

Part 3: https://www.youtube.com/watch?v=3n4wtSj59rE

After failing to complete the challenge in the last part, Demi-Fiend takes some more time to grind all the way to the max level, and is now back for revenge! Will he be able to beat the bosses originally deemed impossible without having to use buffs this time?

Intro by Lyric: https://www.youtube.com/channel/UCN508DxgoQofsmst-d1BFDQ

The unofficial patch I used to play Nocturne Maniax Chronicle Edition can be found here: https://www.romhacking.net/translations/3283/

#SMT #ShinMegamiTensei #Nocturne' -metadata 'purl=https://www.youtube.com/watch?v=j5FF_fkdtoA' -metadata 'comment=https://www.youtube.com/watch?v=j5FF_fkdtoA' -metadata artist=Nyarly 'file:Can You Beat Shin Megami Tensei - Nocturne Without Buffs (Part 4) (1080p30, Nyarly).temp.mp4'

Description

For this video, the program fails to add metadata to the final file, even though the --add-metadata option is enabled. When I look at the file in VLC Media Player, the “Metadata” tab is completely empty. (The video description isn’t added to the “Comments” field, either.)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
pukkandancommented, Mar 28, 2021

The metadata is in fact being added as @nicolaasjan has shown above. I don’t know why VLC can’t read it. Is it able to read the metadata if you download the same formats with youtube-dl? If not, you probably should ask this to VLC devs instead.

The video description isn’t added to the “Comments” field, either.

According to kdenlive and ffmpeg, comment is supposed to be a short description and synopsis is the long description for mp4. So, the video description is added to synopsis (and description field which mp4 doesnt support) while the webpage URL is saved in comment field.

1reaction
ToaKrakacommented, Mar 28, 2021

Then this is indeed a VLC issue. Will close once @ToaKraka can confirm

Yes, this is what happens after I update my VLC installation:

[Edit] Just tried it in a Windows virtual machine with VLC 3.0.12 and there the metadata tab is also empty, but the Comments field of the yt-dlp downloaded video contains the long description, just like the youtube-dl downloaded one. Huh?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding metadata to audio files doesnt work #11047 - GitHub
Attempting to load extracted wav files into a java AudioInputStream but receiving an error due to the Bit rate and length properties not...
Read more >
metadata encoding issue (python, youtube-dl, ffmpeg)
As far as I remember I was trying with "%(artist)s" and "%(title)s", but I never used --add-metadata. All non-ascii chars are present in...
Read more >
Validate metadata - YouTube Help
When finished, re-add the file to the Uploader page. If the filename does not change, YouTube will use the newer version of the...
Read more >
Adding metadata to TensorFlow Lite models
When bumping up the MAJOR number, it does not necessarily mean the backward compatibility is broken. Therefore, we use the Flatbuffers file ......
Read more >
Read & write developer metadata | Google Sheets
Tags can be used to semantically bind portions of a spreadsheet to fields in a third-party tool or database, so changes to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found