]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[__init__] Metadata should be added after conversion
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 8 Jan 2017 18:36:39 +0000 (02:36 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Mon, 6 Mar 2017 10:09:12 +0000 (18:09 +0800)
Fixes #5594

ChangeLog
youtube_dl/__init__.py

index 5fb4c20aff6cb21c425fb28ebc2b89df5ef68433..ad65505c5abae06903ae7aef12d10ff7a595f069 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 version <unreleased>
 
+Core
+* [__init__] Metadata are now added after conversion (#5594)
+
+
 Extractors
 * [openload] Fix extraction (#10408, #12357)
 
index 0c401baa6640fc7aaef83cd4ca11a1a4462919b1..ad5f13d2be2eef8a92e143dbc2bdc1287275cca1 100644 (file)
@@ -242,14 +242,11 @@ def _real_main(argv=None):
 
     # PostProcessors
     postprocessors = []
-    # Add the metadata pp first, the other pps will copy it
     if opts.metafromtitle:
         postprocessors.append({
             'key': 'MetadataFromTitle',
             'titleformat': opts.metafromtitle
         })
-    if opts.addmetadata:
-        postprocessors.append({'key': 'FFmpegMetadata'})
     if opts.extractaudio:
         postprocessors.append({
             'key': 'FFmpegExtractAudio',
@@ -279,6 +276,11 @@ def _real_main(argv=None):
         })
         if not already_have_thumbnail:
             opts.writethumbnail = True
+    # FFmpegMetadataPP should be run after FFmpegVideoConvertorPP and
+    # FFmpegExtractAudioPP as containers before conversion may not support
+    # metadata (3gp, webm, etc.)
+    if opts.addmetadata:
+        postprocessors.append({'key': 'FFmpegMetadata'})
     # XAttrMetadataPP should be run after post-processors that may change file
     # contents
     if opts.xattrs: