Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
4605c94d
Unverified
Commit
4605c94d
authored
Mar 11, 2017
by
Yen Chi Hsuan
Browse files
[__init__] Fix missing subtitles if --add-metadata is used (#12423)
The previous fix for #5594 is incorrect
parent
a8e687a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
ChangeLog
ChangeLog
+6
-0
youtube_dl/__init__.py
youtube_dl/__init__.py
+10
-5
No files found.
ChangeLog
View file @
4605c94d
version <unreleased>
Core
* Fix missing subtitles if --add-metadata is used (#12423)
version 2017.03.10
Extractors
...
...
youtube_dl/__init__.py
View file @
4605c94d
...
...
@@ -259,6 +259,16 @@ def _real_main(argv=None):
'key'
:
'FFmpegVideoConvertor'
,
'preferedformat'
:
opts
.
recodevideo
,
})
# FFmpegMetadataPP should be run after FFmpegVideoConvertorPP and
# FFmpegExtractAudioPP as containers before conversion may not support
# metadata (3gp, webm, etc.)
# And this post-processor should be placed before other metadata
# manipulating post-processors (FFmpegEmbedSubtitle) to prevent loss of
# extra metadata. By default ffmpeg preserves metadata applicable for both
# source and target containers. From this point the container won't change,
# so metadata can be added here.
if
opts
.
addmetadata
:
postprocessors
.
append
({
'key'
:
'FFmpegMetadata'
})
if
opts
.
convertsubtitles
:
postprocessors
.
append
({
'key'
:
'FFmpegSubtitlesConvertor'
,
...
...
@@ -276,11 +286,6 @@ 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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment