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

Not all metadata is embedded if output format is not mkv #17029

Closed
srussel opened this issue Jul 21, 2018 · 3 comments
Closed

Not all metadata is embedded if output format is not mkv #17029

srussel opened this issue Jul 21, 2018 · 3 comments

Comments

@srussel
Copy link

@srussel srussel commented Jul 21, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.07.10. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.07.10

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

I normally use --add-metadata --merge-output-format mkv to capture all the metadata. If the output format is not mkv, not all the metadata is captured. I am assuming this is because the output format does not support the metadata.

I am not sure if this is a bug. That is, requesting "--add-metadata --merge-output-format mkv" means that mkv should always be used in order to store all the metadata. Or if this is a feature request to add an option to force mkv to be used so I can capture all metadata.

For example, if I run:

youtube-dl --add-metadata --merge-output-format mkv https://www.youtube.com/watch?v=iqKdEhx-dD4

A mkv file is created. In vlc I can Ctrl-I and in view all the metadata in the Metadata tab.
ffprobe -show_entries format:stream -print_format json Isolation\ -\ Mind\ Field\ \(Ep\ 1\)-iqKdEhx-dD4.mp4
shows all metadata.

If I run:

youtube-dl -f 22 --add-metadata --merge-output-format mkv https://www.youtube.com/watch?v=iqKdEhx-dD4

A mp4 file is created. In vlc, no metadata is shown in the Metadata tab.
ffprobe -show_entries format:stream -print_format json Isolation\ -\ Mind\ Field\ \(Ep\ 1\)-iqKdEhx-dD4.mp4
shows some metadata but not the URL.

If I run:

youtube-dl -f 43 --add-metadata --merge-output-format mkv https://www.youtube.com/watch?v=iqKdEhx-dD4

A webm file is created. In vlc, no metadata is shown in the Metadata tab.
ffprobe -show_entries format:stream -print_format json Isolation\ -\ Mind\ Field\ \(Ep\ 1\)-iqKdEhx-dD4.mp4
does not show any metadata.


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl -v -f 22 --add-metadata --merge-output-format mkv https://www.youtube.com/watch?v=iqKdEhx-dD4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-f', '22', '--add-metadata', '--merge-output-format', 'mkv', 'https://www.youtube.com/watch?v=iqKdEhx-dD4']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.10
[debug] Python version 3.5.3 (CPython) - Linux-4.16.0-0.bpo.2-amd64-x86_64-with-debian-9.5
[debug] exe versions: ffmpeg 3.3.8, ffprobe 3.3.8
[debug] Proxy map: {}
[youtube] iqKdEhx-dD4: Downloading webpage
[youtube] iqKdEhx-dD4: Downloading video info webpage
[youtube] {22} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {43} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {18} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {36} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {17} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {313} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {271} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {137} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {248} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {136} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {247} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {135} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {244} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {134} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {243} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {133} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {242} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {160} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {278} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {140} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {171} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {249} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {250} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {251} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {256} signature length 44.40, html5 player vfl-Sv0Xf
[youtube] {258} signature length 44.40, html5 player vfl-Sv0Xf
[debug] Invoking downloader on 'https://r5---sn-1gi7znes.googlevideo.com/videoplayback?mm=31%2C29&source=youtube&pl=24&mn=sn-1gi7znes%2Csn-1gieen7e&mime=video%2Fmp4&ip=82.102.24.164&requiressl=yes&expire=1532160486&gcr=ch&mv=m&id=o-AIVRoSPvJKoTZ3g6KyH3n1NmjQlwIyWtlejZquJ3coGq&ms=au%2Crdu&ratebypass=yes&ipbits=0&key=yt6&c=WEB&itag=22&mt=1532138715&dur=2085.430&fvip=5&initcwndbps=318750&sparams=dur%2Cei%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&lmt=1531311279880811&ei=hZVSW-zDO8yD8gPn1ZaIDw&signature=B8F209A8B014275E49A8328947F832C6659F35DB.2841D445CC34F50981A59A33543C366B8075D33E'
[download] Destination: Isolation - Mind Field (Ep 1)-iqKdEhx-dD4.mp4
[download] 100% of 210.47MiB in 00:36
[ffmpeg] Adding metadata to 'Isolation - Mind Field (Ep 1)-iqKdEhx-dD4.mp4'
[debug] ffmpeg command line: ffmpeg -y -i 'file:Isolation - Mind Field (Ep 1)-iqKdEhx-dD4.mp4' -c copy -metadata 'description=What happens when your brain is deprived of stimulation?  What effect does being cut off from interaction with the outside world have on a person?  What effect does it have on me, when I am locked in a windowless, soundproof isolation chamber for three days?  In this episode of Mind Field, I take both an objective and a very intimate look at Isolation.

Available with YouTube Premium - https://www.youtube.com/premium/originals. To see if Premium is available in your country, click here: https://goo.gl/A3HtfP' -metadata artist=Vsauce -metadata 'title=Isolation - Mind Field (Ep 1)' -metadata 'comment=What happens when your brain is deprived of stimulation?  What effect does being cut off from interaction with the outside world have on a person?  What effect does it have on me, when I am locked in a windowless, soundproof isolation chamber for three days?  In this episode of Mind Field, I take both an objective and a very intimate look at Isolation.

Available with YouTube Premium - https://www.youtube.com/premium/originals. To see if Premium is available in your country, click here: https://goo.gl/A3HtfP' -metadata 'purl=https://www.youtube.com/watch?v=iqKdEhx-dD4' -metadata date=20170118 'file:Isolation - Mind Field (Ep 1)-iqKdEhx-dD4.temp.mp4'
@wongjustin99
Copy link

@wongjustin99 wongjustin99 commented Dec 13, 2018

I'm experiencing similar when downloading .webm files from Youtube. I'm really just after the description, and it seems there's no way to get that into metadata without converting to MKV first.

@hruvulum
Copy link

@hruvulum hruvulum commented Feb 21, 2019

I want the same thing the OP (srussel) wants. Specifically, I used to use --write-info-json, but the .info.json files annoyed me, so I switched to --add-metadata, which works great when youtube-dl chooses to output in mkv format, but not when it chooses to output mp4 format. I would appreciate a command-line switch that causes youtube-dl to always choose to output in mkv. (Unlike the OP I am not under the misconception that --merge-output-format mkv is intended to achieve that.)

I would appreciate that because it would probably cause the information I want (namely, the URL) to always be add to the output file (where I can use mediainfo or ffprobe to read it). I am aware that youtube-dl already provides a way for me to specify that the url be included as part of the name of the output file, but that alternative is undesirable to me.

One of the reasons .info.json files annoyed me was that I often renamed a video file, then forgot to rename the .info.json file.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 23, 2020

A mp4 file is created. In vlc, no metadata is shown in the Metadata tab.

Blame VLC, metadata itself is embedded.

A webm file is created. In vlc, no metadata is shown in the Metadata tab.

Update ffmpeg.

@dstftw dstftw closed this May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.