--metadata-from-title not working as it should #5339

Closed
opened 2026-02-21 02:43:54 -05:00 by deekerman · 2 comments
Owner

Originally created by @dxzdxz1 on GitHub (Aug 16, 2015).

I'm trying to create an semi-automated download/tagging script using Youtube-dl, and almost everyhing is working fine, expect the tagging.
I mean, with m4a and mp3 files the script works fine, but with opus/ogg the "--metadata-from-title" doesn't work as it should, only tag the title but not the artist.

This is my script

youtube-dl -f "formatnumber" "youtubevideolink" -x --add-metadata --metadata-from-title "%%(artist)s - %%(title)s" -o "%%(title)s.%%(ext)s" -q

an example using --verbose output:


[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-f', u'171', u'https://www.youtube.com/watch?v=ouDFGE-P_iQ', u'-x', u'--add-metadata', u'--metadata-from-title', u'%(artist)s - %(title)s', u'-o', u'%(title)s.%(ext)s', u'-q', u'--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2015.08.16.1
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: avconv v12_dev0-1719-g9469370, avprobe v12_dev0-1719-g9469370
[debug] Proxy map: {}
[debug] Invoking downloader on 'https://r3---sn-b8u-bg0l.googlevideo.com/videoplayback?id=a2e0c5184f8ffe24&itag=171&source=youtube&requiressl=yes&mm=31&mn=sn-b8u-bg0l&pl=20&mv=m&ms=au&ratebypass=yes&mime=audio/webm&gir=yes&clen=5152208&lmt=1400369658397240&dur=338.011&key=dg_yt0&mt=1439781942&upn=p2_kzRODKCY&signature=533CEA15D3950636AFB6F328F96463F232603AC4.7CEFF83EC84FD7E3DDB235F87E17B95DB427C7CA&sver=3&fexp=9406125,9408490,9408623,9408710,9409069,9415172,9415365,9415485,9415868,9416023,9416126,9417487,9417707,9418059,9418153,9418203,9418505,9419243&ip=177.18.224.168&ipbits=0&expire=1439803591&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mn,pl,mv,ms,ratebypass,mime,gir,clen,lmt,dur'

As you can see, the script runs without showing any issues, but the file is not properly tagged.
I'm using the latest libav and youtube-dl binaries on Windows 10. I already tried switch to ffmpeg but is not working either.

The issue #2368 is the same as mine, I suppose.

And as I mentioned, for m4a and mp3 the files are properly tagged, the problem occours only with Vorbis files.

Originally created by @dxzdxz1 on GitHub (Aug 16, 2015). I'm trying to create an semi-automated download/tagging script using Youtube-dl, and almost everyhing is working fine, expect the tagging. I mean, with m4a and mp3 files the script works fine, but with opus/ogg the "--metadata-from-title" doesn't work as it should, only tag the title but not the artist. <b>This is my script</b> <blockquote> youtube-dl -f "formatnumber" "youtubevideolink" -x --add-metadata --metadata-from-title "%%(artist)s - %%(title)s" -o "%%(title)s.%%(ext)s" -q </blockquote> <b>an example using --verbose output:</b> <blockquote> <br>[debug] System config: [] <br>[debug] User config: [] <br>[debug] Command-line args: [u'-f', u'171', u'https://www.youtube.com/watch?v=ouDFGE-P_iQ', u'-x', u'--add-metadata', u'--metadata-from-title', u'%(artist)s - %(title)s', u'-o', u'%(title)s.%(ext)s', u'-q', u'--verbose'] <br>[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252 <br>[debug] youtube-dl version 2015.08.16.1 <br>[debug] Python version 2.7.8 - Windows-8-6.2.9200 <br>[debug] exe versions: avconv v12_dev0-1719-g9469370, avprobe v12_dev0-1719-g9469370 <br>[debug] Proxy map: {} <br>[debug] Invoking downloader on 'https://r3---sn-b8u-bg0l.googlevideo.com/videoplayback?id=a2e0c5184f8ffe24&itag=171&source=youtube&requiressl=yes&mm=31&mn=sn-b8u-bg0l&pl=20&mv=m&ms=au&ratebypass=yes&mime=audio/webm&gir=yes&clen=5152208&lmt=1400369658397240&dur=338.011&key=dg_yt0&mt=1439781942&upn=p2_kzRODKCY&signature=533CEA15D3950636AFB6F328F96463F232603AC4.7CEFF83EC84FD7E3DDB235F87E17B95DB427C7CA&sver=3&fexp=9406125,9408490,9408623,9408710,9409069,9415172,9415365,9415485,9415868,9416023,9416126,9417487,9417707,9418059,9418153,9418203,9418505,9419243&ip=177.18.224.168&ipbits=0&expire=1439803591&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,mn,pl,mv,ms,ratebypass,mime,gir,clen,lmt,dur' </blockquote> As you can see, the script runs without showing any issues, but the file is not properly tagged. I'm using the latest libav and youtube-dl binaries on Windows 10. I already tried switch to ffmpeg but is not working either. The issue #2368 is the same as mine, I suppose. And as I mentioned, for m4a and mp3 the files are properly tagged, the problem occours only with Vorbis files.
Author
Owner

@dstftw commented on GitHub (Aug 17, 2015):

ffmpeg/avconv doesn't look capable embedding webm metadata. Moreover looks like official webm metadata tags are not defined at all. You can embed tags into matroska container by forcing output template extension to mkv:

youtube-dl -f 171 https://www.youtube.com/watch?v=ouDFGE-P_iQ -x --add-metadata --metadata-from-title "%(artist)s - %(title)s" -o "%(title)s.mkv"

Closing since not a youtube-dl issue.

@dstftw commented on GitHub (Aug 17, 2015): ffmpeg/avconv doesn't look capable embedding webm metadata. Moreover looks like official webm metadata tags are [not defined at all](http://wiki.webmproject.org/webm-metadata/global-metadata#TOC-Official-Tags). You can embed tags into matroska container by forcing output template extension to `mkv`: ``` youtube-dl -f 171 https://www.youtube.com/watch?v=ouDFGE-P_iQ -x --add-metadata --metadata-from-title "%(artist)s - %(title)s" -o "%(title)s.mkv" ``` Closing since not a youtube-dl issue.
Author
Owner

@dxzdxz1 commented on GitHub (Aug 17, 2015):

But avconv is capable of embed metadata on opus and ogg files.
Try this for example:

avconv -i 1.opus -metadata title="test title" -metadata author="test artist" -metadata album="test album" -metadata track="12" -c copy 2.opus

You will see

@dxzdxz1 commented on GitHub (Aug 17, 2015): But avconv is capable of embed metadata on opus and ogg files. Try this for example: <blockquote> avconv -i 1.opus -metadata title="test title" -metadata author="test artist" -metadata album="test album" -metadata track="12" -c copy 2.opus </blockquote> You will see
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#5339
No description provided.