aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-08 17:53:34 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-08 17:53:34 +0100
commit76b1bd672d56d4776f377a586a9b64145e089345 (patch)
treecd822ecf24b2d04a38e91414367c0cc0634ccee2 /youtube_dl/__init__.py
parent469ec9416a813f845df0df06a077a008597d83d9 (diff)
downloadyoutube-dl-76b1bd672d56d4776f377a586a9b64145e089345.tar.xz
Add ‘--prefer-avconv’ and ‘--prefer-ffmpeg’ options (#2115)
Affects the ffmpeg post processors, if ‘--prefer-ffmpeg’ is given and both avconv and ffmpeg are installed, it will use ffmpeg. Otherwise it will follow the old behaviour.
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 238a0818f..a36101c14 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -424,6 +424,10 @@ def parseOpts(overrideArguments=None):
help='write metadata to the video file')
postproc.add_option('--xattrs', action='store_true', dest='xattrs', default=False,
help='write metadata to the video file\'s xattrs (using dublin core and xdg standards)')
+ postproc.add_option('--prefer-avconv', action='store_false', dest='prefer_ffmpeg',
+ help='Prefer avconv over ffmpeg for running the postprocessors (default)')
+ postproc.add_option('--prefer-ffmpeg', action='store_true', dest='prefer_ffmpeg',
+ help='Prefer ffmpeg over avconv for running the postprocessors')
parser.add_option_group(general)
@@ -709,6 +713,7 @@ def _real_main(argv=None):
'socket_timeout': opts.socket_timeout,
'bidi_workaround': opts.bidi_workaround,
'debug_printtraffic': opts.debug_printtraffic,
+ 'prefer_ffmpeg': opts.prefer_ffmpeg,
}
with YoutubeDL(ydl_opts) as ydl: