diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2017-01-09 02:36:39 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2017-03-06 18:09:12 +0800 |
commit | 54a3a8827baf71c553723b6766e676369e9c743c (patch) | |
tree | e1685a4798f301cece861709c8aa73074ff6d355 /youtube_dl/__init__.py | |
parent | 92cb5763f440d0ca1627f8120a7ce29598eb9484 (diff) |
[__init__] Metadata should be added after conversion
Fixes #5594
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 0c401baa6..ad5f13d2b 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -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: |