Add metadata to extracted audio file too.

This fixes metadata not being present if not supported by the initial container (i.e. artist attribute in webm).
This commit is contained in:
NextLight 2016-06-08 17:42:58 +02:00
parent 6da8d7de69
commit 9f83b99f54

View File

@ -221,7 +221,7 @@ def _real_main(argv=None):
'key': 'MetadataFromTitle',
'titleformat': opts.metafromtitle
})
if opts.addmetadata:
if opts.addmetadata and opts.keepvideo:
postprocessors.append({'key': 'FFmpegMetadata'})
if opts.extractaudio:
postprocessors.append({
@ -230,6 +230,8 @@ def _real_main(argv=None):
'preferredquality': opts.audioquality,
'nopostoverwrites': opts.nopostoverwrites,
})
if opts.addmetadata:
postprocessors.append({'key': 'FFmpegMetadata'})
if opts.recodevideo:
postprocessors.append({
'key': 'FFmpegVideoConvertor',