aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorpulpe <Pulpan3@gmail.com>2014-02-22 13:55:51 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-03-26 15:22:51 +0100
commit0c14e2fbe3c5cba16af27525aa6715819226e6d8 (patch)
tree15a314fddb62e975c73a3f82991324508dbc896b /youtube_dl/__init__.py
parent98acdc895bb6795efa1b5890a7af1b6e662051bd (diff)
add post processor
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 6af4b8aee..490f76dc9 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -90,6 +90,8 @@ from .extractor import gen_extractors
from .version import __version__
from .YoutubeDL import YoutubeDL
from .postprocessor import (
+ AtomicParsleyPP,
+ FFmpegMediaFixPP,
FFmpegMetadataPP,
FFmpegVideoConvertor,
FFmpegExtractAudioPP,
@@ -497,6 +499,8 @@ def parseOpts(overrideArguments=None):
help='do not overwrite post-processed files; the post-processed files are overwritten by default')
postproc.add_option('--embed-subs', action='store_true', dest='embedsubtitles', default=False,
help='embed subtitles in the video (only for mp4 videos)')
+ postproc.add_option('--embed-thumbnail', action='store_true', dest='embedthumbnail', default=False,
+ help='embed thumbnail in the audio as cover art')
postproc.add_option('--add-metadata', action='store_true', dest='addmetadata', default=False,
help='write metadata to the video file')
postproc.add_option('--xattrs', action='store_true', dest='xattrs', default=False,
@@ -803,6 +807,9 @@ def _real_main(argv=None):
ydl.add_post_processor(FFmpegEmbedSubtitlePP(subtitlesformat=opts.subtitlesformat))
if opts.xattrs:
ydl.add_post_processor(XAttrMetadataPP())
+ if opts.embedthumbnail:
+ ydl.add_post_processor(FFmpegMediaFixPP())
+ ydl.add_post_processor(AtomicParsleyPP())
# Update version
if opts.update_self: