ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.91k stars 10k forks source link

Adding Metadata does not happen at the same time #27319

Closed benjistokman closed 3 years ago

benjistokman commented 3 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--playlist-random', '--write-thumbnail', '--all-subs', '--embed-subs', '--add-metadata', '--write-description', '--download-archive', 'download-archive.txt', 'https://www.youtube.com/watch?v=LXb3EKWsInQ']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.12.05
[debug] Python version 3.8.5 (CPython) - Linux-5.4.0-56-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[youtube] LXb3EKWsInQ: Downloading webpage
WARNING: video doesn't have subtitles
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video description to: COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.description
[youtube] LXb3EKWsInQ: Downloading thumbnail ...
[youtube] LXb3EKWsInQ: Writing thumbnail to: COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.webp
[debug] Invoking downloader on 'https://r6---sn-a5mlrnes.googlevideo.com/videoplayback?expire=1607263446&ei=dpDMX8m2GJG5kwaR0ZL4DA&ip=184.170.240.100&id=o-AGGmPS2E5R5IBQX8mWzrzHbD7lxRFJalFPjFcgr9CVJh&itag=337&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308%2C315%2C330%2C331%2C332%2C333%2C334%2C335%2C336%2C337%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&mh=NH&mm=31%2C26&mn=sn-a5mlrnes%2Csn-n4v7knls&ms=au%2Conr&mv=m&mvi=6&pl=24&initcwndbps=1446250&vprv=1&mime=video%2Fwebm&ns=UIs4SOV9WK9ta6C2LMhJM0gF&gir=yes&clen=1132160346&dur=313.780&lmt=1580549299338519&mt=1607240922&fvip=3&keepalive=yes&c=WEB&txp=5531232&n=VnDYpSvzKq2DcFgOn&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJQSbytPlQAq01CwwD1aF8t0LI3eD_RWyaHZYkNi8TFnAiBx5qVKPeulGZpUtT-iYmfJN3Emh_p8QJ8NIvbiz935HQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgNsvTcjUfxTjI7EItbcuxDZZaRXD6DP27QGBAvfY7RY8CIQCLI4LxDgaokXI-RhuLEpQg3w8yOnHKmwvU-ctxH_elhA%3D%3D&ratebypass=yes'
[download] Destination: COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.f337.webm
[download] 100% of 1.05GiB in 02:01
[debug] Invoking downloader on 'https://r6---sn-a5mlrnes.googlevideo.com/videoplayback?expire=1607263446&ei=dpDMX8m2GJG5kwaR0ZL4DA&ip=184.170.240.100&id=o-AGGmPS2E5R5IBQX8mWzrzHbD7lxRFJalFPjFcgr9CVJh&itag=251&source=youtube&requiressl=yes&mh=NH&mm=31%2C26&mn=sn-a5mlrnes%2Csn-n4v7knls&ms=au%2Conr&mv=m&mvi=6&pl=24&initcwndbps=1446250&vprv=1&mime=audio%2Fwebm&ns=UIs4SOV9WK9ta6C2LMhJM0gF&gir=yes&clen=5203169&dur=313.801&lmt=1580542156514369&mt=1607240922&fvip=3&keepalive=yes&c=WEB&txp=5531232&n=VnDYpSvzKq2DcFgOn&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMkVxzCFHavlSZ0NoFXbuZXgdNW7YAWF0D_pX1Yzsn_NAiEA3YDCzyDPz_IDFpnIMt2qieDcaNedxuL8LomOg8JXV0c%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgNsvTcjUfxTjI7EItbcuxDZZaRXD6DP27QGBAvfY7RY8CIQCLI4LxDgaokXI-RhuLEpQg3w8yOnHKmwvU-ctxH_elhA%3D%3D&ratebypass=yes'
[download] Destination: COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.f251.webm
[download] 100% of 4.96MiB in 00:00
[ffmpeg] Merging formats into "COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.f337.webm' -i 'file:COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.f251.webm' -c copy -map 0:v:0 -map 1:a:0 'file:COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.temp.webm'
Deleting original file COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.f337.webm (pass -k to keep)
Deleting original file COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.f251.webm (pass -k to keep)
[ffmpeg] Adding metadata to 'COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.webm'
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.webm' -c copy -metadata 'title=COSTA RICA IN 4K 60fps HDR (ULTRA HD)' -metadata date=20180612 -metadata 'description=We'"'"'ve re-mastered and re-uploaded our favorite video in HDR!

CHECK OUT OUR MOST POPULAR VIDEO: https://youtu.be/tO01J-M3g0U
► INSTAGRAM: http://www.instagram.com/mysterybox
► INSTAGRAM: http://www.instagram.com/jacobschwarz
►WEBSITE: http://www.mysterybox.us
►FACEBOOK: https://www.facebook.com/mysteryboxdi...

Make sure to follow us on Instagram for BTS and sneak-peaks at upcoming projects. 

LICENSING & BUSINESS INQUIRIES
► contact@mysterybox.us

CHECK OUT OUR VIDEO PRODUCTION COMPANY
► https://www.mysterybox.us

4K PLAYLISTS
► https://www.youtube.com/playlist?list...

BLOG Check out our blog for great information on working in HDR and 8K. 
► http://www.mysterybox.us/blog

SUBSCRIBE FOR MORE VIDS
►https://www.youtube.com/user/jacobsch...

MUSIC
► Storyworks Music "Promise of Dawn"
https://soundcloud.com/joshuapeterson/promise-of-dawn
www.storyworksmusic.com

► SHOT ON
Red Weapon LE w/Helium 8K s35 sensor (Stormtrooper33)
Canon 16-35mm III  
Canon 24-70mm II
Sigma 150-500mm
Zeiss Classic 15mm
MOVI M10
Adobe Premiere and DaVinci Resolve

LICENSING & BUSINESS INQUIRIES
► contact@mysterybox.us

This video is subject to copyright owned by Mystery Box LLC. Any reproduction or republication of all or part of this video is expressly prohibited, unless Mystery Box has explicitly granted its prior written consent. All other rights reserved.

Copyright © 2017 Mystery Box, LLC. All Rights Reserved.' -metadata 'comment=We'"'"'ve re-mastered and re-uploaded our favorite video in HDR!

CHECK OUT OUR MOST POPULAR VIDEO: https://youtu.be/tO01J-M3g0U
► INSTAGRAM: http://www.instagram.com/mysterybox
► INSTAGRAM: http://www.instagram.com/jacobschwarz
►WEBSITE: http://www.mysterybox.us
►FACEBOOK: https://www.facebook.com/mysteryboxdi...

Make sure to follow us on Instagram for BTS and sneak-peaks at upcoming projects. 

LICENSING & BUSINESS INQUIRIES
► contact@mysterybox.us

CHECK OUT OUR VIDEO PRODUCTION COMPANY
► https://www.mysterybox.us

4K PLAYLISTS
► https://www.youtube.com/playlist?list...

BLOG Check out our blog for great information on working in HDR and 8K. 
► http://www.mysterybox.us/blog

SUBSCRIBE FOR MORE VIDS
►https://www.youtube.com/user/jacobsch...

MUSIC
► Storyworks Music "Promise of Dawn"
https://soundcloud.com/joshuapeterson/promise-of-dawn
www.storyworksmusic.com

► SHOT ON
Red Weapon LE w/Helium 8K s35 sensor (Stormtrooper33)
Canon 16-35mm III  
Canon 24-70mm II
Sigma 150-500mm
Zeiss Classic 15mm
MOVI M10
Adobe Premiere and DaVinci Resolve

LICENSING & BUSINESS INQUIRIES
► contact@mysterybox.us

This video is subject to copyright owned by Mystery Box LLC. Any reproduction or republication of all or part of this video is expressly prohibited, unless Mystery Box has explicitly granted its prior written consent. All other rights reserved.

Copyright © 2017 Mystery Box, LLC. All Rights Reserved.' -metadata 'purl=https://www.youtube.com/watch?v=LXb3EKWsInQ' -metadata 'artist=Jacob   Katie Schwarz' 'file:COSTA RICA IN 4K 60fps HDR (ULTRA HD)-LXb3EKWsInQ.temp.webm'
[ffmpeg] There aren't any subtitles to embed

[1]+  Done                    youtube-dl -v --playlist-random --write-thumbnail --all-subs --embed-subs --add-metadata --write-description --download-archive download-archive.txt https://www.youtube.com/watch?v=LXb3EKWsInQ

Description

When downloading from YouTube, youtube-dl must merge formats into mkv for not being compatable. This causes a new mkv file to be made which which will replace the mp4 file. This is completely fine, however when using the --add-metadata flag, youtube-dl adds this metadata not when formats are being merged, but after that by creating a whole new video and deleting the old one

dstftw commented 3 years ago

This is expected behavior.