aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-08-26 04:03:40 +0200
committerIsmael Mejia <iemejia@gmail.com>2013-08-28 00:33:12 +0200
commit06a401c845289344bfe8998a0acad07f79fe7818 (patch)
tree21006d0073cc901010d8793f95293bc2e5d6a2cf /youtube_dl/__init__.py
parentbd2dee6c67b837bdebdd28d10d9586129021330e (diff)
parentd4051a8e051a06ddeab905a4b5fcc7ddb70952bf (diff)
Merge branch 'master' into subtitles_rework
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index c21bf6d4a..5d686a928 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -320,6 +320,8 @@ def parseOpts(overrideArguments=None):
help='keeps the video file on disk after the post-processing; the video is erased by default')
postproc.add_option('--no-post-overwrites', action='store_true', dest='nopostoverwrites', default=False,
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)')
parser.add_option_group(general)
@@ -608,6 +610,8 @@ def _real_main(argv=None):
ydl.add_post_processor(FFmpegExtractAudioPP(preferredcodec=opts.audioformat, preferredquality=opts.audioquality, nopostoverwrites=opts.nopostoverwrites))
if opts.recodevideo:
ydl.add_post_processor(FFmpegVideoConvertor(preferedformat=opts.recodevideo))
+ if opts.embedsubtitles:
+ ydl.add_post_processor(FFmpegEmbedSubtitlePP(subtitlesformat=opts.subtitlesformat))
# Update version
if opts.update_self: